Home » date » 2010 » Dec » 17 »

Time Series Analysis Multiple Lineair Regression (trend, seizoenaliteit, verleden)

*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, 17 Dec 2010 12:22:00 +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/17/t1292588470oh8co3i7uu8qmqv.htm/, Retrieved Fri, 17 Dec 2010 13:21:22 +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/17/t1292588470oh8co3i7uu8qmqv.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 «
40399 44164 44496 43110 43880 36763 40399 44164 44496 43110 37903 36763 40399 44164 44496 35532 37903 36763 40399 44164 35533 35532 37903 36763 40399 32110 35533 35532 37903 36763 33374 32110 35533 35532 37903 35462 33374 32110 35533 35532 33508 35462 33374 32110 35533 36080 33508 35462 33374 32110 34560 36080 33508 35462 33374 38737 34560 36080 33508 35462 38144 38737 34560 36080 33508 37594 38144 38737 34560 36080 36424 37594 38144 38737 34560 36843 36424 37594 38144 38737 37246 36843 36424 37594 38144 38661 37246 36843 36424 37594 40454 38661 37246 36843 36424 44928 40454 38661 37246 36843 48441 44928 40454 38661 37246 48140 48441 44928 40454 38661 45998 48140 48441 44928 40454 47369 45998 48140 48441 44928 49554 47369 45998 48140 48441 47510 49554 47369 45998 48140 44873 47510 49554 47369 45998 45344 44873 47510 49554 47369 42413 45344 44873 47510 49554 36912 42413 45344 44873 47510 43452 36912 42413 45344 44873 42142 43452 36912 42413 45344 44382 42142 43452 36912 42413 4 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 time11 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
OPENVAC[t] = + 2250.36966939532 + 0.921167547866439Y1[t] + 0.147604467143337Y2[t] -0.0352136681864466Y3[t] -0.0684979108690105Y4[t] -1782.24140296891M1[t] -2244.99351674281M2[t] -1446.45969762698M3[t] -2768.68887159723M4[t] -3252.36709616257M5[t] -2662.16780990246M6[t] + 1003.87028803039M7[t] + 778.856112992519M8[t] + 901.696972060029M9[t] + 881.942687673479M10[t] -1391.42130378499M11[t] -2.68490575599361t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2250.369669395321252.692881.79640.0752220.037611
Y10.9211675478664390.0958869.606900
Y20.1476044671433370.1300411.13510.2588630.129431
Y3-0.03521366818644660.12807-0.2750.7838750.391938
Y4-0.06849791086901050.095391-0.71810.4742620.237131
M1-1782.24140296891733.338533-2.43030.0167330.008367
M2-2244.99351674281729.357054-3.0780.0026410.001321
M3-1446.45969762698758.801315-1.90620.0592770.029638
M4-2768.68887159723813.506152-3.40340.0009350.000467
M5-3252.36709616257812.052227-4.00510.0001145.7e-05
M6-2662.16780990246862.123173-3.08790.0025620.001281
M71003.87028803039918.5878771.09280.2768950.138448
M8778.856112992519927.1540850.84010.4027360.201368
M9901.696972060029812.2947471.11010.2694380.134719
M10881.942687673479743.5163881.18620.2381550.119078
M11-1391.42130378499743.95932-1.87030.0641510.032075
t-2.684905755993615.368187-0.50020.6179860.308993


Multiple Linear Regression - Regression Statistics
Multiple R0.982023446627715
R-squared0.964370049726577
Adjusted R-squared0.959091538574959
F-TEST (value)182.697359544449
F-TEST (DF numerator)16
F-TEST (DF denominator)108
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1581.2481549845
Sum Squared Residuals270037338.585324


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14039943191.945750204-2792.94575020402
23676339213.245477128-2450.24547712803
33790336020.75120102421882.24879897577
43553235364.5990504630167.400949536961
53553333248.34828864152284.65171135847
63211033695.7284672838-1585.72846728383
73337434211.4767364604-837.4767364604
83546234805.2566781403656.743321859688
93350837155.8504061575-3647.85040615747
103608035831.6062271961248.393772803855
113456035476.2736357844-916.273635784363
123873735770.25792029092966.74207970915
133814437651.9650322087492.034967791303
143759437134.16766494459.832335059972
153642437292.8743104634-868.874310463432
163684334543.77767433932299.22232566067
173724634330.67329866422915.32670133581
183866135430.13831544763230.86168455236
194045440521.8162168609-67.8162168608912
204492842111.73913746612816.26086253387
214844146540.42151095611900.57848904394
224814050254.3636515297-2114.36365152966
234599847939.2151098277-1941.21510982765
244736946880.2164061496488.783593850354
254955445812.00819016993741.99180983011
264751047657.7335356086-147.733535608623
274487346991.6763278354-2118.67632783545
284534442765.08739275562578.91260724437
294241342245.6700001467167.329999853287
303691240435.6321747027-3523.63217470272
314345238763.05734611494688.94265388506
324214243818.7706000473-1676.77060004726
334438244092.0080462219289.991953778116
344363646086.1319290935-2450.13192909346
354416743051.67961581261115.32038418737
364442344830.2966957705-407.296695770532
374286843232.4013274731-364.401327473056
384390841404.73649830082503.26350169918
394201342883.6876253067-870.687625306688
403884640003.8914770501-1157.89147705007
413508736390.3722938865-1303.37229388651
423302633043.2465884273-17.2465884272728
433464634494.5535007028151.446499297158
443713535804.23410310521330.76589689479
453798538786.3543369174-801.354336917373
464312139998.42313302013122.57686697995
474372242380.34112299561341.65887700440
484363044880.3728424291-1250.37284242906
494223442860.3287800093-626.328780009342
503935140722.3935678774-1371.39356787742
513932738618.5330176471708.466982352912
523570436901.427326586-1197.42732658604
533046633271.2757520878-2805.27575208782
542815528697.2681374790-542.268137479045
552925729587.8739973401-330.873997340107
562999830466.8047557658-468.804755765845
573252931872.3768291491656.623170850894
583478734410.2808224866376.719177513448
593385534486.2371287905-631.237128790494
603455635209.8535128838-653.853512883788
613134833680.2176166612-2332.21761666121
623080530241.2966910508563.703308949204
632835330102.5917668545-1749.59176685455
642451426503.7740461239-1989.77404612391
652110622357.9848660009-1251.98486600087
662134619363.04497400791982.95502599207
672333523047.5845032668287.415496733181
682437925070.4844082993-691.484408299252
692629026670.9141666083-380.91416660827
703008428476.44573950471607.55426049527
712942929804.3732413013-375.37324130135
723063231010.9511049681-378.951104968099
732734929973.0082655776-2624.00826557758
742726426424.1302392007839.869760799304
752747426659.5985341512814.401465848787
762448225548.7867456504-1066.78674565042
772145322565.1590533916-1112.15905339161
781878819919.2518178201-1131.25181782013
791928220771.5742978871-1489.57429788711
801971320917.1740310591-1204.17403105911
812191721808.594402009108.405597991021
822381224045.1773930847-233.177393084652
832378523791.0461857034-6.04618570336439
842469625327.4880009091-631.488000909115
852456224160.0607109091401.939289090947
862358023576.80213747693.19786252310590
872493923418.05531211031520.94468788971
882389923142.3773779351756.622622064904
892145421942.353010896-488.353010895997
901976120143.5136644456-382.513664445586
911981521829.9708299620-2014.97082996202
922078021559.4556798989-779.455679898907
932346222803.6030904417658.396909558336
942500525508.2389994894-503.238999489397
952472525011.7467325244-286.746732524439
962619826209.7663678884-11.7663678883515
972754325502.34451940822040.65548059179
982647126397.466782482173.5332175178714
992655826371.6617746416186.338225358382
1002531724820.3974763813496.602523618725
1012289623149.3263699762-253.326369976211
1022224821393.8831446902854.116855309849
1032340624140.7101948693-734.71019486931
1042507325054.333637863718.6663621362638
1052769127069.6537656193621.346234380717
1063059929708.4970810022890.502918997767
1073194830359.61014231151588.38985768848
1083294633213.8599521344-267.859952134403
1093401232265.64840461531746.35159538469
1103293632682.7900861295253.209913870508
1113297432517.2621573475456.737842652531
1123095130962.6313524599-11.6313524598961
1132981228583.22637653851228.77362346155
1142901027895.29271569571114.70728430431
1153106830720.3823765356347.61762346444
1163244732448.7469683542-1.74696835424703
1173484434249.2234459199594.776554080096
1183567636620.8350235931-944.835023593117
1193538735275.4770849486111.522915051416
1203648836341.9371965762146.062803423847
1213565235335.0714027636316.928597236367
1223348834215.2373198051-727.237319805074
1233291432875.30797261838.6920273820277
1242978130656.2500802553-875.250080255301
1252795127332.6106897701618.3893102299


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.3852047998512530.7704095997025060.614795200148747
210.8512253117156450.297549376568710.148774688284355
220.9265000720019270.1469998559961460.073499927998073
230.9404981806430780.1190036387138440.0595018193569219
240.9698872979325740.06022540413485150.0301127020674258
250.969006259879870.06198748024025860.0309937401201293
260.9675039895984520.06499202080309620.0324960104015481
270.9924369515011280.01512609699774330.00756304849887164
280.9912257568093330.01754848638133350.00877424319066673
290.9975918013005520.004816397398895070.00240819869944754
300.9999078407038670.0001843185922653769.2159296132688e-05
310.9999979616220334.07675593405603e-062.03837796702801e-06
320.9999992015693681.59686126486285e-067.98430632431423e-07
330.9999981752455443.64950891174452e-061.82475445587226e-06
340.9999993519831031.29603379487977e-066.48016897439887e-07
350.9999989900809762.01983804891930e-061.00991902445965e-06
360.99999906215951.87568099831732e-069.37840499158658e-07
370.999999140717091.71856582108583e-068.59282910542915e-07
380.9999996831587126.33682575389931e-073.16841287694966e-07
390.999999501210339.97579338842651e-074.98789669421326e-07
400.999999821139773.57720458603036e-071.78860229301518e-07
410.9999999447863761.10427248114406e-075.52136240572031e-08
420.9999998731282082.53743583224956e-071.26871791612478e-07
430.9999998279494263.4410114869186e-071.7205057434593e-07
440.9999998539445782.92110844676388e-071.46055422338194e-07
450.9999997526313944.94737211531031e-072.47368605765516e-07
460.9999999932140971.35718066136823e-086.78590330684113e-09
470.9999999946207021.07585962471232e-085.37929812356159e-09
480.9999999941101971.17796053158051e-085.88980265790255e-09
490.9999999913989611.72020777302895e-088.60103886514477e-09
500.9999999857317742.8536451970047e-081.42682259850235e-08
510.9999999830224653.39550697183265e-081.69775348591633e-08
520.9999999766336914.67326173996472e-082.33663086998236e-08
530.9999999954670719.06585728423044e-094.53292864211522e-09
540.9999999891735842.16528327544464e-081.08264163772232e-08
550.9999999855813142.88373713889153e-081.44186856944576e-08
560.99999997150145.69972012206241e-082.84986006103121e-08
570.999999953360879.32782584453115e-084.66391292226557e-08
580.9999999290727311.41854537231043e-077.09272686155216e-08
590.999999843896633.12206738130407e-071.56103369065204e-07
600.9999997355097845.28980430968667e-072.64490215484334e-07
610.9999998002947233.99410554321873e-071.99705277160936e-07
620.9999998093348273.81330345136359e-071.90665172568179e-07
630.9999998232410283.53517943953992e-071.76758971976996e-07
640.999999825763463.48473077983412e-071.74236538991706e-07
650.9999996406502877.18699425100235e-073.59349712550117e-07
660.9999998795251012.40949798295866e-071.20474899147933e-07
670.9999998682286912.63542617196725e-071.31771308598363e-07
680.9999997021950955.95609809569991e-072.97804904784996e-07
690.9999993338302481.33233950305508e-066.66169751527541e-07
700.9999999313829031.37234194177596e-076.86170970887978e-08
710.9999998319747633.36050473354638e-071.68025236677319e-07
720.9999996869414856.2611702926028e-073.1305851463014e-07
730.9999999824840843.50318320843567e-081.75159160421783e-08
740.9999999997110275.77945377908789e-102.88972688954394e-10
750.9999999993525971.29480517919056e-096.4740258959528e-10
760.9999999981188033.76239460874773e-091.88119730437386e-09
770.999999994465841.10683197889301e-085.53415989446507e-09
780.9999999877360552.45278889018674e-081.22639444509337e-08
790.9999999737972555.24054897947432e-082.62027448973716e-08
800.9999999329617541.34076492492214e-076.7038246246107e-08
810.9999998235928983.52814204479853e-071.76407102239926e-07
820.9999995764788678.4704226698811e-074.23521133494055e-07
830.9999988899016082.22019678473166e-061.11009839236583e-06
840.9999971061244355.78775112923357e-062.89387556461679e-06
850.9999943521828561.12956342888460e-055.64781714442301e-06
860.9999888842929222.22314141569687e-051.11157070784843e-05
870.9999934486800091.31026399821181e-056.55131999105904e-06
880.9999912813396981.74373206043069e-058.71866030215347e-06
890.9999841834434823.16331130351706e-051.58165565175853e-05
900.999975267813814.94643723777128e-052.47321861888564e-05
910.9999804900809073.90198381866265e-051.95099190933132e-05
920.9999478403710390.0001043192579228855.21596289614426e-05
930.9998862207439530.0002275585120933890.000113779256046694
940.9997006895928570.0005986208142857220.000299310407142861
950.9996081711953810.0007836576092379390.000391828804618969
960.9989971936650680.002005612669863150.00100280633493157
970.9986870372877530.002625925424493770.00131296271224689
980.996785619692620.006428760614758020.00321438030737901
990.9932734279604910.01345314407901750.00672657203950876
1000.9859937890807850.02801242183842970.0140062109192149
1010.9898203718881460.02035925622370790.0101796281118539
1020.9769582059198290.0460835881603430.0230417940801715
1030.9814580633334660.03708387333306840.0185419366665342
1040.9566640085174390.08667198296512260.0433359914825613
1050.9918844072863820.01623118542723570.00811559271361785


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level700.813953488372093NOK
5% type I error level780.906976744186046NOK
10% type I error level820.953488372093023NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/1068l01292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/1068l01292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/1z7661292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/1z7661292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/2agnr1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/2agnr1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/3agnr1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/3agnr1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/4agnr1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/4agnr1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/53q4u1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/53q4u1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/63q4u1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/63q4u1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/7vz3x1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/7vz3x1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/8vz3x1292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/8vz3x1292588508.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/968l01292588508.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/17/t1292588470oh8co3i7uu8qmqv/968l01292588508.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by