Home » date » 2008 » Dec » 12 »

Regressie Master 1 juli 2008

*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, 12 Dec 2008 07:18:23 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q.htm/, Retrieved Fri, 12 Dec 2008 15:19:59 +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/2008/Dec/12/t12290915986zva0mlmq9nl93q.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
8310 0 7649 0 7279 0 6857 0 6496 0 6280 0 8962 0 11205 0 10363 0 9175 0 8234 0 8121 0 7438 0 6876 0 6489 0 6319 0 5952 0 6055 0 9107 0 11493 0 10213 0 9238 0 8218 0 7995 0 7581 0 7051 0 6668 0 6433 0 6135 0 6365 0 10095 0 12029 0 12184 0 11331 0 9961 0 9739 0 9080 0 8507 0 8097 0 7772 0 7440 0 7902 0 13539 0 14992 0 15436 0 14156 0 12846 0 12302 0 11691 0 10648 0 10064 0 10016 0 9691 0 10260 0 16882 0 18573 0 18227 0 16346 0 14694 0 14453 0 13949 0 13277 0 12726 0 12279 0 11819 0 12207 0 18637 0 20519 0 19974 0 17802 0 15997 0 15430 0 14452 0 13614 0 13080 0 12290 0 11890 0 12292 0 18700 0 20388 0 19170 0 17530 0 15564 0 15163 0 13406 0 12763 0 12083 0 12054 0 11770 0 12266 0 17549 0 18655 0 17279 0 14788 0 13138 0 12494 0 11767 0 10928 0 10104 0 9760 0 9536 0 9978 0 14846 0 15565 0 13587 0 11804 0 10611 0 10915 0 9988 0 9376 0 9319 0 8852 0 8392 0 9050 0 13250 1 14037 1 12486 1 11182 1 10287 1
 
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 time9 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
NWWZPB[t] = + 8479.36842105263 -5331.38713450292Dummy[t] -799.043664717349M1[t] -1552.45048732943M2[t] -2086.55730994152M3[t] -2470.36413255361M4[t] -2877.57095516569M5[t] -2580.27777777778M6[t] + 2787.95411306043M7[t] + 4320.74729044834M8[t] + 3410.94046783626M9[t] + 1798.13364522417M10[t] + 361.826822612086M11[t] + 56.1068226120858t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8479.36842105263844.62022910.039300
Dummy-5331.387134502921130.55081-4.71577e-064e-06
M1-799.0436647173491036.378078-0.7710.4424410.22122
M2-1552.450487329431036.198807-1.49820.1370770.068539
M3-2086.557309941521036.059352-2.01390.0465740.023287
M4-2470.364132553611035.95973-2.38460.0188910.009446
M5-2877.570955165691035.899952-2.77780.0064830.003242
M6-2580.277777777781035.880025-2.49090.0143080.007154
M72787.954113060431041.8132062.67610.0086440.004322
M84320.747290448341041.634874.1486.8e-053.4e-05
M93410.940467836261041.4961443.2750.0014320.000716
M101798.133645224171041.3970421.72670.0871710.043585
M11361.8268226120861041.3375760.34750.7289390.364469
t56.10682261208586.4252448.732200


Multiple Linear Regression - Regression Statistics
Multiple R0.812175892484814
R-squared0.659629680333504
Adjusted R-squared0.617488593136699
F-TEST (value)15.6528871040500
F-TEST (DF numerator)13
F-TEST (DF denominator)105
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2254.51906923541
Sum Squared Residuals533699904.522339


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
183107736.43157894737573.568421052627
276497039.13157894737609.86842105263
372796561.13157894737717.868421052632
468576233.43157894737623.568421052631
564965882.33157894737613.668421052633
662806235.7315789473744.2684210526311
7896211660.0702923977-2698.07029239766
81120513248.9702923977-2043.97029239766
91036312395.2702923977-2032.27029239766
10917510838.5702923977-1663.57029239766
1182349458.37029239766-1224.37029239766
1281219152.65029239766-1031.65029239766
1374388409.7134502924-971.713450292397
1468767712.4134502924-836.413450292396
1564897234.4134502924-745.413450292399
1663196906.7134502924-587.713450292399
1759526555.6134502924-603.613450292399
1860556909.0134502924-854.013450292399
19910712333.3521637427-3226.35216374269
201149313922.2521637427-2429.25216374269
211021313068.5521637427-2855.55216374269
22923811511.8521637427-2273.85216374269
23821810131.6521637427-1913.65216374269
2479959825.9321637427-1830.93216374269
2575819082.99532163743-1501.99532163743
2670518385.69532163743-1334.69532163743
2766687907.69532163743-1239.69532163743
2864337579.99532163743-1146.99532163743
2961357228.89532163743-1093.89532163743
3063657582.29532163743-1217.29532163743
311009513006.6340350877-2911.63403508772
321202914595.5340350877-2566.53403508772
331218413741.8340350877-1557.83403508772
341133112185.1340350877-854.13403508772
35996110804.9340350877-843.93403508772
36973910499.2140350877-760.21403508772
3790809756.27719298246-676.277192982456
3885079058.97719298245-551.977192982455
3980978580.97719298246-483.977192982456
4077728253.27719298246-481.277192982456
4174407902.17719298246-462.177192982456
4279028255.57719298246-353.577192982455
431353913679.9159064327-140.915906432748
441499215268.8159064327-276.815906432747
451543614415.11590643271020.88409356725
461415612858.41590643271297.58409356725
471284611478.21590643271367.78409356725
481230211172.49590643271129.50409356725
491169110429.55906432751261.44093567251
50106489732.25906432749915.740935672515
51100649254.25906432749809.740935672515
52100168926.559064327491089.44093567251
5396918575.459064327491115.54093567251
54102608928.859064327491331.14093567251
551688214353.19777777782528.80222222222
561857315942.09777777782630.90222222222
571822715088.39777777783138.60222222222
581634613531.69777777782814.30222222222
591469412151.49777777782542.50222222222
601445311845.77777777782607.22222222222
611394911102.84093567252846.15906432749
621327710405.54093567252871.45906432749
63127269927.540935672512798.45906432749
64122799599.840935672512679.15906432749
65118199248.740935672512570.25906432749
66122079602.140935672512604.85906432749
671863715026.47964912283610.52035087719
682051916615.37964912283903.62035087719
691997415761.67964912284212.32035087719
701780214204.97964912283597.02035087719
711599712824.77964912283172.22035087719
721543012519.05964912282910.94035087719
731445211776.12280701752675.87719298246
741361411078.82280701752535.17719298246
751308010600.82280701752479.17719298246
761229010273.12280701752016.87719298246
77118909922.022807017541967.97719298246
781229210275.42280701752016.57719298246
791870015699.76152046783000.23847953216
802038817288.66152046783099.33847953216
811917016434.96152046782735.03847953216
821753014878.26152046782651.73847953216
831556413498.06152046782065.93847953216
841516313192.34152046781970.65847953216
851340612449.4046783626956.595321637427
861276311752.10467836261010.89532163743
871208311274.1046783626808.895321637426
881205410946.40467836261107.59532163743
891177010595.30467836261174.69532163743
901226610948.70467836261317.29532163743
911754916373.04339181291175.95660818713
921865517961.9433918129693.056608187134
931727917108.2433918129170.756608187133
941478815551.5433918129-763.543391812866
951313814171.3433918129-1033.34339181287
961249413865.6233918129-1371.62339181287
971176713122.6865497076-1355.68654970760
981092812425.3865497076-1497.38654970760
991010411947.3865497076-1843.38654970760
100976011619.6865497076-1859.68654970760
101953611268.5865497076-1732.58654970760
102997811621.9865497076-1643.98654970760
1031484617046.3252631579-2200.32526315789
1041556518635.2252631579-3070.22526315789
1051358717781.5252631579-4194.5252631579
1061180416224.8252631579-4420.8252631579
1071061114844.6252631579-4233.62526315790
1081091514538.9052631579-3623.90526315789
109998813795.9684210526-3807.96842105263
110937613098.6684210526-3722.66842105263
111931912620.6684210526-3301.66842105263
112885212292.9684210526-3440.96842105263
113839211941.8684210526-3549.86842105263
114905012295.2684210526-3245.26842105263
1151325012388.22861.78
1161403713977.1259.8800000000003
1171248613123.42-637.42
1181118211566.72-384.72
1191028710186.52100.479999999999


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.0001992255857884180.0003984511715768360.999800774414212
187.77742697111517e-050.0001555485394223030.999922225730289
197.1638446385243e-050.0001432768927704860.999928361553615
203.89876906877231e-057.79753813754461e-050.999961012309312
216.46097145029442e-061.29219429005888e-050.99999353902855
221.41020563968245e-062.8204112793649e-060.99999858979436
232.49790305628023e-074.99580611256046e-070.999999750209694
243.72035876595896e-087.44071753191791e-080.999999962796412
255.22370273404926e-091.04474054680985e-080.999999994776297
267.67921992953205e-101.53584398590641e-090.999999999232078
271.0642460521204e-102.1284921042408e-100.999999999893575
281.55321399513577e-113.10642799027155e-110.999999999984468
292.4785551965375e-124.957110393075e-120.999999999997521
309.85921722490493e-131.97184344498099e-120.999999999999014
315.29114335304491e-111.05822867060898e-100.999999999947089
327.19413485531977e-111.43882697106395e-100.999999999928059
337.51568959622795e-091.50313791924559e-080.99999999248431
341.21327385096111e-072.42654770192221e-070.999999878672615
352.61313721081326e-075.22627442162652e-070.999999738686279
363.9147788274918e-077.8295576549836e-070.999999608522117
372.81548657162462e-075.63097314324924e-070.999999718451343
381.96731979817517e-073.93463959635034e-070.99999980326802
391.34201252994280e-072.68402505988561e-070.999999865798747
409.34151972600903e-081.86830394520181e-070.999999906584803
417.1437949438421e-081.42875898876842e-070.99999992856205
429.15669374899125e-081.83133874979825e-070.999999908433063
432.70106854890685e-055.40213709781371e-050.99997298931451
440.0002673087794358970.0005346175588717930.999732691220564
450.003519124379049730.007038248758099460.99648087562095
460.01261888001464140.02523776002928280.987381119985359
470.02746209155168030.05492418310336060.97253790844832
480.04555747189162080.09111494378324170.95444252810838
490.05699990646507740.1139998129301550.943000093534923
500.07416672617796030.1483334523559210.92583327382204
510.1050490358522220.2100980717044440.894950964147778
520.1488970748307120.2977941496614240.851102925169288
530.2276677246833080.4553354493666160.772332275316692
540.3791398663549490.7582797327098970.620860133645051
550.7491740971512320.5016518056975360.250825902848768
560.9113313286006960.1773373427986080.088668671399304
570.9603157838483580.07936843230328350.0396842161516418
580.97661579314850.04676841370300120.0233842068515006
590.9870405333180130.02591893336397380.0129594666819869
600.9925800895396590.01483982092068220.00741991046034112
610.9936781882746820.01264362345063680.00632181172531839
620.9947985181686770.01040296366264520.00520148183132258
630.9961458740674250.007708251865149150.00385412593257458
640.9976108013445220.004778397310956710.00238919865547835
650.9990412488662160.001917502267567530.000958751133783765
660.9998392075331780.0003215849336447080.000160792466822354
670.9999490703375820.0001018593248360625.0929662418031e-05
680.999959615553118.07688937807676e-054.03844468903838e-05
690.9999508124288949.83751422109927e-054.91875711054963e-05
700.9999159115890520.0001681768218962988.40884109481491e-05
710.9998646432733690.0002707134532622480.000135356726631124
720.9997950087797450.0004099824405093900.000204991220254695
730.9996819513683260.0006360972633483060.000318048631674153
740.9995697748019920.0008604503960154060.000430225198007703
750.9994567535155370.001086492968925800.000543246484462902
760.9996758713100420.0006482573799160360.000324128689958018
770.9998861138989290.0002277722021427930.000113886101071396
780.999989023419212.19531615790147e-051.09765807895074e-05
790.9999796633276314.06733447377663e-052.03366723688832e-05
800.9999590095065928.19809868161441e-054.09904934080721e-05
810.9999478654313880.0001042691372240065.21345686120032e-05
820.9999628730263357.42539473290251e-053.71269736645126e-05
830.999939565846060.0001208683078815216.04341539407603e-05
840.999912304981040.0001753900379183218.76950189591607e-05
850.9998786870329330.0002426259341332290.000121312967066615
860.9998124962060480.0003750075879032860.000187503793951643
870.9997460572719640.0005078854560717990.000253942728035899
880.9995489459477530.000902108104493160.00045105405224658
890.9991655203045150.001668959390970680.00083447969548534
900.9984172444278810.003165511144237070.00158275557211853
910.9978031999698150.004393600060370520.00219680003018526
920.998531198146110.002937603707781630.00146880185389082
930.9999141105757240.0001717788485526158.58894242763074e-05
940.999985847689042.83046219216867e-051.41523109608433e-05
950.9999928116663781.43766672433566e-057.18833362167832e-06
960.999982037348723.59253025619023e-051.79626512809511e-05
970.999974403026195.11939476196912e-052.55969738098456e-05
980.9999477739534530.0001044520930940595.22260465470293e-05
990.9997798800995840.0004402398008329480.000220119900416474
1000.9989934566985410.002013086602918080.00100654330145904
1010.9954542924567740.009091415086452950.00454570754322648
1020.9792901777153480.04141964456930480.0207098222846524


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level680.790697674418605NOK
5% type I error level750.872093023255814NOK
10% type I error level780.906976744186046NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/10v0s91229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/10v0s91229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/1ypva1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/1ypva1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/2odcu1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/2odcu1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/3dnbo1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/3dnbo1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/4svg71229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/4svg71229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/57wfv1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/57wfv1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/6ot7f1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/6ot7f1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/7dl1d1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/7dl1d1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/8zz1p1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/8zz1p1229091489.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/9hb1m1229091489.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/12/t12290915986zva0mlmq9nl93q/9hb1m1229091489.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