Home » date » 2010 » Dec » 18 »

Paper Multiple regression dummy

*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, 18 Dec 2010 15:41:02 +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/18/t1292687576sa90jvhqyqyj4sn.htm/, Retrieved Sat, 18 Dec 2010 16:53:07 +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/18/t1292687576sa90jvhqyqyj4sn.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 «
1 41 25 25 15 15 9 9 3 3 1 38 25 25 15 15 9 9 4 4 1 37 19 19 14 14 9 9 4 4 1 42 18 18 10 10 8 8 4 4 1 40 23 23 18 18 15 15 3 3 1 43 25 25 14 14 9 9 4 4 1 40 23 23 11 11 11 11 4 4 1 45 30 30 17 17 6 6 5 5 1 45 32 32 21 21 10 10 4 4 1 44 25 25 7 7 11 11 4 4 1 42 26 26 18 18 16 16 4 4 1 32 25 25 13 13 11 11 5 5 1 32 25 25 13 13 11 11 5 5 1 41 35 35 18 18 7 7 4 4 1 38 20 20 12 12 10 10 4 4 1 38 21 21 9 9 9 9 4 4 1 24 23 23 11 11 15 15 3 3 1 46 17 17 11 11 6 6 5 5 1 42 27 27 16 16 12 12 4 4 1 46 25 25 12 12 10 10 4 4 1 43 18 18 14 14 14 14 5 5 1 38 22 22 13 13 9 9 4 4 1 39 23 23 17 17 14 14 4 4 1 40 25 25 13 13 14 14 3 3 1 37 19 19 13 13 9 9 2 2 1 41 20 20 12 12 8 8 4 4 1 46 26 26 12 12 10 10 4 4 1 26 16 16 12 12 9 9 3 3 1 37 22 22 9 9 9 9 3 3 1 39 25 25 17 17 9 9 4 4 1 44 29 29 18 18 11 11 5 5 1 38 22 22 12 12 10 10 2 2 1 38 32 32 12 12 8 8 0 0 1 38 23 23 9 9 14 14 4 4 1 33 18 18 13 13 10 10 3 3 1 43 26 26 11 11 14 14 4 4 1 41 14 14 13 13 15 15 2 2 1 49 20 20 6 6 8 8 4 4 1 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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Career[t] = + 35.6197069170407 -1.39109054250955G[t] + 0.20798572444025PersonalStandards[t] -0.0619444415950565PeG[t] + 0.304770109016755ParentalExpectations[t] -0.222891855918395PaG[t] -0.0280035539064598Doubts[t] -0.143741846502613DoG[t] -0.286076268589505LeadershipPreference[t] + 1.16963899061508LeaderG[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)35.61970691704075.2536186.7800
G-1.391090542509556.622594-0.21010.8339440.416972
PersonalStandards0.207985724440250.3086070.67390.5014960.250748
PeG-0.06194444159505650.209717-0.29540.7681640.384082
ParentalExpectations0.3047701090167550.4050790.75240.4531370.226569
PaG-0.2228918559183950.268232-0.8310.407460.20373
Doubts-0.02800355390645980.475306-0.05890.9531050.476553
DoG-0.1437418465026130.311976-0.46070.6457220.322861
LeadershipPreference-0.2860762685895051.418512-0.20170.8404760.420238
LeaderG1.169638990615081.016081.15110.2517140.125857


Multiple Linear Regression - Regression Statistics
Multiple R0.360462109240757
R-squared0.129932932198296
Adjusted R-squared0.0719284610115152
F-TEST (value)2.24005028474268
F-TEST (DF numerator)9
F-TEST (DF denominator)135
p-value0.0230062379670575
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.80099053007766
Sum Squared Residuals3111.68385943587


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14140.21280180453130.787198195468745
23841.096364526557-3.09636452655697
33740.1382385763875-3.13823857638747
44239.83642968155792.16357031844209
54039.13588159568170.864118404318318
64341.01448627345861.98551372654136
74040.133278147655-0.133278147655021
84543.38912637023251.61087362976753
94542.43817762465442.56182237534557
104440.0978477009523.90215229904804
114240.28582276583381.71417723416624
123241.4726799415677-9.4726799415677
133241.4726799415677-9.4726799415677
144143.1459029151222-2.14590291512216
153839.9487779526269-1.94877795262687
163840.0209298765861-2.02092987658606
172438.5627338239932-14.5627338239932
184640.99932017465485.00067982534521
194240.95508914411851.04491085588148
204640.67898436685285.32101563314716
214340.01703301352252.98296698647752
223840.4944841718247-2.49448417182469
233940.109311465018-1.10931146501796
244039.19031829628930.80968170371066
253738.289234879238-1.28923487923797
264140.2922687534450.707731246554982
274640.8250256496985.17497435030197
282638.6527954996296-12.6527954996296
293739.2834084374057-2.28340843740568
303941.2601210327537-2.26012103275372
314442.46623633844031.53376366155973
323838.4737350742661-0.473735074266121
333838.5105132594851-0.510513259485067
343839.4542854402311-1.45428544023108
353338.8550109180093-5.85501091800928
364340.05616579496342.94383420503662
374136.52855606255764.47144393744243
384939.80099923485499.19900076514515
394541.48066883578013.51933116421995
403139.1872898308094-8.18728983080944
413039.1872898308094-9.18728983080944
423840.6325365604575-2.63253656045754
433940.2793194305002-1.27931943050021
444040.2585757416688-0.258575741668787
453636.7130562575857-0.713056257585715
464942.5061808095026.49381919049797
474140.42536071334540.574639286654593
484239.51783130868282.48216869131722
494142.0618055016809-1.06180550168093
504340.00495208816142.99504791183865
514640.09246463925015.90753536074989
524142.23355090209-1.23355090209000
533940.097847700952-1.09784770095196
544239.82998369394672.17001630605335
553540.7167694097779-5.71676940977785
563638.9159509539505-2.91595095395048
574839.41602105637398.58397894362615
584139.94877795262691.05122204737313
594739.50681394899057.49318605100947
604139.60293255558681.39706744441323
613141.2175133814592-10.2175133814592
623641.2648869331604-5.26488693316044
634641.26012103275374.73987896724628
644440.68394479558533.31605520441471
654338.09159083293934.90840916706071
664040.17106319058-0.171063190580029
674039.57246253761620.42753746238383
684637.85823152733118.14176847266893
693940.4205948129387-1.42059481293868
704441.25838359782692.74161640217311
713837.57178325963110.42821674036892
723939.414283621447-0.414283621447033
734142.2720098142729-1.27200981427295
743939.2721965493877-0.272196549387701
754039.7867588813570.213241118643025
764440.32769920014813.67230079985193
774239.48018408612072.51981591387931
784642.04885617873613.95114382126388
794440.01770688278043.98229311721957
803740.4430759366969-3.44307593669693
813938.29400077964470.705999220355303
824038.84206159506451.15793840493553
834239.51783130868282.48216869131722
843739.3011236607572-2.30112366075721
853338.7530628453374-5.75306284533743
863539.7545514284595-4.75455142845955
874236.89298508053295.10701491946713
883635.41289599986050.587104000139514
894440.08079723421253.9192027657875
904539.88286686982265.11713313017744
914740.83766880546376.16233119453627
924040.7552350902808-0.755235090280824
934938.871148172611510.1288518273885
944842.50039627477375.4996037252263
952941.5109399043595-12.5109399043595
964542.79843348194812.20156651805187
972935.2484256767422-6.24842567674217
984141.0669989778105-0.0669989778105502
993436.5149914999131-2.51499149991306
1003835.9074737263882.09252627361203
1013738.1811690475746-1.18116904757464
1024844.77917716405033.22082283594965
1033941.4540231427896-2.45402314278962
1043439.0639653325826-5.0639653325826
1053536.2246240993669-1.22462409936689
1064139.37736470985071.62263529014931
1074340.93482193879132.06517806120869
1084138.76150674141952.23849325858051
1093935.77274008515933.22725991484069
1103640.7615150518722-4.7615150518722
1113241.7000337049487-9.70003370494865
1124640.57075812521585.42924187478417
1134241.3192895015610.680710498439039
1144235.81248008802236.18751991197769
1154540.43393661434364.56606338565642
1163940.8627886518292-1.86278865182924
1174541.44774318119823.55225681880176
1184844.11101926957343.88898073042661
1192838.9849816957513-10.9849816957513
1203537.1016091553493-2.10160915534929
1213838.5765610437887-0.576561043788678
1224240.32730416526621.67269583473378
1233638.1242522860047-2.12425228600474
1243741.6075966687924-4.60759666879241
1253839.476578076493-1.47657807649300
1264339.09742537385423.90257462614578
1273533.88609656528061.11390343471943
1283640.4929412455571-4.49294124555707
1293335.6333896084065-2.63338960840651
1303938.52220088442820.477799115571802
1313240.7933119670766-8.79331196707659
1324539.32928451208165.67071548791841
1333540.7243316512186-5.72433165121862
1343838.4694762148061-0.469476214806086
1353637.8322217593913-1.83222175939134
1364238.36192265325773.63807734674233
1374139.81132995175521.18867004824482
1384737.67775475724649.32224524275364
1393537.7346715188163-2.73467151881626
1404337.49327779218145.50672220781863
1414039.95440378788990.0455962121100531
1424641.37620626313094.62379373686914
1434442.79843348194811.20156651805187
1443538.7045899798496-3.70458997984960
1452939.1506187760422-10.1506187760422


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
130.8390641465699730.3218717068600540.160935853430027
140.8193166560742140.3613666878515720.180683343925786
150.7180670149272310.5638659701455380.281932985072769
160.613031359273930.7739372814521390.386968640726069
170.9589073488042970.0821853023914070.0410926511957035
180.9511080175727250.09778396485454980.0488919824272749
190.9330899201124930.1338201597750140.0669100798875071
200.9454303566583540.1091392866832920.0545696433416459
210.941539424465690.1169211510686200.0584605755343101
220.9206505352492320.1586989295015350.0793494647507677
230.8869435249260920.2261129501478160.113056475073908
240.8625991003211350.2748017993577310.137400899678865
250.8240051022613820.3519897954772360.175994897738618
260.7713293256986510.4573413486026970.228670674301349
270.794116381253170.411767237493660.20588361874683
280.9375381458552390.1249237082895230.0624618541447614
290.9152647348334490.1694705303331020.084735265166551
300.8912341879200860.2175316241598280.108765812079914
310.8583456970913940.2833086058172120.141654302908606
320.8250064709033060.3499870581933880.174993529096694
330.7820557321689240.4358885356621530.217944267831076
340.7360940257909220.5278119484181550.263905974209078
350.7234670789138390.5530658421723210.276532921086161
360.6973654667596930.6052690664806130.302634533240307
370.7495994730114790.5008010539770430.250400526988521
380.8474033456087990.3051933087824030.152596654391201
390.8240557943834790.3518884112330430.175944205616522
400.853131225657370.2937375486852610.146868774342631
410.8949921641811450.2100156716377110.105007835818855
420.8730341481284990.2539317037430020.126965851871501
430.8438425892251450.3123148215497090.156157410774855
440.809525579821690.3809488403566190.190474420178310
450.7835499683918080.4329000632163830.216450031608192
460.8088927387779140.3822145224441720.191107261222086
470.7705590870615270.4588818258769470.229440912938473
480.7579196336400220.4841607327199550.242080366359978
490.7141839693173650.5716320613652710.285816030682635
500.6904138265130260.6191723469739480.309586173486974
510.7314619720749550.5370760558500910.268538027925045
520.6873981136986810.6252037726026380.312601886301319
530.6522772982136320.6954454035727360.347722701786368
540.6227838693331760.7544322613336480.377216130666824
550.6494015642582130.7011968714835740.350598435741787
560.6329867609644340.7340264780711320.367013239035566
570.734241182432150.53151763513570.26575881756785
580.6915391481249540.6169217037500930.308460851875046
590.7621346071968040.4757307856063920.237865392803196
600.723716260913670.5525674781726610.276283739086331
610.830483416759420.3390331664811610.169516583240581
620.8427350853695160.3145298292609680.157264914630484
630.8374154495015620.3251691009968760.162584550498438
640.8198236331874480.3603527336251040.180176366812552
650.8160226088143320.3679547823713360.183977391185668
660.7957805634124810.4084388731750380.204219436587519
670.7595170732472970.4809658535054050.240482926752703
680.7968271030684540.4063457938630910.203172896931546
690.7608991793958320.4782016412083360.239100820604168
700.7606344098394430.4787311803211130.239365590160557
710.7196200539247410.5607598921505190.280379946075259
720.6797794700078670.6404410599842660.320220529992133
730.6343270481965160.7313459036069680.365672951803484
740.5881486641629470.8237026716741070.411851335837053
750.5827027543460240.8345944913079530.417297245653976
760.5468660053653410.9062679892693180.453133994634659
770.5025697737133420.9948604525733160.497430226286658
780.4952736045251620.9905472090503230.504726395474838
790.4715950643388430.9431901286776870.528404935661157
800.4327708193057750.865541638611550.567229180694225
810.3834739954670740.7669479909341480.616526004532926
820.3415979270815210.6831958541630410.658402072918479
830.3010041443161940.6020082886323890.698995855683806
840.2624012182995690.5248024365991370.737598781700431
850.2449416774081460.4898833548162920.755058322591854
860.2201633460075110.4403266920150220.779836653992489
870.2022121304076270.4044242608152540.797787869592373
880.1678087694837310.3356175389674610.83219123051627
890.1476989934652680.2953979869305360.852301006534732
900.1377937453408050.275587490681610.862206254659195
910.1448131848877040.2896263697754070.855186815112296
920.1171141476102970.2342282952205930.882885852389703
930.1738097695135360.3476195390270710.826190230486464
940.1853867183592740.3707734367185490.814613281640726
950.3335135153568460.6670270307136930.666486484643154
960.3093530624655720.6187061249311440.690646937534428
970.3360117518491410.6720235036982820.663988248150859
980.3207421735997380.6414843471994760.679257826400262
990.3056691045013330.6113382090026650.694330895498667
1000.2628370479497160.5256740958994320.737162952050284
1010.2226783036780280.4453566073560560.777321696321972
1020.2609121271000320.5218242542000630.739087872899968
1030.2229517220823580.4459034441647160.777048277917642
1040.2489347347991440.4978694695982880.751065265200856
1050.2186792822992130.4373585645984270.781320717700787
1060.1876337574516990.3752675149033980.812366242548301
1070.1573810342573940.3147620685147890.842618965742606
1080.1302061665460450.2604123330920900.869793833453955
1090.1067648088754650.2135296177509310.893235191124535
1100.09705816994128780.1941163398825760.902941830058712
1110.2000146292236120.4000292584472230.799985370776388
1120.2036531117418780.4073062234837570.796346888258122
1130.1616465265310790.3232930530621580.838353473468921
1140.1672288402169520.3344576804339050.832771159783048
1150.1539843867287120.3079687734574230.846015613271288
1160.12165313896840.24330627793680.8783468610316
1170.1019130364069280.2038260728138560.898086963593072
1180.1011690607129490.2023381214258980.898830939287051
1190.238924149409370.477848298818740.76107585059063
1200.1923921940713570.3847843881427140.807607805928643
1210.1444733505527840.2889467011055670.855526649447216
1220.1162403211158420.2324806422316840.883759678884158
1230.08548748947992120.1709749789598420.914512510520079
1240.06799908197328510.1359981639465700.932000918026715
1250.04643181766323140.09286363532646290.953568182336769
1260.04000159372829220.08000318745658440.959998406271708
1270.02389821303836530.04779642607673060.976101786961635
1280.01739206475580200.03478412951160390.982607935244198
1290.01427222022099040.02854444044198070.98572777977901
1300.008086736612854690.01617347322570940.991913263387145
1310.02223733873523030.04447467747046060.97776266126477
1320.01018998215575420.02037996431150830.989810017844246


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level60.05NOK
10% type I error level100.0833333333333333OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/10forz1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/10forz1292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/185un1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/185un1292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/2jfc81292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/2jfc81292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/3jfc81292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/3jfc81292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/4jfc81292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/4jfc81292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/5t6bt1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/5t6bt1292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/6t6bt1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/6t6bt1292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/74xse1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/74xse1292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/84xse1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/84xse1292686850.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/9forz1292686850.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292687576sa90jvhqyqyj4sn/9forz1292686850.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