Home » date » 2009 » Nov » 20 »

Workshop 7

*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: Fri, 20 Nov 2009 08:45:42 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9.htm/, Retrieved Fri, 20 Nov 2009 16:47:14 +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/2009/Nov/20/t12587320215dmk3y7hl3iu5a9.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
33 62 39 64 45 62 46 64 45 64 45 69 49 69 50 65 54 56 59 58 58 53 56 62 48 55 50 60 52 59 53 58 55 53 43 57 42 57 38 53 41 54 41 53 39 57 34 57 27 55 15 49 14 50 31 49 41 54 43 58 46 58 42 52 45 56 45 52 40 59 35 53 36 52 38 53 39 51 32 50 24 56 21 52 12 46 29 48 36 46 31 48 28 48 30 49 38 53 27 48 40 51 40 48 44 50 47 55 45 52 42 53 38 52 46 55 37 53 41 53 40 56 33 54 34 52 36 55 36 54 38 59 42 56 35 56 25 51 24 53 22 52 27 51 17 46 30 49 30 46 34 55 37 57 36 53 33 52 33 53 33 50 37 54 40 53 35 50 37 51 43 52 42 47 33 51 39 49 40 53 37 52 44 45 42 53 43 51 40 48 30 48 30 48 31 48 18 40 24 43 22 40 26 39 28 39 23 36 17 41 12 39 9 40 19 39 21 46 18 40 18 37 15 37 24 44 18 41 19 40 30 36 33 38 35 43 36 42 47 45 46 46
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Spaar[t] = + 35.2908642381885 + 0.435286320955128Alg_E[t] + 1.76715415124219M1[t] + 2.30585896286539M2[t] -0.242370093898710M3[t] + 0.735286320955132M4[t] + 0.834127782758336M5[t] + 2.76941410371346M6[t] + 1.44352863209552M7[t] -1.52234358514615M8[t] -1.43528632095512M9[t] -0.92704400981474M10[t] + 0.0176431604775675M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)35.29086423818852.32391315.18600
Alg_E0.4352863209551280.0456229.541200
M11.767154151242192.3098450.76510.4459090.222954
M22.305858962865392.3671370.97410.3321770.166089
M3-0.2423700938987102.365307-0.10250.9185750.459287
M40.7352863209551322.3636170.31110.7563360.378168
M50.8341277827583362.3639210.35290.7248830.362441
M62.769414103713462.3632171.17190.2438230.121911
M71.443528632095522.3631810.61080.5425880.271294
M8-1.522343585146152.363811-0.6440.5209270.260464
M9-1.435286320955122.363617-0.60720.5449650.272483
M10-0.927044009814742.364766-0.3920.6958130.347907
M110.01764316047756752.3632870.00750.9940570.497029


Multiple Linear Regression - Regression Statistics
Multiple R0.687725442575715
R-squared0.472966284365964
Adjusted R-squared0.414406982628848
F-TEST (value)8.07670635297544
F-TEST (DF numerator)12
F-TEST (DF denominator)108
p-value1.25376264925592e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5.28422435604139
Sum Squared Residuals3015.68692085796


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16251.422466980949910.5775330190501
26454.57288971830399.42711028169615
36254.63637858727057.36362141272949
46456.04932132307957.95067867692052
56455.71287646392768.28712353607242
66957.648162784882711.3518372151173
76958.063422597085310.9365774029147
86555.53283670079879.46716329920128
95657.3610392488103-1.36103924881026
105860.0457131647263-2.04571316472628
115360.5551140140635-7.55511401406346
126259.66689821167562.33310178832436
135557.9517617952768-2.95176179527681
146059.36103924881030.638960751189743
155957.68338283395641.31661716604359
165859.0963255697654-1.09632556976538
175360.0657396734789-7.06573967347885
185756.77759014297240.222409857027564
195755.01641835039941.98358164960064
205350.30940084933722.69059915066282
215451.70231707639362.29768292360641
225352.2105593875340.789440612466026
235752.2846739159164.71532608408397
245750.09059915066286.90940084933718
255548.81074905521916.18925094478089
264944.12601801538084.87398198461923
275041.14250263766158.85749736233846
284949.5200265087526-0.520026508752561
295453.9717311801070.0282688198929497
305856.77759014297241.22240985702756
315856.75756363421991.24243636578013
325252.0505461331577-0.0505461331576936
335653.44346236021412.55653763978590
345253.9517046713545-1.95170467135449
355952.71996023687126.28003976312884
365350.5258854716182.47411452838206
375252.7283259438153-0.728325943815265
385354.1376033973487-1.13760339734872
395152.0246606615397-1.02466066153974
405049.95531282970770.0446871702923097
415646.57186372386999.42813627613013
425247.20129108195964.79870891804039
434641.95782872174554.04217127825449
444846.3918239607411.60817603925898
454649.525885471618-3.52588547161795
464847.85769617798270.142303822017309
474847.49652438540960.503475614590386
484948.34945386684230.650546133157697
495353.5988985857255-0.598898585725522
504849.3494538668423-1.34945386684231
515152.4599469824949-1.45994698249487
524853.4376033973487-5.43760339734872
535055.2775901429724-5.27759014297243
545558.518735426793-3.51873542679295
555256.3222773132647-4.32227731326474
565352.05054613315770.949453866842307
575250.39645811352821.60354188647180
585554.38699099230960.613009007690384
595351.41410127400581.58589872599423
605353.1376033973487-0.137603397348714
615654.46947122763581.53052877236422
625451.96117179257312.03882820742692
635249.84822905676412.15177094323590
645551.69645811352823.3035418864718
655451.79529957533142.20470042466859
665954.60115853819684.3988414618032
675655.01641835039940.98358164960064
685649.00354188647186.9964581135282
695144.73773594111156.26226405888846
705344.81069193129688.1893080687032
715244.88480645967887.11519354032115
725147.04359490397693.95640509602308
734644.45788584566781.54211415433218
744950.6553128297077-1.65531282970769
754648.1070837729436-2.10708377294359
765550.8258854716184.17411452838205
775752.23058589628654.76941410371346
785353.7305858962865-0.730585896286538
795251.09884146180320.901158538196794
805348.13296924456154.86703075543846
815048.22002650875261.77997349124744
825450.46941410371353.53058589628654
835352.71996023687120.280039763128846
845050.525885471618-0.525885471617945
855153.1636122647704-2.16361226477039
865256.3140350021244-4.31403500212436
874753.3305196244051-6.33051962440513
885150.39059915066280.609400849337182
894953.1011585381968-4.10115853819679
905355.471731180107-2.47173118010705
915252.8399867456237-0.839986745623718
924552.921118775068-7.92111877506795
935352.13760339734870.862396602651282
945153.0811320294442-2.08113202944423
954852.7199602368712-4.71996023687116
964848.3494538668423-0.349453866842303
974850.1166080180845-2.11660801808450
984851.0905991506628-3.09059915066282
994042.883647921482-2.88364792148205
1004346.4730222620667-3.47302226206666
1014045.7012910819596-5.70129108195961
1023949.3777226867353-10.3777226867353
1033948.9224098570276-9.92240985702757
1043643.7801060350103-7.78010603501026
1054141.2554453734705-0.25544537347051
1063939.5872560798353-0.587256079835253
1074039.22608428726220.773915712737824
1083943.5613043363359-4.56130433633589
1094646.1990311294883-0.199031129488339
1104045.4318769782462-5.43187697824615
1113742.883647921482-5.88364792148205
1123742.5554453734705-5.55544537347051
1134446.5718637238699-2.57186372386987
1144145.8954321190942-4.89543211909423
1154045.0048329684314-5.00483296843141
1163646.8271102816962-10.8271102816962
1173848.2200265087526-10.2200265087526
1184349.5988414618032-6.5988414618032
1194250.9788149530506-8.97881495305064
1204555.7493213230795-10.7493213230795
1214657.0811891533665-11.0811891533665


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.02152815958723690.04305631917447390.978471840412763
170.07536491186578350.1507298237315670.924635088134216
180.5370809620441830.9258380759116340.462919037955817
190.8465342129554770.3069315740890460.153465787044523
200.9416340759336230.1167318481327550.0583659240663773
210.9115184767896340.1769630464207330.0884815232103664
220.8833322956000770.2333354087998450.116667704399923
230.8503678637557970.2992642724884060.149632136244203
240.8306860587516190.3386278824967620.169313941248381
250.7987254233091240.4025491533817530.201274576690876
260.8461870299330020.3076259401339960.153812970066998
270.8423037856430960.3153924287138090.157696214356904
280.8482583290666830.3034833418666350.151741670933317
290.8034401608802960.3931196782394070.196559839119704
300.7781758765713090.4436482468573830.221824123428691
310.758001488535670.4839970229286610.241998511464330
320.7503583926758630.4992832146482730.249641607324136
330.7006760184866080.5986479630267840.299323981513392
340.6447104104731420.7105791790537160.355289589526858
350.6609199938606540.6781600122786920.339080006139346
360.6273105780648710.7453788438702590.372689421935129
370.6054394243400190.7891211513199620.394560575659981
380.5867970449465250.826405910106950.413202955053475
390.5855207849201650.828958430159670.414479215079835
400.5445913968991070.9108172062017850.455408603100893
410.5890943236108380.8218113527783230.410905676389162
420.580152809963750.8396943800725010.419847190036250
430.5953778353796530.8092443292406940.404622164620347
440.569661394216680.860677211566640.43033860578332
450.5641501906469610.8716996187060780.435849809353039
460.50390926558590.99218146882820.4960907344141
470.4528612760613770.9057225521227530.547138723938623
480.4236889234097060.8473778468194110.576311076590294
490.3841366472185370.7682732944370740.615863352781463
500.3676626114786680.7353252229573360.632337388521332
510.3478090232218320.6956180464436650.652190976778168
520.3692380558656430.7384761117312850.630761944134357
530.392218184871160.784436369742320.60778181512884
540.3886012483696030.7772024967392050.611398751630397
550.4005684316940390.8011368633880780.599431568305961
560.3610792140621060.7221584281242120.638920785937894
570.3110294182722980.6220588365445950.688970581727702
580.2634102778360130.5268205556720260.736589722163987
590.2224005844824860.4448011689649720.777599415517514
600.1906284420316820.3812568840633640.809371557968318
610.163777703555970.327555407111940.83622229644403
620.1451045426871460.2902090853742920.854895457312854
630.1342449016997980.2684898033995950.865755098300202
640.1174756532823040.2349513065646090.882524346717696
650.09797789421671550.1959557884334310.902022105783284
660.1083166527376430.2166333054752870.891683347262357
670.0955865909167780.1911731818335560.904413409083222
680.1527049387206220.3054098774412450.847295061279378
690.1656350053601130.3312700107202250.834364994639887
700.215024321751420.430048643502840.78497567824858
710.2716244997008610.5432489994017220.728375500299139
720.2903760501612360.5807521003224720.709623949838764
730.2837437718387380.5674875436774760.716256228161262
740.2591782536786670.5183565073573340.740821746321333
750.2488882795746630.4977765591493250.751111720425337
760.2610613562706520.5221227125413040.738938643729348
770.3191799659006140.6383599318012280.680820034099386
780.3208202206514060.6416404413028130.679179779348594
790.327701333961260.655402667922520.67229866603874
800.5979903228867620.8040193542264760.402009677113238
810.5875340341282320.8249319317435360.412465965871768
820.6315778316698490.7368443366603020.368422168330151
830.6344059382362640.7311881235274730.365594061763736
840.6352978075821240.7294043848357530.364702192417876
850.599109490223560.8017810195528790.400890509776440
860.5536804842079170.8926390315841670.446319515792083
870.5287346722656280.9425306554687440.471265327734372
880.550685724235010.898628551529980.44931427576499
890.5120090553860890.9759818892278220.487990944613911
900.5867472958397910.8265054083204180.413252704160209
910.7128935936872970.5742128126254060.287106406312703
920.7576420106720730.4847159786558550.242357989327927
930.9055607610146620.1888784779706760.094439238985338
940.9435577070962470.1128845858075060.0564422929037531
950.9523097816370320.09538043672593610.0476902183629681
960.9763239278669450.04735214426611080.0236760721330554
970.9666318748668970.06673625026620680.0333681251331034
980.9840406889134740.03191862217305280.0159593110865264
990.9786008868531060.04279822629378720.0213991131468936
1000.9864020748405780.02719585031884360.0135979251594218
1010.986904952703450.02619009459309830.0130950472965491
1020.9826275430161580.03474491396768370.0173724569838418
1030.9678114326712270.06437713465754690.0321885673287735
1040.9274466623849260.1451066752301480.0725533376150739
1050.9376891768969630.1246216462060740.0623108231030372


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level70.0777777777777778NOK
10% type I error level100.111111111111111NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/109u871258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/109u871258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/1t1ze1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/1t1ze1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/22y1u1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/22y1u1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/3jdfk1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/3jdfk1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/4h1lt1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/4h1lt1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/57ufa1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/57ufa1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/6d1bc1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/6d1bc1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/7jh8k1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/7jh8k1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/8ykra1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/8ykra1258731936.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/98txj1258731936.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/20/t12587320215dmk3y7hl3iu5a9/98txj1258731936.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Include Monthly Dummies ; par3 = No 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