Home » date » 2008 » Dec » 10 »

Multiple Regression Voeding

*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:18:27 -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/t1228940410p6dusvsu56y1i3u.htm/, Retrieved Wed, 10 Dec 2008 20:20:31 +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/t1228940410p6dusvsu56y1i3u.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'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 97.9817316017316 -5.04878787878789x[t] + 0.73718975468977M1[t] + 0.590997474747472M2[t] + 0.707305194805191M3[t] + 0.673612914862913M4[t] + 0.714920634920636M5[t] + 0.806228354978354M6[t] + 0.447536075036072M7[t] + 0.713843795093795M8[t] + 1.00515151515151M9[t] + 0.683959235209236M10[t] + 0.185477994227994M11[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.048787878787890.748778-6.742700
M10.737189754689771.0218580.72140.4727540.236377
M20.5909974747474721.0214110.57860.5644780.282239
M30.7073051948051911.0210470.69270.4904880.245244
M40.6736129148629131.0207670.65990.5112080.255604
M50.7149206349206361.0205710.70050.4856410.24282
M60.8062283549783541.0204580.79010.4318250.215913
M70.4475360750360721.020430.43860.6621510.331075
M80.7138437950937951.0204850.69950.486260.24313
M91.005151515151511.0206240.98480.3276720.163836
M100.6839592352092361.0208480.670.5047930.252396
M110.1854779942279941.0538750.1760.8607420.430371
t0.171192279942280.00925218.503800


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


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110098.89011363636351.10988636363646
210098.91511363636361.08488636363636
310099.20261363636370.797386363636349
4100.199.34011363636360.759886363636355
510099.55261363636360.447386363636355
610099.81511363636360.184886363636351
799.899.62761363636360.172386363636356
8100100.065113636364-0.0651136363636464
999.9100.527613636364-0.627613636363639
1099.2100.377613636364-1.17761363636364
1198.7100.050324675325-1.35032467532468
1298.7100.036038961039-1.33603896103897
1398.995.89563311688313.00436688311687
1499.295.92063311688313.27936688311689
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.04994047619049
2696.897.9749404761905-1.17494047619048
279798.2624404761905-1.26244047619047
289798.3999404761905-1.39994047619047
2996.998.6124404761905-1.71244047619047
3097.198.8749404761905-1.77494047619048
3197.298.6874404761905-1.48744047619047
3297.999.1249404761905-1.22494047619047
3398.999.5874404761905-0.687440476190472
3499.299.4374404761905-0.237440476190475
3599.599.11015151515150.389848484848482
3699.399.09586580086580.204134199134197
3799.9100.004247835498-0.104247835497844
38100100.029247835498-0.0292478354978354
39100.3100.316747835498-0.0167478354978377
40100.5100.4542478354980.045752164502166
41100.7100.6667478354980.0332521645021633
42100.9100.929247835498-0.0292478354978318
43100.8100.7417478354980.0582521645021621
44100.9101.179247835498-0.279247835497832
45101101.641747835498-0.641747835497838
46100.3101.491747835498-1.19174783549784
47100.1101.164458874459-1.06445887445888
4899.8101.150173160173-1.35017316017316
4999.9102.058555194805-2.15855519480520
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.30448051948051
61101.1104.112862554113-3.01286255411257
62101.1104.137862554113-3.03786255411256
63101.3104.425362554113-3.12536255411255
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.70036255411255
71104.9105.273073593074-0.373073593073589
72105.4105.2587878787880.141212121212128
73106106.16716991342-0.167169913419928
74105.7106.19216991342-0.49216991341991
75105.9106.47966991342-0.579669913419906
76106.2106.61716991342-0.417169913419908
77106.4106.82966991342-0.429669913419909
78106.9107.09216991342-0.192169913419907
79107.3106.904669913420.395330086580087
80107.9107.342169913420.557830086580092
81109.2107.804669913421.39533008658009
82110.2107.654669913422.54533008658009
83110.2107.3273809523812.87261904761905
84110.5107.3130952380953.18690476190477
85110.6108.2214772727272.37852272727271
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.10352272727273
93112.1109.8589772727272.24102272727272
94111.4109.7089772727271.69102272727273


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.02871359094151980.05742718188303960.97128640905848
180.01461808635975360.02923617271950720.985381913640246
190.01226244354449180.02452488708898370.987737556455508
200.008094039187139030.01618807837427810.99190596081286
210.003319245674071030.006638491348142070.996680754325929
220.001469034207909680.002938068415819360.99853096579209
230.000843178931779490.001686357863558980.99915682106822
240.0003548584451964900.0007097168903929790.999645141554804
250.0001131257961888580.0002262515923777170.999886874203811
263.60807666054802e-057.21615332109604e-050.999963919233394
271.11621919324618e-052.23243838649237e-050.999988837808067
284.55636185903394e-069.11272371806788e-060.99999544363814
291.35348771756491e-062.70697543512983e-060.999998646512282
303.77755378308648e-077.55510756617296e-070.999999622244622
314.91045198219127e-079.82090396438254e-070.999999508954802
321.42556664077622e-062.85113328155245e-060.99999857443336
331.74693669039918e-053.49387338079837e-050.999982530633096
340.0001957757205174850.000391551441034970.999804224279482
350.001933338605737230.003866677211474470.998066661394263
360.006357285487832950.01271457097566590.993642714512167
370.04694441261268130.09388882522536270.953055587387319
380.1104396821358950.2208793642717900.889560317864105
390.1854899655075890.3709799310151770.814510034492411
400.2822137407096380.5644274814192760.717786259290362
410.4129663853811770.8259327707623530.587033614618823
420.5628964417898740.8742071164202510.437103558210126
430.7423693955470810.5152612089058370.257630604452919
440.8544335176235160.2911329647529670.145566482376484
450.917336094734880.165327810530240.08266390526512
460.9431140022610660.1137719954778670.0568859977389336
470.9541331248308050.09173375033839050.0458668751691953
480.9541200006055430.0917599987889140.045879999394457
490.951811188453150.09637762309370160.0481888115468508
500.9531618352905660.0936763294188680.046838164709434
510.9581477215037250.08370455699255070.0418522784962753
520.9525198673639130.09496026527217360.0474801326360868
530.9517103821175030.09657923576499310.0482896178824966
540.9623549265913520.07529014681729550.0376450734086478
550.9852476075210450.02950478495791020.0147523924789551
560.9917344403167870.01653111936642520.0082655596832126
570.9901513338055240.01969733238895130.00984866619447566
580.9853793802197450.02924123956051010.0146206197802550
590.9770478499032580.04590430019348430.0229521500967421
600.9694213490118660.06115730197626710.0305786509881335
610.962723487761570.07455302447685940.0372765122384297
620.9552668450936050.08946630981278940.0447331549063947
630.9542501068690650.09149978626186960.0457498931309348
640.9429059729829160.1141880540341690.0570940270170843
650.9226741645326340.1546516709347320.0773258354673659
660.8956411204534650.2087177590930700.104358879546535
670.8673396986271740.2653206027456510.132660301372826
680.8769852309301390.2460295381397230.123014769069861
690.8677228225607360.2645543548785280.132277177439264
700.8471291036662920.3057417926674150.152870896333708
710.8428499544155260.3143000911689490.157150045584474
720.8364183169603030.3271633660793940.163581683039697
730.7961771203837720.4076457592324560.203822879616228
740.7640701208943410.4718597582113170.235929879105659
750.767266781567040.465466436865920.23273321843296
760.7306187158794890.5387625682410220.269381284120511
770.6976824612857790.6046350774284430.302317538714221


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/1u0l91228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/1u0l91228940300.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/232kv1228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/232kv1228940300.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/3r44k1228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/3r44k1228940300.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/4y14r1228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/4y14r1228940300.ps (open in new window)


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


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


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/77q351228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/77q351228940300.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/8ffe41228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/8ffe41228940300.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/9s2ed1228940300.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/10/t1228940410p6dusvsu56y1i3u/9s2ed1228940300.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = 1 ; par3 = 0 ; par4 = 12 ; par5 = 1 ; par6 = 1 ; par7 = 0 ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ; par4 = 12 ; par5 = 1 ; par6 = 1 ; par7 = 0 ;
 
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