Home » date » 2010 » Dec » 19 »

verbetering ws10

*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: Sun, 19 Dec 2010 17:13:34 +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/Dec/19/t1292778698bi795lbe45a5wa9.htm/, Retrieved Sun, 19 Dec 2010 18:11:41 +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/Dec/19/t1292778698bi795lbe45a5wa9.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 «
24 26 38 23 10 11 25 23 36 15 10 11 30 25 23 25 10 11 19 23 30 18 10 11 22 19 26 21 10 11 22 29 26 19 10 11 25 25 30 15 13 12 23 21 27 22 10 11 17 22 34 19 10 11 21 25 28 20 13 9 19 24 36 26 10 11 19 18 42 26 10 11 15 22 31 21 10 11 23 22 26 19 10 11 27 28 16 19 13 12 14 12 23 19 10 11 23 20 45 28 10 11 19 21 30 27 10 11 18 23 45 18 10 11 20 28 30 19 10 11 23 24 24 24 10 11 25 24 29 21 13 12 19 24 30 22 13 9 24 23 31 25 10 11 25 29 34 15 10 11 26 24 41 34 10 11 29 18 37 23 10 11 32 25 33 19 10 11 29 26 48 15 10 11 28 22 44 15 10 11 17 22 29 17 10 11 28 22 44 30 13 9 26 30 43 28 10 11 25 23 31 23 10 11 14 17 28 23 10 11 25 23 26 21 10 11 26 23 30 18 10 11 20 25 27 19 15 11 18 24 34 24 10 11 32 24 47 15 10 11 25 21 37 24 13 16 21 24 27 20 10 11 20 28 30 20 10 11 30 20 36 44 10 11 24 29 39 20 10 11 26 27 32 20 10 11 24 22 25 20 10 11 22 28 19 11 10 11 14 16 29 21 10 11 24 25 26 21 13 9 24 24 31 19 13 12 24 28 31 21 10 11 24 24 31 17 10 11 22 24 39 19 10 11 27 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 time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
O[t] = + 20.8400279089439 + 0.347329743559927PS[t] + 0.0089567410966607CMD[t] -0.22783385858432PEC[t] -0.0737135911517484happiness[t] -0.0560868512284809depression[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)20.84002790894394.3232814.82044e-062e-06
PS0.3473297435599270.0787954.4082.3e-051.1e-05
CMD0.00895674109666070.0489350.1830.855080.42754
PEC-0.227833858584320.061304-3.71640.0003080.000154
happiness-0.07371359115174840.251993-0.29250.7703920.385196
depression-0.05608685122848090.246594-0.22740.8204640.410232


Multiple Linear Regression - Regression Statistics
Multiple R0.443449335678153
R-squared0.196647313313395
Adjusted R-squared0.163174284701453
F-TEST (value)5.87479894912285
F-TEST (DF numerator)5
F-TEST (DF denominator)120
p-value6.83532930995101e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.62619197983225
Sum Squared Residuals1577.91219295197


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12622.92202789358523.07797210641484
22325.0741150236263-2.0741150236263
32524.41598752132610.584012478673851
42322.25289453993380.747105460066184
51922.575555230474-3.575555230474
62923.03122294764265.96877705235736
72524.74314695236260.25685304763739
82122.7040078565463-1.70400785654626
92221.36622815861630.633771841383713
102522.36500575669342.63499424330657
112420.48396411783923.51603588216078
121820.5377045644192-2.53770456441919
132220.18903073103781.81096926896219
142223.3785526912026-1.37855269120256
152824.40107662979193.59892337020807
161220.2257147758732-8.22571477587324
172021.4982260447802-1.49822604478024
182120.20238981267490.79761018732506
192322.03991591282380.9600840871762
202822.37239042490945.62760957509057
212422.22146991608761.77853008391236
222423.367187059760.632812940239969
232421.23259203459832.76740796540175
242322.40366298873990.596337011260127
252925.0562015414333.94379845856702
262421.13738515956752.86261484043254
271824.6497198702881-6.64971987028811
282526.5672175709185-1.56721757091853
292626.5709148910259-0.570914891025935
302226.1877581830794-4.18775818307937
312221.77711217030160.222887829698377
322222.6612832333163-0.661283233316288
333022.52230179326677.4776982067333
342323.2066604494684-0.20666044946844
351719.3591630470193-2.35916304701926
362323.6175444611538-0.617544461153775
372324.6842027448533-1.6842027448533
382521.97695224586073.0230477541393
392420.57438860925463.42561139074538
402427.6039473806091-3.60394738060905
412122.5309920078664-1.53099200786643
422422.4650160865951.53498391340495
432822.14455656632515.8554434336749
442020.2035818424807-0.203581842480664
452923.61448621043485.38551378956524
462724.2464485098782.75355149012201
472223.4890918350815-1.48909183508151
482824.79119662864063.20880337135943
491619.8237875052846-3.82378750528456
502523.16124764659561.83875235340443
512423.49343851556210.506561484437935
522823.31499842307724.68500157692285
532424.2263338574144-0.226333857414431
542423.14766058189920.852339418100776
552124.3301174304669-3.33011743046695
562522.63690832832922.36309167167083
572524.11799588380570.882004116194282
582222.4261308714894-0.426130871489389
592323.385308262029-0.385308262028988
602623.74514000677732.25485999322274
612523.69815513102371.30184486897628
622122.1714267896151-1.17142678961509
632522.69284994517942.30715005482063
642422.1825847009821.81741529901802
652923.65117025527025.34882974472981
662224.189649812579-2.189649812579
672723.26040089604843.7395991039516
682621.27666074764974.72333925235032
692422.21906102574181.78093897425823
702723.17753339584833.82246660415169
712421.47896847276552.52103152723453
722424.8715995784349-0.871599578434878
732923.58386300697755.41613699302254
742222.387093596368-0.387093596368001
752420.73646702944333.26353297055671
762423.02987885782120.970121142178815
772322.3337331928630.666266807137023
782022.5203286060557-2.52032860605568
792722.24613896910744.75386103089261
802623.44919747951132.55080252048866
812521.96064933277533.0393506672247
822120.32102861720180.678971382798237
831920.8297420042916-1.82974200429162
842122.0742467273733-1.07424672737327
851620.0850950979696-4.08509509796957
862921.97941989541747.02058010458259
871522.0945134398526-7.09451343985255
881722.1244419138616-5.12444191386155
891521.1405954703022-6.1405954703022
902120.76356523579250.236434764207512
911920.2078012936799-1.20780129367992
922419.68096665711074.31903334288934
931725.3219114746584-8.32191147465845
942325.3640070004989-2.36400700049885
951422.5882852147216-8.58828521472155
961923.2658123770534-4.26581237705338
972422.00849128897761.99150871102237
981321.4359089001786-8.43590890017855
992226.3686071659101-4.36860716591015
1001621.2856174887463-5.28561748874634
1011922.7957764377831-3.7957764377831
1022523.9045302473231.09546975267696
1032523.01700678555671.98299321444328
1042321.36167375806011.63832624193991
1052424.1435220172743-0.143522017274251
1062623.77066614024582.22933385975421
1072621.68150418094054.31849581905953
1082524.49966641391390.500333586086067
1092120.71045388660210.289546113397905
1102623.95308719595722.04691280404276
1112322.45095850181270.549041498187338
1121322.0362185927164-9.0362185927164
1132421.71769371621982.28230628378024
1141423.2868662313111-9.28686623131107
1151017.0955276326346-7.09552763263464
1162424.3682976251396-0.368297625139552
1172221.12247426803320.877525731966756
1182424.8921424338498-0.89214243384981
1192022.938597285957-2.93859728595701
1201318.3986415666582-5.39864156665822
1212021.2332211319878-1.23322113198783
1222224.2016648043947-2.20166480439468
1232422.74793448158081.25206551841922
1242020.5809921200653-0.580992120065317
1252221.74483046600670.255169533993337
1262017.83732405552382.16267594447624


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.7894878760157710.4210242479684570.210512123984229
100.6599932816386570.6800134367226870.340006718361343
110.5302169276680330.9395661446639350.469783072331967
120.5603963320284880.8792073359430230.439603667971512
130.4438247365528850.8876494731057690.556175263447115
140.3605375388246830.7210750776493660.639462461175317
150.285108402210150.57021680442030.71489159778985
160.6079514839303780.7840970321392450.392048516069622
170.576787161946850.84642567610630.42321283805315
180.4922097160177970.9844194320355940.507790283982203
190.4199289693451720.8398579386903450.580071030654828
200.5509701319913210.8980597360173570.449029868008679
210.4828014274633130.9656028549266250.517198572536687
220.4114861718978910.8229723437957830.588513828102109
230.3448108084704370.6896216169408730.655189191529563
240.2778001997082890.5556003994165790.722199800291711
250.2581833276560640.5163666553121280.741816672343936
260.2145403637568410.4290807275136820.785459636243159
270.4503878686055680.9007757372111350.549612131394432
280.3963418005041820.7926836010083640.603658199495818
290.3328368472890790.6656736945781580.667163152710921
300.3329661323510490.6659322647020980.667033867648951
310.2751507798303680.5503015596607360.724849220169632
320.2415411366198280.4830822732396560.758458863380172
330.4159482285906270.8318964571812550.584051771409373
340.3566238104315620.7132476208631250.643376189568438
350.3353910665796160.6707821331592310.664608933420384
360.2826192103104970.5652384206209950.717380789689503
370.2402119362550590.4804238725101170.759788063744941
380.2084056534462880.4168113068925760.791594346553712
390.1963023994603530.3926047989207050.803697600539647
400.183732183600770.3674643672015410.81626781639923
410.162708162417370.325416324834740.83729183758263
420.1342397509030950.2684795018061910.865760249096905
430.1900315903805040.3800631807610080.809968409619496
440.1611199540411820.3222399080823640.838880045958818
450.2090434694879370.4180869389758730.790956530512063
460.1918288829733180.3836577659466360.808171117026682
470.1632505777374810.3265011554749620.836749422262519
480.1544314086826420.3088628173652850.845568591317358
490.1713829267407340.3427658534814690.828617073259265
500.1461085876373660.2922171752747320.853891412362634
510.1179899528156110.2359799056312210.88201004718439
520.1353425970090940.2706851940181880.864657402990906
530.1080314058328750.216062811665750.891968594167125
540.08557064868893050.1711412973778610.91442935131107
550.08399976623636280.1679995324727260.916000233763637
560.07170658950427710.1434131790085540.928293410495723
570.05575800813243450.1115160162648690.944241991867566
580.04251471816091930.08502943632183870.95748528183908
590.03192686663234180.06385373326468360.968073133367658
600.02643974833926310.05287949667852610.973560251660737
610.02000065486216810.04000130972433630.979999345137832
620.0151141262512130.0302282525024260.984885873748787
630.01226985669369630.02453971338739260.987730143306304
640.009369401605305820.01873880321061160.990630598394694
650.01452412935177020.02904825870354050.98547587064823
660.01171020211926130.02342040423852260.988289797880739
670.01220554191348850.02441108382697710.987794458086511
680.01544311010398390.03088622020796780.984556889896016
690.01237204377353520.02474408754707030.987627956226465
700.01249147889356980.02498295778713960.98750852110643
710.01057610591272590.02115221182545170.989423894087274
720.00779085738856630.01558171477713260.992209142611434
730.01353408518746530.02706817037493060.986465914812535
740.009636999652193850.01927399930438770.990363000347806
750.008760733249566930.01752146649913390.991239266750433
760.006835647192051880.01367129438410380.993164352807948
770.00572328519932010.01144657039864020.99427671480068
780.005254466131729480.0105089322634590.99474553386827
790.008099005908118660.01619801181623730.991900994091881
800.007381894863293980.0147637897265880.992618105136706
810.006670022057727670.01334004411545530.993329977942272
820.004785890308375830.009571780616751670.995214109691624
830.003625405985695180.007250811971390370.996374594014305
840.002558095945620090.005116191891240180.99744190405438
850.002851634599675830.005703269199351660.997148365400324
860.0110412086744570.0220824173489140.988958791325543
870.02737467433828220.05474934867656430.972625325661718
880.03406733292174580.06813466584349160.965932667078254
890.05294884562328140.1058976912465630.947051154376719
900.04311335354039680.08622670708079370.956886646459603
910.03215056763463530.06430113526927060.967849432365365
920.04212829255587040.08425658511174080.95787170744413
930.1064949610866860.2129899221733730.893505038913314
940.08761272505228780.1752254501045760.912387274947712
950.2053793937307450.4107587874614890.794620606269255
960.2004921245203840.4009842490407670.799507875479616
970.1857072967498470.3714145934996950.814292703250153
980.3056224328089970.6112448656179950.694377567191003
990.3132329808092130.6264659616184250.686767019190787
1000.3481101227197590.6962202454395180.651889877280241
1010.3339661808612490.6679323617224970.666033819138751
1020.2748629368469950.549725873693990.725137063153005
1030.2495761486346990.4991522972693970.750423851365301
1040.2159422281972480.4318844563944960.784057771802752
1050.1647697399610050.3295394799220110.835230260038995
1060.1401241298550750.2802482597101510.859875870144925
1070.1803463508286740.3606927016573470.819653649171326
1080.1491438233420260.2982876466840520.850856176657974
1090.1168763520535060.2337527041070120.883123647946494
1100.2120509780526950.424101956105390.787949021947305
1110.1578565900515220.3157131801030450.842143409948478
1120.3699449265327610.7398898530655210.630055073467239
1130.4124909281669340.8249818563338680.587509071833066
1140.8732794097123070.2534411805753860.126720590287693
1150.999249376859480.001501246281041320.00075062314052066
1160.9981866246872880.003626750625424150.00181337531271208
1170.988886292544270.022227414911460.01111370745573


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level60.055045871559633NOK
5% type I error level290.26605504587156NOK
10% type I error level370.339449541284404NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/10w8sg1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/10w8sg1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/17pc41292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/17pc41292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/2iycp1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/2iycp1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/3iycp1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/3iycp1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/4iycp1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/4iycp1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/5iycp1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/5iycp1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/6tpba1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/6tpba1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/73zad1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/73zad1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/83zad1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/83zad1292778792.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/93zad1292778792.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/19/t1292778698bi795lbe45a5wa9/93zad1292778792.ps (open in new window)


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