Home » date » 2008 » Nov » 27 »

fd

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 27 Nov 2008 05:34:45 -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/Nov/27/t12277893169xjjwulyi9elbze.htm/, Retrieved Thu, 27 Nov 2008 12:35:27 +0000
 
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/Nov/27/t12277893169xjjwulyi9elbze.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},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7,5 0 7,2 0 6,9 0 6,7 0 6,4 0 6,3 0 6,8 0 7,3 0 7,1 0 7,1 0 6,8 0 6,5 0 6,3 0 6,1 0 6,1 0 6,3 0 6,3 0 6 0 6,2 0 6,4 0 6,8 0 7,5 0 7,5 0 7,6 0 7,6 0 7,4 0 7,3 0 7,1 0 6,9 0 6,8 0 7,5 0 7,6 0 7,8 0 8,0 0 8,1 0 8,2 0 8,3 0 8,2 0 8,0 0 7,9 0 7,6 0 7,6 0 8,2 0 8,3 0 8,4 0 8,4 0 8,4 0 8,6 0 8,9 0 8,8 0 8,3 0 7,5 0 7,2 0 7,5 0 8,8 0 9,3 0 9,3 0 8,7 1 8,2 1 8,3 1 8,5 1 8,6 1 8,6 1 8,2 1 8,1 1 8,0 1 8,6 1 8,7 1 8,8 1 8,5 1 8,4 1 8,5 1 8,7 1 8,7 1 8,6 1 8,5 1 8,3 1 8,1 1 8,2 1 8,1 1 8,1 1 7,9 1 7,9 1 7,9 1 8,0 1 8,0 1 7,9 1 8,0 1 7,7 1 7,2 1 7,5 1 7,3 1 7,0 1 7,0 1 7,0 1 7,2 1 7,3 1 7,1 1 6,8 1 6,6 1 6,2 1 6,2 1 6,8 1 6,9 1 6.8 1
 
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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
w[t] = + 7.41527777777778 -0.118472222222222d[t] + 0.0891550925925951M1[t] -0.0311033950617277M2[t] -0.218028549382717M3[t] -0.416064814814815M4[t] -0.658545524691358M5[t] -0.778804012345679M6[t] -0.243506944444444M7[t] -0.108209876543209M8[t] -0.0951350308641968M9[t] + 0.0557947530864199M10[t] -0.0533526234567892M11[t] + 0.00914737654320988t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.415277777777780.32212423.019900
d-0.1184722222222220.309809-0.38240.7030530.351527
M10.08915509259259510.3836470.23240.8167580.408379
M2-0.03110339506172770.38354-0.08110.9355440.467772
M3-0.2180285493827170.383501-0.56850.5710810.285541
M4-0.4160648148148150.38353-1.08480.2808620.140431
M5-0.6585455246913580.383626-1.71660.0894480.044724
M6-0.7788040123456790.38379-2.02920.0453550.022677
M7-0.2435069444444440.384023-0.63410.5276090.263805
M8-0.1082098765432090.384322-0.28160.778920.38946
M9-0.09513503086419680.384689-0.24730.805230.402615
M100.05579475308641990.3946520.14140.8878840.443942
M11-0.05335262345678920.394553-0.13520.8927340.446367
t0.009147376543209880.0051011.79320.0762590.03813


Multiple Linear Regression - Regression Statistics
Multiple R0.427982147905556
R-squared0.183168718925853
Adjusted R-squared0.0664785359152604
F-TEST (value)1.56970118822443
F-TEST (DF numerator)13
F-TEST (DF denominator)91
p-value0.108650123530041
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.78903966168285
Sum Squared Residuals56.6551064814815


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
17.57.51358024691357-0.0135802469135677
27.27.40246913580247-0.202469135802471
36.97.22469135802469-0.324691358024693
46.77.0358024691358-0.335802469135804
56.46.80246913580247-0.402469135802467
66.36.69135802469136-0.391358024691359
76.87.2358024691358-0.435802469135802
87.37.38024691358025-0.080246913580246
97.17.40246913580247-0.30246913580247
107.17.5625462962963-0.462546296296297
116.87.4625462962963-0.662546296296297
126.57.5250462962963-1.02504629629629
136.37.6233487654321-1.3233487654321
146.17.51223765432099-1.41223765432099
156.17.33445987654321-1.23445987654321
166.37.14557098765432-0.845570987654321
176.36.91223765432099-0.612237654320989
1866.80112654320988-0.801126543209877
196.27.34557098765432-1.14557098765432
206.47.49001543209877-1.09001543209877
216.87.51223765432099-0.712237654320988
227.57.67231481481481-0.172314814814815
237.57.57231481481482-0.072314814814815
247.67.63481481481481-0.0348148148148148
257.67.73311728395062-0.133117283950619
267.47.6220061728395-0.222006172839506
277.37.44422839506173-0.144228395061729
287.17.25533950617284-0.155339506172840
296.97.02200617283951-0.122006172839506
306.86.9108950617284-0.110895061728395
317.57.455339506172840.0446604938271603
327.67.599783950617280.000216049382715459
337.87.62200617283950.177993827160493
3487.782083333333330.217916666666666
358.17.682083333333330.417916666666666
368.27.744583333333330.455416666666666
378.37.842885802469140.457114197530863
388.27.731774691358020.468225308641975
3987.553996913580250.446003086419753
407.97.365108024691360.534891975308642
417.67.131774691358030.468225308641974
427.67.020663580246910.579336419753086
438.27.565108024691360.634891975308641
448.37.70955246913580.590447530864198
458.47.731774691358020.668225308641976
468.47.891851851851850.508148148148148
478.47.791851851851850.608148148148148
488.67.854351851851850.745648148148148
498.97.952654320987660.947345679012345
508.87.841543209876540.958456790123458
518.37.663765432098770.636234567901236
527.57.474876543209880.0251234567901237
537.27.24154320987654-0.0415432098765432
547.57.130432098765430.369567901234568
558.87.674876543209881.12512345679012
569.37.819320987654321.48067901234568
579.37.841543209876541.45845679012346
588.77.883148148148150.81685185185185
598.27.783148148148150.416851851851851
608.37.845648148148150.454351851851853
618.57.943950617283950.556049382716048
628.67.832839506172840.76716049382716
638.67.655061728395060.944938271604938
648.27.466172839506170.733827160493827
658.17.232839506172840.86716049382716
6687.121728395061730.878271604938271
678.67.666172839506170.933827160493827
688.77.810617283950620.889382716049382
698.87.832839506172840.96716049382716
708.57.992916666666670.507083333333333
718.47.892916666666670.507083333333334
728.57.955416666666670.544583333333334
738.78.053719135802470.646280864197529
748.77.942608024691360.757391975308642
758.67.764830246913580.83516975308642
768.57.575941358024690.924058641975309
778.37.342608024691360.957391975308642
788.17.231496913580250.868503086419753
798.27.775941358024690.424058641975308
808.17.920385802469140.179614197530864
818.17.942608024691360.157391975308642
827.98.10268518518519-0.202685185185185
837.98.00268518518518-0.102685185185185
847.98.06518518518518-0.165185185185184
8588.16348765432099-0.163487654320989
8688.05237654320988-0.0523765432098761
877.97.87459876543210.0254012345679019
8887.685709876543210.314290123456791
897.77.452376543209880.247623456790124
907.27.34126543209876-0.141265432098765
917.57.88570987654321-0.385709876543209
927.38.03015432098765-0.730154320987654
9378.05237654320988-1.05237654320988
9478.2124537037037-1.21245370370370
9578.1124537037037-1.11245370370370
967.28.1749537037037-0.974953703703703
977.38.2732561728395-0.973256172839508
987.18.1621450617284-1.06214506172839
996.87.98436728395062-1.18436728395062
1006.67.79547839506173-1.19547839506173
1016.27.5621450617284-1.36214506172839
1026.27.45103395061728-1.25103395061728
1036.87.99547839506173-1.19547839506173
1046.98.13992283950617-1.23992283950617
1056.88.1621450617284-1.36214506172839


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.1515851447865210.3031702895730420.848414855213479
180.08814373449442340.1762874689888470.911856265505577
190.04479729586401830.08959459172803670.955202704135982
200.02709101503052350.0541820300610470.972908984969477
210.01941560418731980.03883120837463960.98058439581268
220.0551819397214670.1103638794429340.944818060278533
230.1367352120489490.2734704240978980.863264787951051
240.3186127284946360.6372254569892730.681387271505364
250.4253566659680910.8507133319361830.574643334031909
260.5062775007151420.9874449985697150.493722499284858
270.5664641924112520.8670716151774970.433535807588748
280.5832315779004990.8335368441990030.416768422099501
290.596155969045920.807688061908160.40384403095408
300.6358636095536860.7282727808926270.364136390446314
310.7214561151555050.557087769688990.278543884844495
320.7787205759759440.4425588480481120.221279424024056
330.8253558761046330.3492882477907340.174644123895367
340.8124796405608080.3750407188783830.187520359439192
350.8042865269443070.3914269461113870.195713473055693
360.8163773529314650.3672452941370710.183622647068535
370.8192157205074290.3615685589851420.180784279492571
380.83809962344010.32380075311980.1619003765599
390.8513747638851520.2972504722296960.148625236114848
400.8491915623721280.3016168752557450.150808437627872
410.8478771069070510.3042457861858980.152122893092949
420.849412975755060.3011740484898790.150587024244940
430.8608081099638810.2783837800722370.139191890036119
440.865654620935240.2686907581295200.134345379064760
450.8593639478170640.2812721043658730.140636052182936
460.823762522553980.3524749548920390.176237477446020
470.7786547731472740.4426904537054520.221345226852726
480.7322901916956540.5354196166086910.267709808304346
490.689015433802490.621969132395020.31098456619751
500.6467999930740650.7064000138518690.353200006925935
510.5932855366278550.813428926744290.406714463372145
520.7283008481772290.5433983036455420.271699151822771
530.9096862911827090.1806274176345820.0903137088172912
540.9666310792178830.06673784156423340.0333689207821167
550.9683795379697970.0632409240604050.0316204620302025
560.9669464532224840.06610709355503170.0330535467775159
570.9604439004389820.07911219912203560.0395560995610178
580.9467243858153330.1065512283693330.0532756141846667
590.9605383782350540.07892324352989160.0394616217649458
600.973905903530280.05218819293944180.0260940964697209
610.9837984931036020.03240301379279580.0162015068963979
620.9876667046740570.02466659065188520.0123332953259426
630.988552601009540.02289479798092040.0114473989904602
640.9971902826990570.005619434601886820.00280971730094341
650.9992165907960740.001566818407853030.000783409203926513
660.999779248486770.0004415030264594240.000220751513229712
670.9998285291393040.0003429417213917560.000171470860695878
680.9997775201941010.0004449596117984280.000222479805899214
690.9995485265647050.0009029468705889470.000451473435294474
700.999297135652990.001405728694022320.000702864347011158
710.9990710620206450.001857875958709410.000928937979354707
720.99877055668870.002458886622599950.00122944331129997
730.9980554472544620.003889105491075660.00194455274553783
740.9964035645993550.007192870801289970.00359643540064498
750.9931739774126490.01365204517470250.00682602258735126
760.9874197242694960.02516055146100840.0125802757305042
770.978447937676280.04310412464744070.0215520623237203
780.9666774404358170.06664511912836680.0333225595641834
790.9552826795865290.08943464082694180.0447173204134709
800.9528664662666670.09426706746666520.0471335337333326
810.939341138552670.1213177228946590.0606588614473294
820.9262418959107550.1475162081784910.0737581040892454
830.89803752048850.2039249590229990.101962479511499
840.8623552527307160.2752894945385680.137644747269284
850.81485713137670.3702857372465980.185142868623299
860.7278757510180870.5442484979638270.272124248981913
870.6199797587950870.7600404824098260.380020241204913
880.5757290970586120.8485418058827770.424270902941388


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level110.152777777777778NOK
5% type I error level180.25NOK
10% type I error level290.402777777777778NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/102e3o1227789280.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/102e3o1227789280.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/1b5zg1227789279.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/1b5zg1227789279.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/27l221227789279.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/27l221227789279.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/38h2b1227789279.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/38h2b1227789279.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/4icuf1227789279.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/4icuf1227789279.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/54o0l1227789279.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/54o0l1227789279.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/6euvj1227789279.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/6euvj1227789279.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/7sy5a1227789280.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/7sy5a1227789280.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/8cy8u1227789280.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/8cy8u1227789280.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/9t2q01227789280.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277893169xjjwulyi9elbze/9t2q01227789280.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