Home » date » 2010 » Nov » 20 »

Multiple Linear Regression Minitutorial + Trend

*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 09:33: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/t1290245609ey2rw3o69fi2ncf.htm/, Retrieved Sat, 20 Nov 2010 10:33:29 +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/t1290245609ey2rw3o69fi2ncf.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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Vacatures[t] = + 78260.7264072135 -122.646983408323Consumentenvertrouwen[t] + 589.77146339065producentenvertrouwen[t] -0.0547284462719926nietwerkendewerkzoekende[t] -1137.19034873606economischegroei[t] -214.228069954972t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)78260.72640721355866.81319513.339600
Consumentenvertrouwen-122.646983408323133.646004-0.91770.3610760.180538
producentenvertrouwen589.77146339065141.2123794.17656.5e-053.3e-05
nietwerkendewerkzoekende-0.05472844627199260.010685-5.12212e-061e-06
economischegroei-1137.19034873606595.050893-1.91110.0589770.029489
t-214.22806995497221.154852-10.126700


Multiple Linear Regression - Regression Statistics
Multiple R0.87691598966497
R-squared0.768981652930093
Adjusted R-squared0.756949447353535
F-TEST (value)63.9102821205365
F-TEST (DF numerator)5
F-TEST (DF denominator)96
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4186.97278306626
Sum Squared Residuals1682951144.26921


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14416442297.44366649931866.55633350070
24039944643.9456985449-4244.94569854493
33676344497.5130844199-7734.5130844199
43790344229.7457228179-6326.74572281791
53553241625.6094991145-6093.60949911447
63553341118.5295131581-5585.52951315806
73211042581.4127908419-10471.4127908419
83337442182.7093352806-8808.70933528062
93546238650.3979385231-3188.39793852313
103350838268.9226032331-4760.92260323313
113608036939.2450878847-859.245087884708
123456035296.5481322131-736.548132213131
133873739081.1220036569-344.122003656902
143814437320.9638701614823.03612983862
153759435705.01147846121888.98852153883
163642433877.40688274682546.59311725321
173684334100.70699421412742.2930057859
183724635878.70337024741367.29662975257
193866133501.90198371075159.09801628931
204045437770.40463145892683.59536854107
214492841425.34320504783502.65679495219
224844140336.12552379698104.87447620308
234814042577.77648836475562.22351163534
244599842599.14658705443398.85341294564
254736945189.56554024612179.43445975386
264955446241.66415127233312.33584872771
274751043223.63227352634286.36772647373
284487345029.8831081013-156.883108101299
294534443821.13534027181522.86465972817
304241343580.4895276678-1167.48952766784
313691241977.7373679144-5065.73736791443
324345243852.0335023433-400.033502343274
334214241777.6566436022364.343356397822
344438241279.73190956113102.26809043892
354363639987.29309182143648.70690817858
364416741453.00408856182713.99591143822
374442344180.9736485784242.026351421647
384286842164.1678563888703.83214361123
394390840545.75431406963362.24568593037
404201339032.32060649662980.67939350339
413884638281.2577440556564.7422559444
423508738437.4996961248-3350.49969612482
433302640189.2071498252-7163.20714982518
443464637699.9899900953-3053.98999009529
453713536873.2181030308261.781896969240
463798535011.53779888772973.46220111232
474312135064.56645844258056.4335415575
484372235899.67910618617822.3208938139
494363037638.92286466315991.07713533692
504223437452.60520815634781.3947918437
513935136796.86720053762554.1327994624
523932734764.71611926974562.2838807303
533570432971.57316080792732.42683919214
543046631508.4896692562-1042.48966925616
552815531913.2348320129-3758.2348320129
562925731753.8636898141-2496.86368981409
572999829912.540650516385.459349483669
583252928941.29781692493587.70218307514
593478725900.69015914378886.30984085628
603385525901.22830323327953.77169676685
613455628702.24595929035853.75404070966
623134828279.16527517963068.83472482038
633080527668.91656374533136.0834362547
642835328172.8856902246180.114309775411
652451428164.2069442197-3650.2069442197
662110629298.1819874327-8192.18198743268
672134626642.4966103054-5296.49661030535
682333527741.916814553-4406.916814553
692437927586.6315889434-3207.63158894336
702629026596.5383217769-306.538321776861
713008426011.74070671264072.25929328744
722942928519.3477229952909.652277004832
733063229272.26585130771359.73414869227
742734930361.4826515672-3012.48265156723
752726428755.6064805989-1491.60648059895
762747427283.6091073912190.390892608775
772448225991.0822732541-1509.08227325408
782145325410.8483085981-3957.84830859807
791878827859.7664505414-9071.76645054135
801928227581.1197639226-8299.11976392257
811971325886.6521470392-6173.65214703925
822191723562.2085400657-1645.20854006571
832381222102.35130323021709.64869676978
842378520873.80894879322911.19105120685
852469622646.71463426582049.28536573416
862456224354.7865452424207.213454757600
872358022871.6595573315708.340442668476
882493923783.6760064531155.32399354699
892389924869.0632408593-970.063240859339
902145423751.4217038596-2297.42170385961
911976123663.2522662087-3902.25226620871
921981523594.3840437027-3779.38404370267
932078022215.2226144297-1435.22261442975
942346222868.5966723694593.40332763061
952500522533.03563702942471.96436297059
962472523473.85682582261251.14317417739
972619828395.6404906254-2197.64049062540
982754328226.0847884776-683.084788477575
992647126951.6110843667-480.61108436672
1002655825858.5840171563699.415982843666
1012531723474.80410157331842.19589842672
1022289623367.8649756791-471.864975679136


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.08582669375201840.1716533875040370.914173306247982
100.03046615569058260.06093231138116520.969533844309417
110.04839066604470920.09678133208941850.95160933395529
120.02021552471971810.04043104943943630.979784475280282
130.03156330753971670.06312661507943330.968436692460283
140.01606304373692810.03212608747385620.983936956263072
150.007028764286989790.01405752857397960.99297123571301
160.003411381237738720.006822762475477430.996588618762261
170.001682387177564810.003364774355129610.998317612822435
180.003595073440803500.007190146881606990.996404926559197
190.002333490990876380.004666981981752750.997666509009124
200.005346887127863490.01069377425572700.994653112872137
210.03342716126606700.06685432253213390.966572838733933
220.03469848639694090.06939697279388190.96530151360306
230.03771624962640810.07543249925281610.962283750373592
240.02365679426871820.04731358853743640.976343205731282
250.03056906708206030.06113813416412060.96943093291794
260.02430497935248970.04860995870497930.97569502064751
270.02388221634646640.04776443269293270.976117783653534
280.04052424345280460.08104848690560930.959475756547195
290.03378626502458970.06757253004917950.96621373497541
300.03808522443521410.07617044887042810.961914775564786
310.2052613045402840.4105226090805690.794738695459716
320.168975664270750.33795132854150.83102433572925
330.1399739248351340.2799478496702690.860026075164866
340.1153486973503030.2306973947006060.884651302649697
350.09901432968590270.1980286593718050.900985670314097
360.07709614889083470.1541922977816690.922903851109165
370.07051479217167390.1410295843433480.929485207828326
380.06367010848576840.1273402169715370.936329891514232
390.04714420019625690.09428840039251380.952855799803743
400.0371075547977670.0742151095955340.962892445202233
410.03258771396479370.06517542792958750.967412286035206
420.05013762899602570.1002752579920510.949862371003974
430.1154637118655140.2309274237310290.884536288134486
440.1408713106109950.281742621221990.859128689389005
450.126009451758060.252018903516120.87399054824194
460.1516886652627560.3033773305255130.848311334737244
470.3435526594670580.6871053189341160.656447340532942
480.5158587480617560.9682825038764880.484141251938244
490.5342666541716280.9314666916567450.465733345828372
500.5546453597032550.890709280593490.445354640296745
510.5495860428617750.900827914276450.450413957138225
520.5868988973323370.8262022053353250.413101102667663
530.5775642720377350.844871455924530.422435727962265
540.6124136332892420.7751727334215160.387586366710758
550.702207433800920.595585132398160.29779256619908
560.7183466043170070.5633067913659850.281653395682993
570.6788339860291280.6423320279417440.321166013970872
580.7106092103529950.5787815792940110.289390789647005
590.8284287213574280.3431425572851450.171571278642572
600.9117934141424320.1764131717151370.0882065858575685
610.945953000157130.1080939996857390.0540469998428696
620.9575824273661820.08483514526763620.0424175726338181
630.964516484496140.0709670310077190.0354835155038595
640.9674356578354930.06512868432901380.0325643421645069
650.9725338976021280.05493220479574350.0274661023978718
660.9905061902535940.01898761949281240.00949380974640622
670.9951529477043280.009694104591344550.00484705229567228
680.9954726166340940.009054766731811110.00452738336590556
690.9938576473799720.01228470524005520.00614235262002759
700.9901610180369070.01967796392618680.00983898196309342
710.9929322061039580.01413558779208460.00706779389604229
720.9959462439101980.008107512179604040.00405375608980202
730.9969171534885130.006165693022973490.00308284651148675
740.9970305429705050.005938914058990630.00296945702949531
750.9977828383627670.00443432327446560.0022171616372328
760.9995268767502510.000946246499497050.000473123249748525
770.9998316335423050.0003367329153896630.000168366457694831
780.999913522092230.0001729558155387868.64779077693932e-05
790.999918824507480.0001623509850414328.11754925207159e-05
800.9999310013194060.0001379973611876216.89986805938107e-05
810.9999569768109388.6046378123254e-054.3023189061627e-05
820.9999540269727849.19460544320242e-054.59730272160121e-05
830.9998941832896050.0002116334207908130.000105816710395406
840.9997395317005660.0005209365988690450.000260468299434523
850.999528822080460.0009423558390808330.000471177919540417
860.9988440988933420.002311802213315840.00115590110665792
870.998621033955510.002757932088981620.00137896604449081
880.9998903925168440.0002192149663123240.000109607483156162
890.9998364126536110.0003271746927778910.000163587346388946
900.9992735596097550.001452880780489530.000726440390244763
910.9971565126738820.005686974652237060.00284348732611853
920.991731032005260.01653793598947860.00826896799473929
930.9827115951284390.03457680974312210.0172884048715611


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level260.305882352941176NOK
5% type I error level390.458823529411765NOK
10% type I error level560.658823529411765NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/100vvz1290245591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/100vvz1290245591.ps (open in new window)


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


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


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/774we1290245591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/774we1290245591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/874we1290245591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/874we1290245591.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/90vvz1290245591.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/20/t1290245609ey2rw3o69fi2ncf/90vvz1290245591.ps (open in new window)


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