Home » date » 2009 » Nov » 20 »

model 3 ws 7

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Fri, 20 Nov 2009 07:17:31 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6.htm/, Retrieved Fri, 20 Nov 2009 15:19:09 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
100.01 0 103.84 0 104.48 0 95.43 0 104.80 0 108.64 0 105.65 0 108.42 0 115.35 0 113.64 0 115.24 0 100.33 0 101.29 0 104.48 0 99.26 0 100.11 0 103.52 0 101.18 0 96.39 0 97.56 0 96.39 0 85.10 0 79.77 0 79.13 0 80.84 0 82.75 0 92.55 0 96.60 0 96.92 0 95.32 0 98.52 0 100.22 0 104.91 0 103.10 0 97.13 0 103.42 0 111.72 0 118.11 0 111.62 0 100.22 0 102.03 0 105.76 0 107.68 0 110.77 0 105.44 0 112.26 0 114.07 0 117.90 0 124.72 0 126.42 0 134.73 0 135.79 0 143.36 0 140.37 0 144.74 0 151.98 0 150.92 0 163.38 0 154.43 0 146.66 0 157.95 0 162.10 0 180.42 0 179.57 0 171.58 0 185.43 0 190.64 0 203.00 0 202.36 0 193.41 0 186.17 0 192.24 0 209.60 0 206.41 0 209.82 0 230.37 0 235.80 0 232.07 0 244.64 0 242.19 0 217.48 0 209.39 0 211.73 0 221.00 0 203.11 0 214.71 0 224.19 0 238.04 0 238.36 0 246.24 0 259.87 0 249.97 0 266.48 0 282.98 0 306.31 0 301.73 1 314.62 1 332.62 1 355.51 1 370.32 1 408.13 1 433.58 1 440.51 1 386.29 1 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 47.471123246113 + 29.2155921501706X[t] + 8.03850118189862M1[t] + 10.4251146884086M2[t] + 15.7017281949185M3[t] + 18.4533417014284M4[t] + 24.8059552079383M5[t] + 30.4325687144482M6[t] + 31.6191822209582M7[t] + 28.1407957274681M8[t] + 20.6054092339780M9[t] + 16.2785054481103M10[t] + 8.97400784350905M11[t] + 1.75338649349008t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)47.47112324611318.7093492.53730.012670.006335
X29.215592150170615.9316361.83380.069570.034785
M18.0385011818986222.6074770.35560.7228910.361446
M210.425114688408622.6026930.46120.6456040.322802
M315.701728194918522.5994070.69480.4887540.244377
M418.453341701428422.597620.81660.4160390.208019
M524.805955207938322.5973331.09770.2748780.137439
M630.432568714448222.5985451.34670.1810450.090523
M731.619182220958222.6012561.3990.1648170.082408
M828.140795727468122.6054651.24490.2160060.108003
M920.605409233978022.6111730.91130.3642690.182134
M1016.278505448110323.2341010.70060.4851140.242557
M118.9740078435090523.2414520.38610.7002040.350102
t1.753386493490080.1840739.525500


Multiple Linear Regression - Regression Statistics
Multiple R0.82910426940108
R-squared0.687413889539099
Adjusted R-squared0.647961273655685
F-TEST (value)17.4237848149399
F-TEST (DF numerator)13
F-TEST (DF denominator)103
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation49.1780861158411
Sum Squared Residuals249103.867863759


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1100.0157.263010921501842.7469890784982
2103.8461.403010921501442.4369890784986
3104.4868.433010921501836.0469890784982
495.4372.938010921501622.4919890784984
5104.881.044010921501723.7559890784983
6108.6488.424010921501720.2159890784983
7105.6591.364010921501714.2859890784983
8108.4289.639010921501718.7809890784983
9115.3583.857010921501731.4929890784983
10113.6481.28349362912432.356506370876
11115.2475.732382518012939.5076174819871
12100.3368.51176116799431.818238832006
13101.2978.303648843382622.9863511566174
14104.4882.443648843382822.0363511566172
1599.2689.47364884338269.78635115661737
16100.1193.97864884338266.13135115661735
17103.52102.0846488433831.43535115661736
18101.18109.464648843383-8.28464884338262
1996.39112.404648843383-16.0146488433826
2097.56110.679648843383-13.1196488433827
2196.39104.897648843383-8.50764884338265
2285.1102.324131551005-17.2241315510050
2379.7796.7730204398938-17.0030204398938
2479.1389.5523990898749-10.4223990898749
2580.8499.3442867652635-18.5042867652635
2682.75103.484286765264-20.7342867652636
2792.55110.514286765264-17.9642867652636
2896.6115.019286765264-18.4192867652636
2996.92123.125286765264-26.2052867652636
3095.32130.505286765264-35.1852867652635
3198.52133.445286765264-34.9252867652636
32100.22131.720286765264-31.5002867652636
33104.91125.938286765264-21.0282867652636
34103.1123.364769472886-20.2647694728859
3597.13117.813658361775-20.6836583617748
36103.42110.593037011756-7.17303701175578
37111.72120.384924687144-8.66492468714446
38118.11124.524924687145-6.41492468714453
39111.62131.554924687144-19.9349246871445
40100.22136.059924687144-35.8399246871445
41102.03144.165924687144-42.1359246871445
42105.76151.545924687144-45.7859246871445
43107.68154.485924687144-46.8059246871445
44110.77152.760924687144-41.9909246871445
45105.44146.978924687144-41.5389246871445
46112.26144.405407394767-32.1454073947668
47114.07138.854296283656-24.7842962836557
48117.9131.633674933637-13.7336749336367
49124.72141.425562609025-16.7055626090254
50126.42145.565562609025-19.1455626090255
51134.73152.595562609025-17.8655626090254
52135.79157.100562609025-21.3105626090254
53143.36165.206562609025-21.8465626090254
54140.37172.586562609025-32.2165626090254
55144.74175.526562609025-30.7865626090254
56151.98173.801562609025-21.8215626090254
57150.92168.019562609025-17.0995626090254
58163.38165.446045316648-2.06604531664770
59154.43159.894934205537-5.4649342055366
60146.66152.674312855518-6.01431285551764
61157.95162.466200530906-4.51620053090632
62162.1166.606200530906-4.50620053090638
63180.42173.6362005309066.78379946909365
64179.57178.1412005309061.42879946909366
65171.58186.247200530906-14.6672005309063
66185.43193.627200530906-8.19720053090631
67190.64196.567200530906-5.92720053090635
68203194.8422005309068.15779946909364
69202.36189.06020053090613.2997994690937
70193.41186.4866832385296.92331676147138
71186.17180.9355721274185.23442787258247
72192.24173.71495077739918.5250492226014
73209.6183.50683845278726.0931615472128
74206.41187.64683845278718.7631615472127
75209.82194.67683845278715.1431615472127
76230.37199.18183845278731.1881615472127
77235.8207.28783845278728.5121615472128
78232.07214.66783845278717.4021615472127
79244.64217.60783845278727.0321615472127
80242.19215.88283845278726.3071615472128
81217.48210.1008384527877.37916154721275
82209.39207.5273211604101.86267883959044
83211.73201.9762100492989.75378995070157
84221194.75558869927926.2444113007205
85203.11204.547476374668-1.43747637466814
86214.71208.6874763746686.02252362533179
87224.19215.7174763746688.47252362533183
88238.04220.22247637466817.8175236253318
89238.36228.32847637466810.0315236253318
90246.24235.70847637466810.5315236253318
91259.87238.64847637466821.2215236253318
92249.97236.92347637466813.0465236253318
93266.48231.14147637466835.3385236253318
94282.98228.56795908229054.4120409177096
95306.31223.01684797117983.2931520288207
96301.73245.01181877133156.718181228669
97314.62254.80370644672059.8162935532803
98332.62258.94370644672073.6762935532802
99355.51265.97370644672089.5362935532803
100370.32270.47870644672099.8412935532803
101408.13278.58470644672129.545293553280
102433.58285.96470644672147.615293553280
103440.51288.90470644672151.605293553280
104386.29287.1797064467299.1102935532803
105342.84281.3977064467261.4422935532802
106254.97278.824189154342-23.8541891543421
107203.42273.273078043231-69.853078043231
108170.09266.052456693212-95.962456693212
109174.03275.844344368601-101.814344368601
110167.85279.984344368601-112.134344368601
111177.01287.014344368601-110.004344368601
112188.19291.519344368601-103.329344368601
113211.2299.625344368601-88.4253443686007
114240.91307.005344368601-66.0953443686007
115230.26309.945344368601-79.6853443686007
116251.25308.220344368601-56.9703443686007
117241.66302.438344368601-60.7783443686007


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.0002744357320452880.0005488714640905760.999725564267955
184.56351542180012e-059.12703084360024e-050.999954364845782
197.97251293144967e-061.59450258628993e-050.999992027487069
201.46627834597354e-062.93255669194708e-060.999998533721654
211.15894958300442e-062.31789916600884e-060.999998841050417
222.23395829906392e-064.46791659812783e-060.9999977660417
233.62575293254753e-067.25150586509505e-060.999996374247067
248.3507134585288e-071.67014269170576e-060.999999164928654
251.41006894240002e-072.82013788480004e-070.999999858993106
262.3473061863232e-084.6946123726464e-080.999999976526938
274.69234905624935e-099.3846981124987e-090.99999999530765
281.78166766397197e-093.56333532794395e-090.999999998218332
293.35716477220309e-106.71432954440617e-100.999999999664284
305.39253076050422e-111.07850615210084e-100.999999999946075
311.31515389333556e-112.63030778667113e-110.999999999986849
322.85612006558114e-125.71224013116228e-120.999999999997144
336.7122422994813e-131.34244845989626e-120.999999999999329
342.383381794753e-134.766763589506e-130.999999999999762
354.99473028280626e-149.98946056561252e-140.99999999999995
365.81390115915307e-141.16278023183061e-130.999999999999942
371.45086669253644e-132.90173338507287e-130.999999999999855
382.66258535816818e-135.32517071633636e-130.999999999999734
391.07664687666786e-132.15329375333572e-130.999999999999892
402.18339443086272e-144.36678886172544e-140.999999999999978
414.17473788040758e-158.34947576081516e-150.999999999999996
428.95158320562925e-161.79031664112585e-151
432.26142220583709e-164.52284441167417e-161
445.78393912593834e-171.15678782518767e-161
451.08088894302196e-172.16177788604391e-171
463.10145538010868e-186.20291076021736e-181
471.28053798966470e-182.56107597932940e-181
481.02229840148895e-182.04459680297790e-181
499.03835324941757e-191.80767064988351e-181
504.73554254443513e-199.47108508887027e-191
515.90284583743365e-191.18056916748673e-181
521.06309076366634e-182.12618152733269e-181
532.22582565382329e-184.45165130764658e-181
542.51453061830056e-185.02906123660112e-181
554.32544597199891e-188.65089194399782e-181
569.34677257035783e-181.86935451407157e-171
571.16029251890089e-172.32058503780177e-171
584.70455430969171e-179.40910861938343e-171
596.47087971969078e-171.29417594393816e-161
604.25762382359724e-178.51524764719448e-171
613.1949867275225e-176.389973455045e-171
622.26502340451146e-174.53004680902293e-171
635.4936819069854e-171.09873638139708e-161
641.34198046833590e-162.68396093667179e-161
651.60201829192070e-163.20403658384140e-161
665.42507736824333e-161.08501547364867e-151
672.86324180675846e-155.72648361351691e-150.999999999999997
681.94459292182849e-143.88918584365698e-140.99999999999998
698.50181412539746e-141.70036282507949e-130.999999999999915
701.84491284437922e-133.68982568875843e-130.999999999999815
714.23992432527825e-138.47984865055649e-130.999999999999576
724.66926665911313e-139.33853331822626e-130.999999999999533
735.65914716072277e-131.13182943214455e-120.999999999999434
744.93719390967793e-139.87438781935585e-130.999999999999506
754.74622760678002e-139.49245521356004e-130.999999999999525
761.30782940530446e-122.61565881060892e-120.999999999998692
775.08310163718688e-121.01662032743738e-110.999999999994917
783.2024736795388e-116.4049473590776e-110.999999999967975
793.81877395603373e-107.63754791206745e-100.999999999618123
803.59399590826126e-097.18799181652252e-090.999999996406004
811.03675906267600e-072.07351812535201e-070.999999896324094
821.50480090936069e-063.00960181872138e-060.99999849519909
832.89383185352590e-055.78766370705181e-050.999971061681465
841.78851971396527e-053.57703942793055e-050.99998211480286
858.99001916723703e-061.79800383344741e-050.999991009980833
864.25132766164832e-068.50265532329663e-060.999995748672338
872.10241885470461e-064.20483770940923e-060.999997897581145
881.16302185079410e-062.32604370158820e-060.99999883697815
891.22619193211801e-062.45238386423603e-060.999998773808068
905.39590701415312e-061.07918140283062e-050.999994604092986
914.42258707027308e-058.84517414054617e-050.999955774129297
920.002120176733420800.004240353466841610.997879823266579
930.2983136902881610.5966273805763210.701686309711839
940.4290103407560110.8580206815120220.570989659243989
950.4101783831270360.8203567662540720.589821616872964
960.3804111815163130.7608223630326250.619588818483688
970.3249482168521130.6498964337042270.675051783147887
980.2240347590414030.4480695180828070.775965240958597
990.1423876111270180.2847752222540370.857612388872982
1000.08261619935294770.1652323987058950.917383800647052


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level760.904761904761905NOK
5% type I error level760.904761904761905NOK
10% type I error level760.904761904761905NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/10kcrt1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/10kcrt1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/1x4mb1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/1x4mb1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/2pkij1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/2pkij1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/3kjiy1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/3kjiy1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/45gh91258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/45gh91258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/5xmio1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/5xmio1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/6ubd31258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/6ubd31258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/7tmyn1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/7tmyn1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/85g7d1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/85g7d1258726645.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/9ms9i1258726645.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t1258726737r8cxfhvqg02uzp6/9ms9i1258726645.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by