Home » date » 2010 » Nov » 20 »

Multiple Linear Regression Minitutorial

*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: Sat, 20 Nov 2010 08:26:22 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp.htm/, Retrieved Sat, 20 Nov 2010 09:25:35 +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/2010/Nov/20/t1290241524mymbobqpolr4klp.htm/},
    year = {2010},
}
@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 = {2010},
    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 «
44164 -9 -7,7 544686 2,2 40399 -13 -4,9 537034 2,2 36763 -8 -2,4 551531 2,2 37903 -13 -3,6 563250 1,6 35532 -15 -7 574761 1,6 35533 -15 -7 580112 1,6 32110 -15 -7,9 575093 -0,1 33374 -10 -8,8 557560 -0,1 35462 -12 -14,2 564478 -0,1 33508 -11 -17,8 580523 -2,7 36080 -11 -18,2 596594 -2,7 34560 -17 -22,8 586570 -2,7 38737 -18 -23,6 536214 -4,1 38144 -19 -27,6 523597 -4,1 37594 -22 -29,4 536535 -4,1 36424 -24 -31,8 536322 -3,7 36843 -24 -31,4 532638 -3,7 37246 -20 -27,6 528222 -3,7 38661 -25 -28,8 516141 -1,3 40454 -22 -21,9 501866 -1,3 44928 -17 -13,9 506174 -1,3 48441 -9 -8 517945 1,1 48140 -11 -2,8 533590 1,1 45998 -13 -3,3 528379 1,1 47369 -11 -1,3 477580 1,9 49554 -9 0,5 469357 1,9 47510 -7 -1,9 490243 1,9 44873 -3 2 492622 1,6 45344 -3 1,7 507561 1,6 42413 -6 1,9 516922 1,6 36912 -4 0,1 514258 1,8 43452 -8 2,4 509846 1,8 42142 -1 2,3 527070 1,8 44382 -2 4,7 541657 2,7 43636 -2 5 564591 2,7 44167 -1 7,2 555362 2,7 44423 1 8,5 498662 3,3 42868 2 6,8 511038 3,3 43908 2 5, etc...
 
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'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Vacatures[t] = + 69102.1319508772 -926.024591786786Consumentenvertrouwen[t] + 1529.41439826299producentenvertrouwen[t] -0.0510966580069667nietwerkendewerkzoekende[t] -4442.616338432economischegroei[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)69102.13195087728293.3116458.332300
Consumentenvertrouwen-926.024591786786153.875303-6.01800
producentenvertrouwen1529.41439826299152.29480710.042500
nietwerkendewerkzoekende-0.05109665800696670.015278-3.34440.0011730.000587
economischegroei-4442.616338432711.826041-6.241200


Multiple Linear Regression - Regression Statistics
Multiple R0.72263598843952
R-squared0.522202771787963
Adjusted R-squared0.502499793304993
F-TEST (value)26.5037477576959
F-TEST (DF numerator)4
F-TEST (DF denominator)97
p-value7.32747196252603e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation5990.2985007334
Sum Squared Residuals3480716584.40522


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14416428054.472202600116109.5277973999
24039936431.92251195313967.07748804693
33676334884.58729754961878.41270245041
43790339746.1810464435-1843.18104644348
53553235810.0476456047-278.047645604689
63553335536.6294286094-3.62942860941348
73211041969.0583720441-9859.05837204408
83337436858.3401595096-3484.3401595096
93546230098.06491237085363.93508762917
103350834397.1050890387-889.105089038684
113608032964.16493890353115.83506109648
123456031997.19915747632562.80084252368
133873740492.3784150563-1755.37841505632
143814435945.43194786502198.56805213496
153759435309.47124505792284.52875494212
163642431724.76292558304699.23707441704
173684332524.76877298584318.23122701417
183724634858.08796099682387.91203900319
193866127607.933155160511053.0668448395
204045436112.22352086434341.77647913574
214492843497.29134534021430.70865465976
224844133848.901587160814592.0984128392
234814042854.49842718295285.50157281706
244599844208.10509649931789.89490350068
254736944456.4507688022912.54923119797
264955445777.51532089313776.48467910687
274751039187.66678235498322.33321764513
284487342659.51052056442213.48947943559
294534441437.35322711943906.64677288056
304241344042.9940665292-1629.99406652918
313691238685.5971953264-1773.59719532638
324345246132.7871336051-2680.78713360515
334214238617.58471375933524.41528624066
344438238470.50220644095911.49779355911
354363637757.4757711885878.52422881199
364416740667.73391232613499.2660876739
374442341035.53415243023387.46584756976
384286836877.13284410215990.86715589786
394390834587.34907803759320.65092196252
404201333415.38081303038597.61918696973
413884632367.79578632836478.20421367171
423508735609.1286624861-522.128662486090
433302645260.6000237158-12234.6000237158
443464634658.3949197161-12.3949197161296
453713534449.51943867852685.48056132152
463798536139.52199992731845.47800007272
474312137367.82379255525753.17620744479
484372239522.06640975034199.93359024971
494363040651.79119944332978.20880055668
504223443140.8911898672-906.891189867241
513935140909.8909056911-1558.89090569111
523932736714.20546068812612.79453931186
533570431728.85987953293975.14012046708
543046628185.31379941412280.68620058590
552815533308.210752132-5153.21075213205
562925735724.5910558006-6467.5910558006
572999832415.1736204804-2417.17362048039
583252936310.3779001089-3781.37790010886
593478726608.24835871558178.7516412845
603385527033.01097764336821.98902235673
613455629857.13268430724698.86731569281
623134829172.74943156262175.25056843736
633080525010.56818113995794.43181886011
642835326227.35197302992125.64802697011
652451427818.045649982-3304.04564998198
662110633273.1357084174-12167.1357084174
672134625566.3333811368-4220.33338113682
682333529464.0067284783-6129.00672847826
692437930567.2041319656-6188.20413196562
702629025493.5826423893796.417357610708
713008424364.57994109185719.42005890821
722942931073.6552675832-1644.65526758320
733063227431.23674941903200.76325058096
742734933908.7958069672-6559.79580696718
752726429714.0503890574-2450.05038905739
762747427656.8709612175-182.870961217473
772448224146.1930736927335.806926307265
782145324546.6061149014-3093.60611490137
791878834832.5442287871-16044.5442287871
801928233989.3762323806-14707.3762323806
811971337268.3072400654-17555.3072400654
822191727600.9918421603-5683.99184216033
832381228175.0248733515-4363.02487335148
842378525816.8347956602-2031.83479566018
852469623333.41516928621362.58483071378
862456227155.0972995167-2593.09729951670
872358025831.6312044993-2251.63120449928
882493932483.8116230223-7544.81162302226
892389933456.8448652567-9557.84486525669
902145428877.9260009730-7423.92600097303
911976126324.806246967-6563.80624696699
921981523997.4782757931-4182.47827579312
932078021217.4313598365-437.431359836535
942346224314.1406504574-852.140650457438
952500524200.859359656804.140640344007
962472525222.2748243713-497.274824371342
972619833716.9150344123-7518.91503441235
982754333142.8625078004-5599.86250780044
992647131594.1990552076-5123.19905520757
1002655829381.9271607852-2823.92716078519
1012531724742.1326813945574.867318605512
1022289626367.4568509797-3471.4568509797


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.05705656787210790.1141131357442160.942943432127892
90.01884383790244770.03768767580489540.981156162097552
100.01808317555468100.03616635110936200.98191682444532
110.02071519504498770.04143039008997550.979284804955012
120.007865697483085580.01573139496617120.992134302516914
130.004551648144135080.009103296288270160.995448351855865
140.002300676687213530.004601353374427060.997699323312786
150.0008771393089320880.001754278617864180.999122860691068
160.0005375014433840090.001075002886768020.999462498556616
170.0002312734439644510.0004625468879289020.999768726556036
189.00228748117058e-050.0001800457496234120.999909977125188
197.20431568003076e-050.0001440863136006150.9999279568432
203.40349197805348e-056.80698395610695e-050.99996596508022
210.0001060690729663110.0002121381459326230.999893930927034
220.0005226747684071040.001045349536814210.999477325231593
230.002736058565045010.005472117130090020.997263941434955
240.002494856611959850.004989713223919690.99750514338804
250.002378782822762630.004757565645525270.997621217177237
260.001779436005847320.003558872011694640.998220563994153
270.001755204177233480.003510408354466960.998244795822766
280.002052923861031700.004105847722063400.997947076138968
290.001468524548615340.002937049097230680.998531475451385
300.001034296003861310.002068592007722620.998965703996139
310.004565029265956850.00913005853191370.995434970734043
320.003016425733121220.006032851466242450.996983574266879
330.002089590876987840.004179181753975680.997910409123012
340.001969493986807340.003938987973614670.998030506013193
350.00235913424932530.00471826849865060.997640865750675
360.002034683354527910.004069366709055820.997965316645472
370.001811846342989360.003623692685978720.99818815365701
380.001697559543607550.00339511908721510.998302440456392
390.001761698733633750.003523397467267500.998238301266366
400.002160959310137060.004321918620274110.997839040689863
410.002121979843803410.004243959687606820.997878020156197
420.002624662432527870.005249324865055750.997375337567472
430.00656135372517830.01312270745035660.993438646274822
440.006084823973496530.01216964794699310.993915176026503
450.004050465581331790.008100931162663570.995949534418668
460.004612249282372220.009224498564744430.995387750717628
470.01931444570369640.03862889140739290.980685554296304
480.04057704080650510.08115408161301020.959422959193495
490.05784876703680210.1156975340736040.942151232963198
500.07442826738972020.1488565347794400.92557173261028
510.08903845219313020.1780769043862600.91096154780687
520.1440142970705780.2880285941411570.855985702929422
530.1786725584032270.3573451168064530.821327441596773
540.2017042276705320.4034084553410640.798295772329468
550.2602500229957940.5205000459915890.739749977004206
560.2916039122221030.5832078244442060.708396087777897
570.2734189582305980.5468379164611970.726581041769402
580.2814705359919550.562941071983910.718529464008045
590.4198322938240830.8396645876481670.580167706175917
600.5898547557803640.8202904884392720.410145244219636
610.8136728447110180.3726543105779630.186327155288982
620.9135358254665420.1729283490669160.086464174533458
630.9586320820538070.0827358358923850.0413679179461925
640.9722396628206920.05552067435861670.0277603371793084
650.9795844242531250.04083115149375070.0204155757468754
660.9939360403978620.01212791920427620.00606395960213812
670.99663266922040.006734661559199360.00336733077959968
680.9970611572541280.005877685491743850.00293884274587192
690.996401262907640.007197474184720390.00359873709236019
700.9941929856064130.01161402878717440.00580701439358718
710.9950592055252960.009881588949407090.00494079447470354
720.9957421070043660.00851578599126830.00425789299563415
730.9983549940130780.003290011973844550.00164500598692227
740.9990355740953750.001928851809250080.00096442590462504
750.9995741820906950.0008516358186092530.000425817909304626
760.9999478166191230.000104366761754785.218338087739e-05
770.9999780185477544.39629044917057e-052.19814522458528e-05
780.9999745965590615.08068818775768e-052.54034409387884e-05
790.9999923184924071.53630151864082e-057.68150759320408e-06
800.999998020752533.95849494130434e-061.97924747065217e-06
810.9999993718865011.25622699789141e-066.28113498945704e-07
820.9999993625286531.27494269381119e-066.37471346905596e-07
830.9999981573278523.68534429537323e-061.84267214768661e-06
840.9999940901877921.18196244160114e-055.9098122080057e-06
850.9999890823938692.18352122624038e-051.09176061312019e-05
860.9999674314895256.51370209499556e-053.25685104749778e-05
870.9999059210729940.0001881578540121269.4078927006063e-05
880.9999964588301037.08233979372583e-063.54116989686291e-06
890.9999961444971747.71100565107532e-063.85550282553766e-06
900.9999819940056353.60119887302146e-051.80059943651073e-05
910.9999018639915930.000196272016814879.8136008407435e-05
920.9996263523184770.000747295363045940.00037364768152297
930.9989371391916060.002125721616787960.00106286080839398
940.9933048836154230.01339023276915340.0066951163845767


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level580.666666666666667NOK
5% type I error level690.793103448275862NOK
10% type I error level720.827586206896552NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/10ekdz1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/10ekdz1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/1iaxq1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/1iaxq1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/2iaxq1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/2iaxq1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/3iaxq1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/3iaxq1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/4bkxt1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/4bkxt1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/5bkxt1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/5bkxt1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/6bkxt1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/6bkxt1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/73bww1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/73bww1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/8ekdz1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/8ekdz1290241573.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/9ekdz1290241573.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290241524mymbobqpolr4klp/9ekdz1290241573.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal 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