Home » date » 2010 » Dec » 13 »

Multiple Regression

*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: Mon, 13 Dec 2010 11:25:01 +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/13/t12922393982gbuby474ro5lcu.htm/, Retrieved Mon, 13 Dec 2010 12:23:38 +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/13/t12922393982gbuby474ro5lcu.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
24 14 11 12 24 25 11 7 8 25 17 6 17 8 30 18 12 10 8 19 18 8 12 9 22 16 10 12 7 22 20 10 11 4 25 16 11 11 11 23 18 16 12 7 17 17 11 13 7 21 23 13 14 12 19 30 12 16 10 19 23 8 11 10 15 18 12 10 8 16 15 11 11 8 23 12 4 15 4 27 21 9 9 9 22 15 8 11 8 14 20 8 17 7 22 31 14 17 11 23 27 15 11 9 23 34 16 18 11 21 21 9 14 13 19 31 14 10 8 18 19 11 11 8 20 16 8 15 9 23 20 9 15 6 25 21 9 13 9 19 22 9 16 9 24 17 9 13 6 22 24 10 9 6 25 25 16 18 16 26 26 11 18 5 29 25 8 12 7 32 17 9 17 9 25 32 16 9 6 29 33 11 9 6 28 13 16 12 5 17 32 12 18 12 28 25 12 12 7 29 29 14 18 10 26 22 9 14 9 25 18 10 15 8 14 17 9 16 5 25 20 10 10 8 26 15 12 11 8 20 20 14 14 10 18 33 14 9 6 32 29 10 12 8 25 23 14 17 7 25 26 16 5 4 23 18 9 12 8 21 20 10 12 8 20 11 6 6 4 15 28 8 24 20 30 26 13 12 8 24 22 10 12 8 26 17 8 14 6 24 12 7 7 4 22 14 15 13 8 14 17 9 12 9 24 21 10 13 6 24 19 12 14 7 24 18 13 8 9 24 10 10 11 5 19 29 11 9 5 31 31 8 11 8 22 19 9 13 8 27 9 13 10 6 19 20 11 11 8 25 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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
CM[t] = -3.87026014455679 + 0.791349774058288D[t] + 0.270704258738879PE[t] + 0.21984376460609PC[t] + 0.521408237815546PS[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-3.870260144556792.544353-1.52110.1302810.06514
D0.7913497740582880.1293686.11700
PE0.2707042587388790.1317372.05490.041580.02079
PC0.219843764606090.1660721.32380.1875360.093768
PS0.5214082378155460.0872495.976100


Multiple Linear Regression - Regression Statistics
Multiple R0.634260918916661
R-squared0.402286913265007
Adjusted R-squared0.386761898025137
F-TEST (value)25.9121750960920
F-TEST (DF numerator)4
F-TEST (DF denominator)154
p-value2.22044604925031e-16
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.48151208983068
Sum Squared Residuals3092.92839413998


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12425.3383064212335-1.33830642123346
22521.52347324349393.47652675650607
31722.880808149669-5.88080814966899
41819.9984863668756-1.99848636687556
51819.1585642661729-1.15856426617294
61620.3015762850773-4.3015762850773
72020.9355654459668-0.935565445966783
81622.2230050966366-6.22300509663661
91822.4426337403493-4.4426337403493
101720.8422220800589-3.84222208005892
112322.75202823431370.247971765686269
123022.06239944852107.93760055147898
132315.45784610733137.5421538926687
141818.4342616534289-0.434261653428935
151521.5634738028183-6.56347380281834
161218.3131003122037-6.31310031220366
172119.13780126401461.86219873598545
181514.49675034030360.503249659696426
192020.0723980306551-0.0723980306551169
203126.22127997124474.77872002875525
212724.94871666365762.05128333634242
223427.03186730246916.96813269753089
232119.80647290268671.19352709731333
243121.05977767717669.9402223228234
251919.9992490893717-0.999249089371705
261620.4920852802051-4.49208528020508
272021.6667202360762-1.66672023607619
282118.65639358552342.34360641447657
292222.0755475508178-0.0755475508177945
301719.5610870051518-2.5610870051518
312420.83384445770123.16615554229879
322530.7381273145773-5.73812731457728
332625.92732174706550.0726782529345073
342523.93295911511621.06704088488383
351722.8676600473722-5.86766004737222
363227.66757605331314.33242394668689
373323.18941894520619.81058105479388
381322.0029462111371-9.00294621113711
393227.73616963555094.26383036444914
402525.5341334979027-0.534133497902686
412927.83636517882421.16363482117583
422222.0555472711556-0.0555472711555819
431817.16226692337570.837733076624338
441721.717580730209-4.71758073020898
452022.0656444834678-2.06564448346781
461520.79059886343-5.79059886342999
472022.5822822413443-2.58228224134429
483327.64910121864325.35089878135683
492922.08564476313006.91435523686998
502326.3847213884515-3.38472138845148
512623.01662206225212.98337793774786
521819.2086620378096-1.20866203780955
532019.47860357405230.521396425947703
541111.2025626778838-0.202562677883789
552828.9965626842308-0.996562684230797
562623.93828584748932.06171415251066
572222.6070530009456-0.607053000945567
581720.0832579654635-3.08325796546348
591215.9144743753898-3.91447437538977
601420.5776072761893-6.57760727618934
611720.9927305158623-3.99273051586228
622121.3952532548412-0.395253254841176
631923.4685008263027-4.46850082630272
641823.0753125771399-5.07531257713991
651018.0269597836796-8.0269597836796
662924.53379989404674.46620010595333
673118.668016242827912.3319837571721
681922.6078157234417-3.6078157234417
69920.3501486117217-11.3501486117217
702022.6062902784494-2.60629027844943
712817.676060261329610.3239397386704
721918.17670549698680.823294503013172
733023.36906800552556.63093199447445
742927.28333400404191.71666599595809
752621.66672023607624.33327976392381
762319.47860357405233.5213964259477
771322.9964276376277-9.9964276376277
782122.8653718798838-1.86537187988381
791922.0841193181377-3.08411931813775
802822.7080112667155.29198873328499
812325.9614356473142-2.96143564731423
821814.47827550563363.52172449436637
832120.81059914309220.189400856907795
842022.0254497791811-2.02544977918114
852320.38024610369612.61975389630388
862121.13292661846-0.132926618460010
872121.6768174483884-0.676817448388418
881523.3961146075154-8.39611460751544
892827.11304040946970.886959590530259
901917.69453509599961.30546490400043
912621.62118647431664.37881352568343
921013.4779419017776-3.47794190177762
931617.2340845646290-1.23408456462904
942220.89384529668781.10615470331216
951919.3776453082829-0.377645308282855
963129.05121581491311.94878418508689
973125.50936273830145.49063726169859
982924.87766174490034.12233825509966
991917.42459355975681.57540644024317
1002218.70649135716013.29350864283991
1012322.29462859292770.705371407072252
1021516.1434584848497-1.14345848484971
1032021.0218711403783-1.02187114037834
1041819.6691125691801-1.66911256918008
1052322.81298594075870.187014059241253
1062520.14954240428174.85045759571834
1072116.09183526822084.90816473177922
1082418.87623735012955.12376264987048
1092525.1584632159514-0.158463215951443
1101719.5972739519955-2.59727395199554
1111314.5476108344364-1.54761083443636
1122818.81527964368459.1847203563155
1132119.82895549479951.17104450520046
1142527.2094346653622-2.20943466536215
115920.5825928770218-11.5825928770218
1161618.0284852286719-2.02848522867188
1171920.2737669605913-1.27376696059127
1181719.0181530426818-2.01815304268177
1192524.71877568673930.281224313260737
1202014.65790359002195.3420964099781
1212921.16550642288517.8344935771149
1221418.4858848700579-4.48588487005786
1232226.4519836706592-4.4519836706592
1241515.8319909442903-0.831990944290269
1251925.5680322772580-6.56803227725802
1262022.1448828796205-2.14488287962052
1271517.5179369256647-2.51793692566469
1282022.0848820406339-2.08488204063389
1291820.7612640939517-2.76126409395169
1303325.50174783843987.49825216156016
1312223.2858218519299-1.28582185192991
1321616.6016208487318-0.60162084873183
1331719.3212429608835-2.32124296088350
1341615.16159971566360.838400284336364
1352117.39297062279013.60702937720988
1362627.5864239222436-1.58642392224364
1371820.8915571291994-2.89155712919943
1381822.0732593833294-4.07325938332938
1391718.6371560283574-1.63715602835736
1402223.9946881948887-1.99468819488870
1413023.61595837212156.38404162787847
1423027.00577756793762.99422243206241
1432429.0519871882406-5.05198718824062
1442121.9437080946466-0.943708094646615
1452125.4299301971865-4.42993019718646
1462927.16616809515981.83383190484022
1473122.86766004737228.13233995262778
1482018.71811401446461.28188598553541
1491613.69301518644472.30698481355535
1502218.87700007262573.12299992737434
1512020.1821431846379-0.182143184637916
1522827.39515220461970.604847795380283
1533827.179122052494310.8208779475057
1542218.26756655044403.73243344955596
1552025.6204391923142-5.62043919231424
1561717.9968622917052-0.996862291705163
1572824.45893136280873.54106863719125
1582224.1472696772871-2.14726967728707
1593126.31615743297634.68384256702374


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.2116404479719040.4232808959438080.788359552028096
90.1036325976370020.2072651952740040.896367402362998
100.04628332324331210.09256664648662410.953716676756688
110.1364534558086200.2729069116172410.86354654419138
120.678571770591380.642856458817240.32142822940862
130.6434140760114610.7131718479770770.356585923988539
140.5677835581716620.8644328836566760.432216441828338
150.5691225577631250.861754884473750.430877442236875
160.5132834821551470.9734330356897070.486716517844853
170.4364452853434310.8728905706868620.563554714656569
180.3924405874403260.7848811748806520.607559412559674
190.333851104177080.667702208354160.66614889582292
200.3899997676210820.7799995352421630.610000232378918
210.3659118872742890.7318237745485780.634088112725711
220.3858648280572930.7717296561145860.614135171942707
230.3329082798398040.6658165596796090.667091720160196
240.5630825796052690.8738348407894620.436917420394731
250.4976826196183040.995365239236610.502317380381696
260.4739191662707820.9478383325415630.526080833729218
270.4153803025466250.830760605093250.584619697453375
280.3638986948034450.727797389606890.636101305196555
290.3070215998006770.6140431996013540.692978400199323
300.2578655940895810.5157311881791620.742134405910419
310.3024088174096850.6048176348193710.697591182590314
320.3668535912507940.7337071825015880.633146408749206
330.3390286004369580.6780572008739160.660971399563042
340.3612078932414410.7224157864828830.638792106758559
350.3684445469532230.7368890939064450.631555453046777
360.3614744902540230.7229489805080450.638525509745977
370.5775782003888080.8448435992223830.422421799611192
380.782605170457610.4347896590847820.217394829542391
390.7844052903210430.4311894193579130.215594709678957
400.743494921594230.5130101568115390.256505078405769
410.7028843929741170.5942312140517660.297115607025883
420.6551463962620430.6897072074759150.344853603737957
430.6113685549427860.7772628901144290.388631445057214
440.5974323763860620.8051352472278760.402567623613938
450.560291520252910.8794169594941790.439708479747090
460.5998473112539420.8003053774921160.400152688746058
470.5683148427269510.8633703145460970.431685157273049
480.5717093348773400.856581330245320.42829066512266
490.637060955314450.7258780893711010.362939044685550
500.610135935480980.779728129038040.38986406451902
510.5770588537046840.8458822925906310.422941146295316
520.5299873110626770.9400253778746470.470012688937323
530.4814049680146380.9628099360292770.518595031985362
540.4322109349337130.8644218698674250.567789065066287
550.3856905303426280.7713810606852570.614309469657372
560.3474237604999480.6948475209998960.652576239500052
570.3042949316562460.6085898633124910.695705068343754
580.2784089067297750.556817813459550.721591093270225
590.2684936646588810.5369873293177630.731506335341119
600.3099990656917840.6199981313835690.690000934308216
610.3028804624301690.6057609248603380.69711953756983
620.2641276015798870.5282552031597750.735872398420113
630.2609548001926870.5219096003853740.739045199807313
640.2953235284015710.5906470568031410.70467647159843
650.3788383685787300.7576767371574610.62116163142127
660.3732231138836820.7464462277673640.626776886116318
670.6928331172637780.6143337654724430.307166882736222
680.6788361168459370.6423277663081260.321163883154063
690.8608027604399890.2783944791200220.139197239560011
700.843539452707710.312921094584580.15646054729229
710.9396816088313610.1206367823372780.0603183911686388
720.9250948220712230.1498103558575540.0749051779287768
730.9431374654455670.1137250691088670.0568625345544334
740.9317961582565130.1364076834869740.0682038417434868
750.9320909991648740.1358180016702520.067909000835126
760.9267805763325290.1464388473349430.0732194236674715
770.974450704893840.0510985902123210.0255492951061605
780.9683104951053280.06337900978934330.0316895048946717
790.9636716847383820.0726566305232360.036328315261618
800.9672576227535720.06548475449285680.0327423772464284
810.9621129246643140.0757741506713720.037887075335686
820.9590834075208950.08183318495821020.0409165924791051
830.9482063015569030.1035873968861930.0517936984430967
840.937796732227950.1244065355441020.0622032677720508
850.9281538517128370.1436922965743260.0718461482871632
860.9143747421262240.1712505157475510.0856252578737754
870.895568279027220.2088634419455610.104431720972780
880.9408640997971940.1182718004056120.0591359002028062
890.9277051811775190.1445896376449630.0722948188224815
900.911844446412740.1763111071745200.0881555535872599
910.9105046105100870.1789907789798270.0894953894899133
920.9024302293614210.1951395412771580.0975697706385788
930.8842654722984640.2314690554030720.115734527701536
940.8623757342967720.2752485314064570.137624265703228
950.8348482008466740.3303035983066520.165151799153326
960.808480417822790.3830391643544210.191519582177211
970.8215198341742960.3569603316514090.178480165825704
980.8169005859516840.3661988280966320.183099414048316
990.7864659305562360.4270681388875280.213534069443764
1000.7676187437548460.4647625124903080.232381256245154
1010.7296590299721670.5406819400556670.270340970027833
1020.6945713112666340.6108573774667330.305428688733366
1030.6565078333637140.6869843332725720.343492166636286
1040.6174373294097410.7651253411805190.382562670590259
1050.5706569314495550.858686137100890.429343068550445
1060.5674690700234910.8650618599530180.432530929976509
1070.5738047810613140.8523904378773710.426195218938686
1080.5952378461490830.8095243077018330.404762153850917
1090.5456896300755040.9086207398489920.454310369924496
1100.5227976374794180.9544047250411640.477202362520582
1110.4822488274088520.9644976548177050.517751172591148
1120.6753407582433830.6493184835132340.324659241756617
1130.6644860894214350.671027821157130.335513910578565
1140.6231605477879740.7536789044240530.376839452212026
1150.8156093711932710.3687812576134580.184390628806729
1160.7980927304159910.4038145391680180.201907269584009
1170.7755282190511720.4489435618976560.224471780948828
1180.7456119024366240.5087761951267520.254388097563376
1190.6990321678366820.6019356643266360.300967832163318
1200.7328205229879830.5343589540240330.267179477012017
1210.7902987816206960.4194024367586090.209701218379304
1220.7868151732063430.4263696535873130.213184826793657
1230.7861111687500380.4277776624999240.213888831249962
1240.7420343371434410.5159313257131170.257965662856559
1250.7896968186773490.4206063626453020.210303181322651
1260.7670029199164580.4659941601670840.232997080083542
1270.7590160937320140.4819678125359720.240983906267986
1280.7308953799057040.5382092401885930.269104620094296
1290.707901038180670.5841979236386590.292098961819329
1300.774565228197410.450869543605180.22543477180259
1310.7256418638152220.5487162723695560.274358136184778
1320.6700852202014070.6598295595971850.329914779798593
1330.6694184882239320.6611630235521370.330581511776068
1340.6128107809877930.7743784380244140.387189219012207
1350.5770331454064150.845933709187170.422966854593585
1360.5517010499927590.8965979000144830.448298950007241
1370.5590750936131880.8818498127736230.440924906386812
1380.5799307423986710.8401385152026580.420069257601329
1390.5283085194822850.943382961035430.471691480517715
1400.4520967641192160.9041935282384310.547903235880784
1410.5642414748368140.8715170503263710.435758525163186
1420.5056895499194680.9886209001610640.494310450080532
1430.4571576180313630.9143152360627260.542842381968637
1440.3720925243865010.7441850487730010.6279074756135
1450.4409981725150250.881996345030050.559001827484975
1460.3442221296911380.6884442593822760.655777870308862
1470.3868152163330810.7736304326661620.613184783666919
1480.2823878728726980.5647757457453950.717612127127302
1490.1972451135617110.3944902271234220.802754886438289
1500.1553472756133740.3106945512267470.844652724386626
1510.1162953637282620.2325907274565240.883704636271738


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level70.0486111111111111OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/101ajb1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/101ajb1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/1504k1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/1504k1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/2504k1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/2504k1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/3504k1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/3504k1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/4ga3n1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/4ga3n1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/5ga3n1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/5ga3n1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/6ga3n1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/6ga3n1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/7r12q1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/7r12q1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/81ajb1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/81ajb1292239489.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/91ajb1292239489.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t12922393982gbuby474ro5lcu/91ajb1292239489.ps (open in new window)


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