Home » date » 2008 » Dec » 13 »

Multiple regression

*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: Sat, 13 Dec 2008 08:07:42 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69.htm/, Retrieved Sat, 13 Dec 2008 16:14:11 +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/2008/Dec/13/t1229181242dgjcgcur9tkbv69.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
32,68 10967,87 31,54 10433,56 32,43 10665,78 26,54 10666,71 25,85 10682,74 27,6 10777,22 25,71 10052,6 25,38 10213,97 28,57 10546,82 27,64 10767,2 25,36 10444,5 25,9 10314,68 26,29 9042,56 21,74 9220,75 19,2 9721,84 19,32 9978,53 19,82 9923,81 20,36 9892,56 24,31 10500,98 25,97 10179,35 25,61 10080,48 24,67 9492,44 25,59 8616,49 26,09 8685,4 28,37 8160,67 27,34 8048,1 24,46 8641,21 27,46 8526,63 30,23 8474,21 32,33 7916,13 29,87 7977,64 24,87 8334,59 25,48 8623,36 27,28 9098,03 28,24 9154,34 29,58 9284,73 26,95 9492,49 29,08 9682,35 28,76 9762,12 29,59 10124,63 30,7 10540,05 30,52 10601,61 32,67 10323,73 33,19 10418,4 37,13 10092,96 35,54 10364,91 37,75 10152,09 41,84 10032,8 42,94 10204,59 49,14 10001,6 44,61 10411,75 40,22 10673,38 44,23 10539,51 45,85 10723,78 53,38 10682,06 53,26 10283,19 51,8 10377,18 55,3 10486,64 57,81 10545,38 63,96 10554,27 63,77 10532,54 59,15 10324,31 56,12 10695,25 57,42 10827,81 63,52 10872,48 61,71 10971,19 63,01 11145,65 68,18 11234,68 72,03 11333,88 69,75 10997,97 74,41 11036,89 74,33 11257,35 64,24 11533,59 60,03 11963,12 59,44 12185,15 62,5 12377,62 55,04 12512,89 58,34 12631,48 61,92 12268,53 67,65 12754,8 67,68 13407,75 70,3 13480,21 75,26 13673,28 71,44 13239,71 76,36 13557,69 81,71 13901,28 92,6 13200,58 90,6 13406,97 92,23 12538,12 94,09 12419,57 102,79 12193,88 109,65 12656,63 124,05 12812,48 132,69 12056,67 135,81 11322,38 116,07 11530,75 101,42 11114,08 75,73 9181,73 55,48 8614,55
 
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'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Olieprijs[t] = -91.0219947586744 + 0.0132666552699718DowJones[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-91.021994758674415.3699-5.922100
DowJones0.01326665526997180.001439.277900


Multiple Linear Regression - Regression Statistics
Multiple R0.6856927421105
R-squared0.470174536583017
Adjusted R-squared0.46471241840346
F-TEST (value)86.0791585108454
F-TEST (DF numerator)1
F-TEST (DF denominator)97
p-value4.88498130835069e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation20.046807600406
Sum Squared Residuals38981.8260118664


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
132.6854.4849555771916-21.8049555771916
231.5447.396448999893-15.8564489998930
332.4350.4772316866859-18.0472316866859
426.5450.489569676087-23.9495696760870
525.8550.7022341600646-24.8522341600646
627.651.9556677499716-24.3556677499715
725.7142.3423840082446-16.6323840082446
825.3844.4832241691599-19.1032241691599
928.5748.89903037577-20.3290303757700
1027.6451.8227358641664-24.1827358641664
1125.3647.5415862085465-22.1815862085465
1225.945.8193090213988-19.9193090213988
1326.2928.9425315193622-2.65253151936219
1421.7431.3065168219185-9.56651682191848
1519.237.9543051111487-18.7543051111487
1619.3241.3597228523978-22.0397228523978
1719.8240.6337714760249-20.8137714760249
1820.3640.2191884988383-19.8591884988383
1924.3148.2908868981945-23.9808868981945
2025.9744.0239325637135-18.0539325637135
2125.6142.7122583571714-17.1022583571714
2224.6734.9109343922171-10.2409343922171
2325.5923.29000770848532.29999229151471
2426.0924.20421292313901.88578707686096
2528.3717.242800903326711.1271990966733
2627.3415.74937351958611.5906264804140
2724.4623.6179594267590.842040573241023
2827.4622.09786606592565.36213393407439
2930.2321.40242799667378.82757200332632
3032.3313.998573023607818.3314269763922
3129.8714.814604989263815.0553950107362
3224.8719.55013758788025.31986241211978
3325.4823.381149630192.09885036981
3427.2829.6784328871875-2.39843288718754
3528.2430.4254782454396-2.18547824543965
3629.5832.1553174260913-2.57531742609127
3726.9534.9115977249806-7.96159772498062
3829.0837.4304048945375-8.35040489453749
3928.7638.4886859854231-9.72868598542315
4029.5943.2979811873406-13.7079811873406
4130.748.8092151195923-18.1092151195923
4230.5249.6259104180118-19.1059104180118
4332.6745.939372251592-13.2693722515920
4433.1947.1953265060003-14.0053265060003
4537.1342.8778262149406-5.74782621494061
4635.5446.4856931156095-10.9456931156095
4737.7543.6622835410541-5.91228354105406
4841.8442.0797042338991-0.239704233899102
4942.9444.3587829427276-1.41878294272758
5049.1441.6657845894767.474215410524
5144.6147.1071032484549-2.49710324845495
5240.2250.5780582667377-10.3580582667377
5344.2348.8020511257466-4.57205112574656
5445.8551.2466976923443-5.39669769234427
5553.3850.6932128344812.68678716551897
5653.2645.40154204694747.85845795305262
5751.846.6484749757725.15152502422797
5855.348.10064306162317.19935693837687
5957.8148.87992639218138.93007360781873
6063.9648.997866957531314.9621330424687
6163.7748.709582538514915.0604174614851
6259.1545.947066911648613.2029330883514
6356.1250.8682000174925.25179998250803
6457.4252.62682784007944.79317215992057
6563.5253.219449330989110.3005506690109
6661.7154.5290008726887.180999127312
6763.0156.84350155108736.16649844891272
6868.1858.024631869772910.1553681302271
6972.0359.340684072554112.6893159274459
7069.7554.884281900817814.8657180991822
7174.4155.400620123925119.0093798760749
7274.3358.325386944743116.0046130552569
7364.2461.99016779652022.24983220347983
7460.0367.6885942346312-7.65859423463118
7559.4470.634189704223-11.1941897042230
7662.573.1876228440345-10.6876228440345
7755.0474.9822033024036-19.9422033024036
7858.3476.5554959508696-18.2154959508696
7961.9271.7403634206333-9.82036342063329
8067.6578.1915398787625-10.5415398787625
8167.6886.8540024372906-19.1740024372906
8270.387.8153042781528-17.5153042781528
8375.2690.3766974111262-15.1166974111262
8471.4484.6246736857245-13.1846736857245
8576.3688.8432047284702-12.4832047284702
8681.7193.4014948126798-11.6914948126798
8792.684.10554946501058.49445053498946
8890.686.843654446183.75634555381997
8992.2375.31692101486516.913078985135
9094.0973.744159032609820.3458409673902
91102.7970.750007604729932.0399923952701
92109.6576.889152330909332.7608476690907
93124.0578.956760554734545.0932394452655
94132.6968.92968983513763.760310164863
95135.8159.188117536949476.6218824630506
96116.0761.952490495553454.1175095044465
97101.4256.424673244214344.9953267557857
9875.7330.788851933284244.9411480667158
9955.4823.264270397261532.2157296027385


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.009327889598252230.01865577919650450.990672110401748
60.001821574494506720.003643148989013440.998178425505493
70.0003019532016319450.0006039064032638890.999698046798368
84.88576203897938e-059.77152407795876e-050.99995114237961
96.74527373850741e-061.34905474770148e-050.999993254726262
101.15133237740779e-062.30266475481559e-060.999998848667623
112.22062017883440e-074.44124035766879e-070.999999777937982
123.05627038676783e-086.11254077353566e-080.999999969437296
138.79075708775795e-091.75815141755159e-080.999999991209243
141.86225272060819e-093.72450544121638e-090.999999998137747
152.29592746022157e-094.59185492044314e-090.999999997704073
162.41642629921222e-094.83285259842445e-090.999999997583574
171.22883064180320e-092.45766128360641e-090.99999999877117
184.24414659726153e-108.48829319452307e-100.999999999575585
191.16461097149908e-102.32922194299816e-100.999999999883539
202.29222297928963e-114.58444595857926e-110.999999999977078
214.46357220400291e-128.92714440800582e-120.999999999995536
221.04509486236769e-122.09018972473539e-120.999999999998955
238.15907267971364e-131.63181453594273e-120.999999999999184
243.15957659725210e-136.31915319450421e-130.999999999999684
252.55263928973565e-135.1052785794713e-130.999999999999745
267.73091753291321e-141.54618350658264e-130.999999999999923
271.35857939899368e-142.71715879798735e-140.999999999999986
283.15142714039660e-156.30285428079319e-150.999999999999997
291.49396531104728e-152.98793062209455e-150.999999999999998
301.31589065174373e-152.63178130348746e-150.999999999999999
313.49904724667506e-166.99809449335013e-161
326.73714173516559e-171.34742834703312e-161
331.19575912272439e-172.39151824544877e-171
342.16407400681091e-184.32814801362181e-181
354.285314917236e-198.570629834472e-191
361.09980311561590e-192.19960623123179e-191
372.08865111554660e-204.17730223109319e-201
385.32815137839852e-211.06563027567970e-201
391.32761816888743e-212.65523633777487e-211
404.52324572647249e-229.04649145294498e-221
412.48577357329243e-224.97154714658486e-221
421.32938308993346e-222.65876617986691e-221
431.30208747028193e-222.60417494056387e-221
441.50143222030686e-223.00286444061371e-221
451.00748662930387e-212.01497325860774e-211
462.10909430694302e-214.21818861388604e-211
479.61438940676912e-211.92287788135382e-201
482.37089486810563e-194.74178973621126e-191
494.11826793735065e-188.2365358747013e-181
506.15057981096615e-161.23011596219323e-151
513.62059054626058e-157.24118109252116e-150.999999999999996
526.04548076442821e-151.20909615288564e-140.999999999999994
532.03709815901611e-144.07419631803223e-140.99999999999998
547.5992720459085e-141.5198544091817e-130.999999999999924
551.30283516470309e-122.60567032940618e-120.999999999998697
561.34504341515884e-112.69008683031769e-110.99999999998655
576.06838424001425e-111.21367684800285e-100.999999999939316
583.49932369150609e-106.99864738301219e-100.999999999650068
591.99540316966616e-093.99080633933233e-090.999999998004597
601.98447813463368e-083.96895626926735e-080.999999980155219
611.04860242420405e-072.09720484840811e-070.999999895139758
622.59217062541461e-075.18434125082923e-070.999999740782938
633.8972949083206e-077.7945898166412e-070.99999961027051
645.71116611267081e-071.14223322253416e-060.999999428883389
651.07324039418405e-062.1464807883681e-060.999998926759606
661.54880402509400e-063.09760805018799e-060.999998451195975
672.03643741056712e-064.07287482113424e-060.99999796356259
682.95857780500068e-065.91715561000136e-060.999997041422195
694.36573311094871e-068.73146622189742e-060.99999563426689
706.19637590001591e-061.23927518000318e-050.9999938036241
719.78636715803816e-061.95727343160763e-050.999990213632842
721.16375883465191e-052.32751766930382e-050.999988362411653
739.9650933343207e-061.99301866686414e-050.999990034906666
749.45457649372108e-061.89091529874422e-050.999990545423506
759.98949971247623e-061.99789994249525e-050.999990010500287
769.5642502652271e-061.91285005304542e-050.999990435749735
771.87129580050215e-053.7425916010043e-050.999981287041995
783.22454606654716e-056.44909213309432e-050.999967754539335
794.88682429205454e-059.77364858410908e-050.99995113175708
805.59296344684277e-050.0001118592689368550.999944070365532
817.58318919889454e-050.0001516637839778910.99992416810801
820.0001046615943974720.0002093231887949440.999895338405603
830.0001300095035769780.0002600190071539570.999869990496423
840.0002886880039008930.0005773760078017850.9997113119961
850.0007136477782794060.001427295556558810.99928635222172
860.002571007048774030.005142014097548060.997428992951226
870.004642378358822670.009284756717645350.995357621641177
880.01917949275208920.03835898550417840.98082050724791
890.05149552641096930.1029910528219390.94850447358903
900.1434826053642420.2869652107284830.856517394635758
910.22104580094880.44209160189760.7789541990512
920.4328007946792540.8656015893585080.567199205320746
930.6542371987257130.6915256025485730.345762801274287
940.5712330957981750.857533808403650.428766904201825


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level820.911111111111111NOK
5% type I error level840.933333333333333NOK
10% type I error level840.933333333333333NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/103iik1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/103iik1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/17fx71229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/17fx71229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/221be1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/221be1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/3lmpl1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/3lmpl1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/45gpn1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/45gpn1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/5ahrg1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/5ahrg1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/6e1cm1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/6e1cm1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/7z7211229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/7z7211229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/8xoqk1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/8xoqk1229180856.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/94qti1229180856.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t1229181242dgjcgcur9tkbv69/94qti1229180856.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No 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