Home » date » 2008 » Dec » 15 »

Paper TW

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 15 Dec 2008 10:48:10 -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/15/t1229363343cvt6eq4xittcnow.htm/, Retrieved Mon, 15 Dec 2008 18:49:03 +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/15/t1229363343cvt6eq4xittcnow.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 «
467 101.0 0 460 98.7 0 448 105.1 0 443 98.4 0 436 101.7 0 431 102.9 0 484 92.2 0 510 94.9 0 513 92.8 0 503 98.5 0 471 94.3 0 471 87.4 0 476 103.4 0 475 101.2 0 470 109.6 0 461 111.9 0 455 108.9 0 456 105.6 0 517 107.8 0 525 97.5 0 523 102.4 0 519 105.6 0 509 99.8 0 512 96.2 0 519 113.1 0 517 107.4 0 510 116.8 0 509 112.9 0 501 105.3 0 507 109.3 0 569 107.9 0 580 101.1 0 578 114.7 0 565 116.2 0 547 108.4 0 555 113.4 0 562 108.7 0 561 112.6 0 555 124.2 1 544 114.9 1 537 110.5 1 543 121.5 1 594 118.1 1 611 111.7 1 613 132.7 1 611 119.0 1 594 116.7 1 595 120.1 1 591 113.4 1 589 106.6 1 584 116.3 1 573 112.6 1 567 111.6 1 569 125.1 1 621 110.7 1 629 109.6 1 628 114.2 1 612 113.4 1 595 116.0 1 597 109.6 1 593 117.8 1 590 115.8 1 580 125.3 1 574 113.0 1 573 120.5 1 573 116.6 1 620 111.8 1 626 115.2 1 620 118.6 1 588 122.4 1 566 116.4 1 557 114.5 1 561 119.8 1 549 115.8 1 532 127.8 1 526 118.8 1 511 119.7 1 499 118.6 1 555 120.8 1 565 115.9 1 542 109.7 1 527 114.8 1 510 116.2 1 514 112.2 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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 253.121341592206 + 2.55465072343757X[t] + 53.4799373483157DUM[t] -9.20020519368495M1[t] -5.90393501861316M2[t] -46.5270026487257M3[t] -37.6544050449706M4[t] -42.9022535423097M5[t] -50.6721768385552M6[t] + 15.2829630654453M7[t] + 36.4342329706287M8[t] + 18.3110549776420M9[t] + 3.74216053983409M10[t] -6.86671897504944M11[t] -0.325723201120734t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)253.12134159220665.852153.84380.0002660.000133
X2.554650723437570.6701813.81190.0002960.000148
DUM53.479937348315713.6715963.91180.0002120.000106
M1-9.2002051936849516.768037-0.54870.5849990.2925
M2-5.9039350186131616.380997-0.36040.7196390.359819
M3-46.527002648725718.213644-2.55450.0128440.006422
M4-37.654405044970616.759942-2.24670.0278620.013931
M5-42.902253542309716.612471-2.58250.0119320.005966
M6-50.672176838555217.064713-2.96940.0041010.002051
M715.282963065445316.3766170.93320.3539610.176981
M836.434232970628716.2152282.24690.0278470.013924
M918.311054977642016.5529021.10620.2724760.136238
M103.7421605398340916.6135460.22520.8224520.411226
M11-6.8667189750494416.248522-0.42260.6738970.336949
t-0.3257232011207340.3025-1.07680.2853340.142667


Multiple Linear Regression - Regression Statistics
Multiple R0.84668065124361
R-squared0.716868125190303
Adjusted R-squared0.659421078127466
F-TEST (value)12.4787636935659
F-TEST (DF numerator)14
F-TEST (DF denominator)69
p-value7.4940054162198e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation30.2632645239872
Sum Squared Residuals63194.6973957687


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1467501.615136264594-34.6151362645943
2460498.709986574639-38.7099865746391
3448474.110960373406-26.1109603734063
4443465.541674929009-22.5416749290089
5436468.398450617893-32.3984506178931
6431463.368384988652-32.3683849886519
7484501.66303895075-17.6630389507497
8510529.386142608094-19.3861426080938
9513505.5724748947677.42752510523255
10503505.239366379433-2.23936637943296
11471483.575230624991-12.5752306249909
12471472.4891364072-1.48913640720043
13476503.837619587396-27.8376195873958
14475501.187934969784-26.1879349697842
15470481.698210215426-11.6982102154265
16461496.120781281967-35.1207812819672
17455482.883257413195-27.8832574131948
18456466.357263528485-10.3572635284845
19517537.606911822927-20.6069118229269
20525532.119556075583-7.1195560755827
21523526.188443426319-3.18844342631929
22519519.468708102391-0.468708102390854
23509493.71713119044915.2828688095513
24512491.06138436000220.9386156399978
25519524.709053191291-5.70905319129133
26517513.1180910416483.8819089583517
27510496.18301701072813.8169829892718
28509494.76675359195614.233246408044
29501469.77783639537131.2221636046293
30507471.90079279175535.0992072082453
31569533.95369848182235.0463015181781
32580537.40762026650942.5923797334909
33578553.70196891115324.2980310888475
34565542.6393273573822.3606726426197
35547511.77844899856335.221551001437
36555531.0926983896823.9073016103205
37562509.55991159471752.4400884052827
38561522.49359639007538.5064036099252
39555564.658691299033-9.65869129903305
40544549.447313973698-5.44731397369801
41537532.6332790921134.36672090788706
42543552.63879055256-9.6387905525599
43594609.582394795752-15.5823947957519
44611614.058176869814-3.05817686981421
45613649.256940867896-36.2569408678955
46611599.36360831787211.6363916821277
47594582.55330893796211.4466910620384
48595597.780117171578-2.78011717157805
49591571.13802892974119.8619710702593
50589556.73695098431632.2630490156837
51584540.56827217042743.4317278295725
52573539.66293889634333.3370611036572
53567531.53471647444535.4652835255546
54569557.92685474348611.0731452565137
55621586.76930102886534.2306989711349
56629604.78473193714624.2152680628535
57628598.08722407085229.9127759291482
58612581.14888585317330.8511141468269
59595576.85637501810718.1436249818935
60597567.04760616203529.9523938379652
61593578.46981369941714.5301863005828
62590576.33105922649313.6689407735069
63580559.65145026791720.3485497320833
64574536.77612077226937.223879227731
65573550.36242949959122.6375705004090
66573532.30364518081840.6963548191818
67620585.67073841119834.3292615888024
68626615.18209757494810.8179024250519
69620605.41900884052814.5809911594717
70588600.232063950662-12.2320639506624
71566573.969556894033-7.96955689403277
72557575.65671629343-18.6567162934301
73561579.670436732843-18.6704367328435
74549572.422380813044-23.4223808130443
75532562.129398663062-30.1293986630618
76526547.684416554758-21.6844165547581
77511544.410030507392-33.4100305073921
78499533.504268214244-34.5042682142445
79555604.753916508687-49.7539165086869
80565613.061674667906-48.0616746679056
81542578.773938988485-36.7739389884852
82527576.908040039088-49.9080400390881
83510569.549948335896-59.5499483358965
84514565.872341216075-51.8723412160749


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
180.009675980154669010.01935196030933800.990324019845331
190.003800595984910080.007601191969820170.99619940401509
200.0007899858249919170.001579971649983830.999210014175008
210.0005370144322595870.001074028864519170.99946298556774
220.0001309855856628210.0002619711713256420.999869014414337
230.0004244500480179220.0008489000960358450.999575549951982
240.000636417902454320.001272835804908640.999363582097546
250.0005586947470281580.001117389494056320.999441305252972
260.0006009007946438550.001201801589287710.999399099205356
270.0004270786190245580.0008541572380491150.999572921380975
280.0004621804393694580.0009243608787389160.99953781956063
290.0003338770961112280.0006677541922224560.999666122903889
300.0003661834364158850.0007323668728317710.999633816563584
310.0005285832539632810.001057166507926560.999471416746037
320.0003341236802487890.0006682473604975780.999665876319751
330.0002304023476634990.0004608046953269980.999769597652337
340.000100874705583130.000201749411166260.999899125294417
354.62554859074422e-059.25109718148844e-050.999953744514093
362.56100480702303e-055.12200961404606e-050.99997438995193
371.14095850272061e-052.28191700544121e-050.999988590414973
385.01363189749721e-061.00272637949944e-050.999994986368102
393.61680307387211e-067.23360614774421e-060.999996383196926
403.83896471529836e-067.67792943059672e-060.999996161035285
416.10068560174656e-061.22013712034931e-050.999993899314398
427.70585537914073e-061.54117107582815e-050.99999229414462
431.59447630791287e-053.18895261582575e-050.99998405523692
443.27373904633927e-056.54747809267854e-050.999967262609537
455.67377840534884e-050.0001134755681069770.999943262215947
465.37529317313165e-050.0001075058634626330.999946247068269
475.89241949227195e-050.0001178483898454390.999941075805077
480.0001700602047263550.0003401204094527100.999829939795274
490.0002649206960356040.0005298413920712080.999735079303964
500.00022280504459420.00044561008918840.999777194955406
510.0001318755995525760.0002637511991051520.999868124400447
520.0002334972181001790.0004669944362003580.9997665027819
530.0003264742468748680.0006529484937497370.999673525753125
540.002442934575220620.004885869150441250.99755706542478
550.004300479968951140.008600959937902290.995699520031049
560.01806889546227300.03613779092454590.981931104537727
570.05396607055570370.1079321411114070.946033929444296
580.09084178377588750.1816835675517750.909158216224113
590.1995521901251320.3991043802502650.800447809874868
600.2854205951532710.5708411903065420.714579404846729
610.5415892115596720.9168215768806560.458410788440328
620.6761646402914930.6476707194170140.323835359708507
630.687137205574090.625725588851820.31286279442591
640.6606170800842210.6787658398315580.339382919915779
650.5359459308473810.9281081383052380.464054069152619
660.4861862718464230.9723725436928460.513813728153577


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level370.755102040816326NOK
5% type I error level390.795918367346939NOK
10% type I error level390.795918367346939NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/10qir31229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/10qir31229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/1px0q1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/1px0q1229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/228wf1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/228wf1229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/360dy1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/360dy1229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/403zr1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/403zr1229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/54s0j1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/54s0j1229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/6ubcy1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/6ubcy1229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/7o1t21229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/7o1t21229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/81tv11229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/81tv11229363277.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/9ncav1229363277.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/15/t1229363343cvt6eq4xittcnow/9ncav1229363277.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