Home » date » 2008 » Dec » 22 »

VFD

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 22 Dec 2008 02:33:54 -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/22/t1229938553v80x2ad4ril1f2b.htm/, Retrieved Mon, 22 Dec 2008 10:35:54 +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/22/t1229938553v80x2ad4ril1f2b.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 «
485 0 464 0 460 0 467 0 460 0 448 0 443 0 436 0 431 0 484 0 510 0 513 0 503 0 471 0 471 0 476 0 475 0 470 0 461 0 455 0 456 0 517 0 525 0 523 0 519 0 509 0 512 0 519 0 517 0 510 0 509 0 501 0 507 0 569 0 580 0 578 0 565 1 547 1 555 1 562 1 561 1 555 1 544 1 537 1 543 1 594 1 611 1 613 1 611 1 594 1 595 1 591 1 589 1 584 1 573 1 567 1 569 1 621 1 629 1 628 1 612 1 595 1 597 1 593 1 590 1 580 1 574 1 573 1 573 1 620 1 626 1 620 1 588 1 566 1 557 1 561 1 549 1 532 1 526 1 511 1 499 1 555 1 565 1 542 1 527 1 510 1 514 1 517 1 508 1 493 1 490 1 469 1 478 1 528 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 time8 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 544.98245362402 + 99.8637884872825D[t] -30.8934816647542M1[t] -49.5561830655957M2[t] -48.3438844664372M3[t] -44.6315858672786M4[t] -48.6692872681201M5[t] -57.7069886689615M6[t] -63.619690069803M7[t] -71.9073914706445M8[t] -70.445092871486M9[t] -15.8577942723274M10[t] + 3.55555854369861M11[t] -0.58729859915854t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)544.9824536240213.56992840.16100
D99.863788487282512.7471787.834200
M1-30.893481664754216.622932-1.85850.0667780.033389
M2-49.556183065595716.600708-2.98520.0037590.001879
M3-48.343884466437216.581625-2.91550.0046050.002303
M4-44.631585867278616.565695-2.69420.0085950.004297
M5-48.669287268120116.552926-2.94020.0042870.002143
M6-57.706988668961516.543325-3.48820.0007930.000397
M7-63.61969006980316.536898-3.84710.0002390.00012
M8-71.907391470644516.53365-4.34924e-052e-05
M9-70.44509287148616.53358-4.26075.5e-052.8e-05
M10-15.857794272327416.536691-0.95890.3404750.170238
M113.5555585436986117.072850.20830.8355570.417778
t-0.587298599158540.229296-2.56130.0123060.006153


Multiple Linear Regression - Regression Statistics
Multiple R0.822840737610512
R-squared0.677066879471412
Adjusted R-squared0.624590247385517
F-TEST (value)12.9022548238836
F-TEST (DF numerator)13
F-TEST (DF denominator)80
p-value9.9920072216264e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation31.937496325344
Sum Squared Residuals81600.293722509


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1485513.501673360107-28.5016733601068
2464494.251673360107-30.2516733601070
3460494.876673360107-34.8766733601071
4467498.001673360107-31.0016733601071
5460493.376673360107-33.3766733601071
6448483.751673360107-35.7516733601071
7443477.251673360107-34.2516733601071
8436468.376673360107-32.3766733601071
9431469.251673360107-38.2516733601071
10484523.251673360107-39.2516733601071
11510542.077727576975-32.0777275769745
12513537.934870434117-24.9348704341174
13503506.454090170205-3.45409017020467
14471487.204090170205-16.2040901702046
15471487.829090170205-16.8290901702046
16476490.954090170205-14.9540901702046
17475486.329090170205-11.3290901702046
18470476.704090170205-6.70409017020463
19461470.204090170205-9.20409017020463
20455461.329090170205-6.32909017020463
21456462.204090170205-6.20409017020463
22517516.2040901702050.795909829795377
23525535.030144387072-10.0301443870721
24523530.887287244215-7.88728724421495
25519499.40650698030219.5934930196978
26509480.15650698030228.8434930196978
27512480.78150698030231.2184930196978
28519483.90650698030235.0934930196978
29517479.28150698030237.7184930196978
30510469.65650698030240.3434930196979
31509463.15650698030245.8434930196978
32501454.28150698030246.7184930196978
33507455.15650698030251.8434930196978
34569509.15650698030259.8434930196978
35580527.9825611971752.0174388028304
36578523.83970405431354.1602959456875
37565592.222712277682-27.2227122776822
38547572.972712277682-25.9727122776822
39555573.597712277682-18.5977122776822
40562576.722712277682-14.7227122776822
41561572.097712277682-11.0977122776822
42555562.472712277682-7.47271227768217
43544555.972712277682-11.9727122776822
44537547.097712277682-10.0977122776822
45543547.972712277682-4.97271227768217
46594601.972712277682-7.97271227768215
47611620.79876649455-9.79876649454962
48613616.655909351692-3.65590935169247
49611585.1751290877825.8248709122203
50594565.9251290877828.0748709122203
51595566.5501290877828.4498709122203
52591569.6751290877821.3248709122203
53589565.0501290877823.9498709122203
54584555.4251290877828.5748709122203
55573548.9251290877824.0748709122203
56567540.0501290877826.9498709122203
57569540.9251290877828.0748709122203
58621594.9251290877826.0748709122203
59629613.75118330464715.2488166953528
60628609.6083261617918.3916738382100
61612578.12754589787733.8724541021227
62595558.87754589787736.1224541021228
63597559.50254589787737.4974541021228
64593562.62754589787730.3724541021228
65590558.00254589787731.9974541021228
66580548.37754589787731.6224541021228
67574541.87754589787732.1224541021228
68573533.00254589787739.9974541021228
69573533.87754589787739.1224541021228
70620587.87754589787732.1224541021228
71626606.70360011474519.2963998852553
72620602.56074297188817.4392570281125
73588571.07996270797516.9200372920252
74566551.82996270797514.1700372920252
75557552.4549627079754.54503729202525
76561555.5799627079755.42003729202525
77549550.954962707975-1.95496270797475
78532541.329962707975-9.32996270797476
79526534.829962707975-8.82996270797473
80511525.954962707975-14.9549627079747
81499526.829962707975-27.8299627079747
82555580.829962707975-25.8299627079747
83565599.656016924842-34.6560169248422
84542595.513159781985-53.5131597819851
85527564.032379518072-37.0323795180723
86510544.782379518072-34.7823795180723
87514545.407379518072-31.4073795180723
88517548.532379518072-31.5323795180723
89508543.907379518072-35.9073795180723
90493534.282379518072-41.2823795180723
91490527.782379518072-37.7823795180723
92469518.907379518072-49.9073795180723
93478519.782379518072-41.7823795180723
94528573.782379518072-45.7823795180723


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.002870924872073980.005741849744147970.997129075127926
180.001273474218625680.002546948437251350.998726525781374
190.000233649729484720.000467299458969440.999766350270515
204.55901323410935e-059.1180264682187e-050.999954409867659
212.47129659273825e-054.9425931854765e-050.999975287034073
224.99231254720826e-059.98462509441652e-050.999950076874528
231.29737333201065e-052.59474666402129e-050.99998702626668
244.90112228308848e-069.80224456617697e-060.999995098877717
251.02356455573328e-062.04712911146656e-060.999998976435444
261.92062457441306e-063.84124914882612e-060.999998079375426
273.99188016013903e-067.98376032027806e-060.99999600811984
284.51861666447420e-069.03723332894839e-060.999995481383335
294.46644802782184e-068.93289605564369e-060.999995533551972
303.89324469774223e-067.78648939548445e-060.999996106755302
315.45526778271429e-061.09105355654286e-050.999994544732217
324.57322431709617e-069.14644863419234e-060.999995426775683
337.55127198684428e-061.51025439736886e-050.999992448728013
341.48757179013733e-052.97514358027466e-050.999985124282099
351.19086323786157e-052.38172647572313e-050.999988091367621
367.19153434555186e-061.43830686911037e-050.999992808465654
375.57625592987495e-061.11525118597499e-050.99999442374407
385.23054832999914e-061.04610966599983e-050.99999476945167
395.48936424168459e-061.09787284833692e-050.999994510635758
405.26054053045984e-061.05210810609197e-050.99999473945947
415.22852973653325e-061.04570594730665e-050.999994771470263
425.28533688165397e-061.05706737633079e-050.999994714663118
436.9750443927071e-061.39500887854142e-050.999993024955607
441.09680612180486e-052.19361224360973e-050.999989031938782
452.02161313938931e-054.04322627877861e-050.999979783868606
465.82709489698477e-050.0001165418979396950.99994172905103
470.0001796227000723420.0003592454001446840.999820377299928
480.0003880320686328050.000776064137265610.999611967931367
490.0004269305856384870.0008538611712769730.999573069414362
500.0005504499898176540.001100899979635310.999449550010182
510.0006851644059650750.001370328811930150.999314835594035
520.001165979383688510.002331958767377030.998834020616311
530.001733105580540620.003466211161081240.99826689441946
540.001838506182098620.003677012364197230.998161493817901
550.003725058658215030.007450117316430050.996274941341785
560.006362551220718790.01272510244143760.993637448779281
570.01187774314762330.02375548629524670.988122256852377
580.03208405903387450.06416811806774890.967915940966126
590.1074421712757020.2148843425514030.892557828724298
600.1605026089076090.3210052178152190.83949739109239
610.2308681838248850.461736367649770.769131816175115
620.2634096772250930.5268193544501860.736590322774907
630.2619807735424590.5239615470849180.738019226457541
640.3703383186461040.7406766372922080.629661681353896
650.4093390050534650.818678010106930.590660994946535
660.4182335022199380.8364670044398760.581766497780062
670.4132018853405560.8264037706811120.586798114659444
680.3833519697302450.766703939460490.616648030269755
690.3823454066526840.7646908133053670.617654593347316
700.3760257078788680.7520514157577360.623974292121132
710.4351982478349660.8703964956699320.564801752165034
720.8365538782437940.3268922435124120.163446121756206
730.9457292142321020.1085415715357950.0542707857678977
740.980310340262290.03937931947542140.0196896597377107
750.9736717487562060.0526565024875890.0263282512437945
760.9616352390106580.07672952197868380.0383647609893419
770.9287428210949280.1425143578101430.0712571789050716


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level390.639344262295082NOK
5% type I error level420.688524590163934NOK
10% type I error level450.737704918032787NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/10878c1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/10878c1229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/12evk1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/12evk1229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/2jaf81229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/2jaf81229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/3oha41229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/3oha41229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/4ikcj1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/4ikcj1229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/51lph1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/51lph1229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/6rr661229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/6rr661229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/7vmco1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/7vmco1229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/8hf2q1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/8hf2q1229938421.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/95akz1229938421.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229938553v80x2ad4ril1f2b/95akz1229938421.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