Home » date » 2008 » Dec » 10 »

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: Wed, 10 Dec 2008 13:35:05 -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/10/t1228941373xiygxw8bx4gr2nm.htm/, Retrieved Wed, 10 Dec 2008 20:36:13 +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/Dec/10/t1228941373xiygxw8bx4gr2nm.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:
2008-11-27 13:41:43 [a2386b643d711541400692649981f2dc] [reply
test

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
100 0 100 0 100 0 100,1 0 100 0 100 0 99,8 0 100 0 99,9 0 99,2 0 98,7 0 98,7 0 98,9 1 99,2 1 99,8 1 100,5 1 100,1 1 100,5 1 98,4 1 98,6 1 99 1 99,1 1 98,9 1 98,5 1 96,9 1 96,8 1 97 1 97 1 96,9 1 97,1 1 97,2 1 97,9 1 98,9 1 99,2 1 99,5 1 99,3 1 99,9 1 100 1 100,3 1 100,5 1 100,7 1 100,9 1 100,8 1 100,9 1 101 1 100,3 1 100,1 1 99,8 1 99,9 1 99,9 1 100,2 1 99,7 1 100,4 1 100,9 1 101,3 1 101,4 1 101,3 1 100,9 1 100,9 1 100,9 1 101,1 1 101,1 1 101,3 1 101,8 1 102,9 1 103,2 1 103,3 1 104,5 1 105 1 104,9 1 104,9 1 105,4 1 106 1 105,7 1 105,9 1 106,2 1 106,4 1 106,9 1 107,3 1 107,9 1 109,2 1 110,2 1 110,2 1 110,5 1 110,6 1 110,8 1 111,3 1 111,1 1 111,2 1 111,2 1 111,1 1 111,5 1 112,1 1 111,4 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 time7 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
Voeding[t] = + 97.9817316017316 -5.04878787878788x[t] + 0.737189754689754M1[t] + 0.590997474747473M2[t] + 0.707305194805193M3[t] + 0.673612914862912M4[t] + 0.714920634920636M5[t] + 0.806228354978355M6[t] + 0.447536075036072M7[t] + 0.713843795093796M8[t] + 1.00515151515151M9[t] + 0.683959235209236M10[t] + 0.185477994227995M11[t] + 0.17119227994228t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)97.98173160173160.912832107.338200
x-5.048787878787880.748778-6.742700
M10.7371897546897541.0218580.72140.4727540.236377
M20.5909974747474731.0214110.57860.5644780.282239
M30.7073051948051931.0210470.69270.4904880.245244
M40.6736129148629121.0207670.65990.5112080.255604
M50.7149206349206361.0205710.70050.4856410.24282
M60.8062283549783551.0204580.79010.4318250.215913
M70.4475360750360721.020430.43860.6621510.331075
M80.7138437950937961.0204850.69950.486260.24313
M91.005151515151511.0206240.98480.3276720.163836
M100.6839592352092361.0208480.670.5047930.252396
M110.1854779942279951.0538750.1760.8607420.430371
t0.171192279942280.00925218.503800


Multiple Linear Regression - Regression Statistics
Multiple R0.907516079871135
R-squared0.823585435224672
Adjusted R-squared0.794918068448682
F-TEST (value)28.7290228523687
F-TEST (DF numerator)13
F-TEST (DF denominator)80
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.97154340408979
Sum Squared Residuals310.958671536796


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110098.89011363636361.10988636363636
210098.91511363636361.08488636363637
310099.20261363636360.797386363636364
4100.199.34011363636360.759886363636359
510099.55261363636360.44738636363636
610099.81511363636360.184886363636360
799.899.62761363636360.172386363636364
8100100.065113636364-0.0651136363636372
999.9100.527613636364-0.62761363636363
1099.2100.377613636364-1.17761363636364
1198.7100.050324675325-1.35032467532468
1298.7100.036038961039-1.33603896103896
1398.995.89563311688313.00436688311689
1499.295.92063311688313.27936688311688
1599.896.20813311688313.59186688311688
16100.596.34563311688314.15436688311688
17100.196.55813311688313.54186688311688
18100.596.82063311688313.67936688311688
1998.496.63313311688311.76686688311689
2098.697.07063311688311.52936688311688
219997.53313311688311.46686688311688
2299.197.38313311688311.71686688311688
2398.997.05584415584421.84415584415585
2498.597.04155844155841.45844155844156
2596.997.9499404761905-1.04994047619047
2696.897.9749404761905-1.17494047619048
279798.2624404761905-1.26244047619048
289798.3999404761905-1.39994047619048
2996.998.6124404761905-1.71244047619048
3097.198.8749404761905-1.77494047619049
3197.298.6874404761905-1.48744047619047
3297.999.1249404761905-1.22494047619047
3398.999.5874404761905-0.687440476190472
3499.299.4374404761905-0.237440476190477
3599.599.11015151515150.389848484848482
3699.399.09586580086580.204134199134194
3799.9100.004247835498-0.104247835497830
38100100.029247835498-0.0292478354978352
39100.3100.316747835498-0.0167478354978383
40100.5100.4542478354980.0457521645021657
41100.7100.6667478354980.0332521645021633
42100.9100.929247835498-0.0292478354978325
43100.8100.7417478354980.0582521645021616
44100.9101.179247835498-0.279247835497833
45101101.641747835498-0.641747835497837
46100.3101.491747835498-1.19174783549784
47100.1101.164458874459-1.06445887445888
4899.8101.150173160173-1.35017316017316
4999.9102.058555194805-2.15855519480519
5099.9102.083555194805-2.18355519480519
51100.2102.371055194805-2.17105519480519
5299.7102.508555194805-2.80855519480519
53100.4102.721055194805-2.32105519480519
54100.9102.983555194805-2.08355519480519
55101.3102.796055194805-1.49605519480520
56101.4103.233555194805-1.83355519480519
57101.3103.696055194805-2.3960551948052
58100.9103.546055194805-2.64605519480519
59100.9103.218766233766-2.31876623376623
60100.9103.204480519481-2.30448051948052
61101.1104.112862554113-3.01286255411256
62101.1104.137862554113-3.03786255411256
63101.3104.425362554113-3.12536255411256
64101.8104.562862554113-2.76286255411255
65102.9104.775362554113-1.87536255411255
66103.2105.037862554113-1.83786255411255
67103.3104.850362554113-1.55036255411256
68104.5105.287862554113-0.787862554112556
69105105.750362554113-0.750362554112555
70104.9105.600362554113-0.700362554112551
71104.9105.273073593074-0.37307359307359
72105.4105.2587878787880.141212121212125
73106106.16716991342-0.167169913419916
74105.7106.19216991342-0.492169913419909
75105.9106.47966991342-0.579669913419907
76106.2106.61716991342-0.417169913419911
77106.4106.82966991342-0.429669913419912
78106.9107.09216991342-0.19216991341991
79107.3106.904669913420.395330086580084
80107.9107.342169913420.55783008658009
81109.2107.804669913421.39533008658009
82110.2107.654669913422.54533008658009
83110.2107.3273809523812.87261904761905
84110.5107.3130952380953.18690476190476
85110.6108.2214772727272.37852272727272
86110.8108.2464772727272.55352272727272
87111.3108.5339772727272.76602272727273
88111.1108.6714772727272.42852272727272
89111.2108.8839772727272.31602272727273
90111.2109.1464772727272.05352272727273
91111.1108.9589772727272.14102272727273
92111.5109.3964772727272.10352272727272
93112.1109.8589772727272.24102272727272
94111.4109.7089772727271.69102272727273


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.02871359094151520.05742718188303030.971286409058485
180.01461808635975250.02923617271950510.985381913640247
190.01226244354449280.02452488708898550.987737556455507
200.008094039187139680.01618807837427940.99190596081286
210.003319245674070810.006638491348141630.99668075432593
220.001469034207909780.002938068415819560.99853096579209
230.0008431789317795890.001686357863559180.99915682106822
240.0003548584451964660.0007097168903929320.999645141554804
250.0001131257961888410.0002262515923776820.999886874203811
263.60807666054723e-057.21615332109445e-050.999963919233395
271.11621919324614e-052.23243838649228e-050.999988837808068
284.55636185903359e-069.11272371806717e-060.99999544363814
291.35348771756488e-062.70697543512977e-060.999998646512282
303.77755378308584e-077.55510756617168e-070.999999622244622
314.91045198219056e-079.82090396438111e-070.999999508954802
321.42556664077621e-062.85113328155242e-060.99999857443336
331.74693669039924e-053.49387338079848e-050.999982530633096
340.0001957757205174920.0003915514410349840.999804224279482
350.00193333860573740.00386667721147480.998066661394263
360.006357285487832450.01271457097566490.993642714512168
370.0469444126126850.093888825225370.953055587387315
380.1104396821358960.2208793642717920.889560317864104
390.1854899655075960.3709799310151910.814510034492404
400.2822137407096390.5644274814192770.717786259290362
410.412966385381180.825932770762360.58703361461882
420.5628964417898660.8742071164202670.437103558210134
430.742369395547080.5152612089058390.257630604452920
440.8544335176234840.2911329647530320.145566482376516
450.9173360947348770.1653278105302460.082663905265123
460.9431140022610690.1137719954778630.0568859977389313
470.9541331248307970.09173375033840630.0458668751692032
480.9541200006055460.09175999878890770.0458799993944538
490.9518111884531540.0963776230936920.048188811546846
500.9531618352905630.09367632941887430.0468381647094371
510.9581477215037220.08370455699255580.0418522784962779
520.9525198673639130.09496026527217480.0474801326360874
530.9517103821175060.09657923576498820.0482896178824941
540.9623549265913580.07529014681728390.0376450734086419
550.9852476075210440.02950478495791180.0147523924789559
560.9917344403167860.01653111936642760.0082655596832138
570.9901513338055250.01969733238895060.00984866619447529
580.9853793802197460.02924123956050820.0146206197802541
590.9770478499032550.04590430019348940.0229521500967447
600.9694213490118660.06115730197626730.0305786509881336
610.962723487761570.07455302447685830.0372765122384291
620.9552668450936030.08946630981279420.0447331549063971
630.9542501068690680.09149978626186340.0457498931309317
640.9429059729829170.1141880540341650.0570940270170826
650.9226741645326360.1546516709347290.0773258354673645
660.8956411204534640.2087177590930730.104358879546536
670.8673396986271720.2653206027456570.132660301372828
680.8769852309301380.2460295381397240.123014769069862
690.8677228225607380.2645543548785240.132277177439262
700.84712910366630.3057417926673990.152870896333699
710.8428499544155310.3143000911689380.157150045584469
720.8364183169603030.3271633660793940.163581683039697
730.7961771203837720.4076457592324560.203822879616228
740.7640701208943440.4718597582113120.235929879105656
750.7672667815670430.4654664368659150.232733218432957
760.730618715879490.5387625682410210.269381284120511
770.6976824612857850.604635077428430.302317538714215


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level150.245901639344262NOK
5% type I error level240.39344262295082NOK
10% type I error level380.622950819672131NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/10ralw1228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/10ralw1228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/176f71228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/176f71228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/2ljga1228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/2ljga1228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/36ht81228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/36ht81228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/42sjr1228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/42sjr1228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/5sqnk1228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/5sqnk1228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/6yho51228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/6yho51228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/7zb4a1228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/7zb4a1228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/88cj91228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/88cj91228941292.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/96sqt1228941292.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228941373xiygxw8bx4gr2nm/96sqt1228941292.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