Home » date » 2010 » Nov » 22 »

W7 - model 4

*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, 22 Nov 2010 19:23:10 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa.htm/, Retrieved Mon, 22 Nov 2010 20:22:10 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa.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 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 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'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
YT[t] = -2.70676782746942 + 0.80482569659637X1[t] + 0.246618734551964X2[t] + 0.190858166207394X3[t] + 0.568212974041801X4[t] -0.100756792404193X5[t] + 0.00564436253658337t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-2.706767827469423.230753-0.83780.4034510.201726
X10.804825696596370.1307656.154700
X20.2466187345519640.1331411.85230.065920.03296
X30.1908581662073940.1685681.13220.259320.12966
X40.5682129740418010.0960195.917700
X5-0.1007567924041930.105352-0.95640.3403970.170199
t0.005644362536583370.0080040.70520.4817420.240871


Multiple Linear Regression - Regression Statistics
Multiple R0.639616097712746
R-squared0.409108752453280
Adjusted R-squared0.385784097944857
F-TEST (value)17.5397561539675
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.22044604925031e-15
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation4.48508352276095
Sum Squared Residuals3057.62807933355


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12424.5869751364713-0.586975136471266
22521.29871815743543.70128184256465
31722.3859726679103-5.38597266791033
41819.4454109385100-1.44541093850996
51819.0235142417146-1.0235142417146
61619.2495257409872-3.24952574098717
72020.5436429620918-0.543642962091784
81621.9567214062097-5.95672140620966
91821.9596456847955-3.95964568479549
101720.1583618178568-3.15836181785681
112321.93889798349571.06110201650434
123021.85577854055028.14422145944983
132314.73314737815758.26685262184252
141818.6032699809839-0.603269980983944
151521.3229006529394-6.32290065293937
161217.5861185544217-5.58611855442169
172119.05545929268981.94454070731015
181514.81900780842570.180992191574261
192019.45012869555080.549871304449198
203126.01940004615384.98059995384625
212724.86768457315592.13231542684406
223426.7505329508887.24946704911197
232119.28045609096921.71954390903085
243120.599736608392610.4002633916074
251919.0701646017546-0.0701646017546488
261619.9463310706595-3.94633107065954
272021.3206525792539-1.32065257925392
282117.99635612705803.00364387294205
292221.68367835586360.316321644136378
301719.2404660680385-2.24046606803853
312420.16455935666393.83544064333613
322530.1993051078831-5.19930510788305
332626.390560835707-0.390560835707015
342523.88307340885351.11692659114646
351722.7338898244853-5.73388982448527
363227.59685762230484.40314237769521
373323.41318769743459.5868123025655
381321.7416158659416-8.74161586594162
393227.59401972731614.40598027268393
402525.6331170331415-0.633117033141505
412926.89076322585002.10923677414995
422221.83203057377710.167969426222923
431817.05245924122000.947540758780045
441721.5731241031246-4.5731241031246
452022.0446692276097-2.04466922760975
461520.2957922888318-5.29579228883185
472021.9969914249524-1.99699142495244
483327.96109108648485.03890891351517
492921.99227117281827.00772882718179
502326.4609674131011-3.46096741310109
512623.10556753028852.89443246971152
521818.8307698752602-0.830769875260195
532018.66999979073461.33000020926542
541111.5812129333856-0.581212933385631
552828.8095440113788-0.809544011378844
562623.27350507189642.72649492810355
572222.2026118775359-0.202611877535904
581720.0774839975063-3.07748399750625
591215.4292884866592-3.42928848665917
601420.780061210624-6.78006121062399
611720.6763094340180-3.67630943401805
622121.261580521485-0.261580521484977
631922.9113260083569-3.91132600835689
641823.0268271622096-5.02682716220961
651017.8541098959786-7.8541098959786
662924.28460062767994.71539937232013
673118.432203856202412.5677961437976
681922.8792466318609-3.87924663186087
69920.0338902827611-11.0338902827611
702022.4674961633225-2.46749616332248
712817.575629511418110.4243704885819
721918.11369954853280.886300451467232
733023.08778011783416.91221988216585
742927.0733696770651.92663032293499
752621.49082518860574.50917481139427
762319.50511767590533.49488232409466
771322.7601530313896-9.76015303138962
782122.6443090003536-1.64430900035360
791921.5370492704958-2.53704927049576
802822.93773130259005.06226869740997
812325.6175014577243-2.61750145772434
821813.86463944604104.13536055395897
832120.73192857496010.268071425039861
842021.8476069466243-1.84760694662434
852320.04341655982312.95658344017692
862120.85973339265540.140266607344566
872121.8550198976718-0.855019897671838
881522.9508811919658-7.95088119196579
892827.19650374341430.803496256585704
901917.68864166308471.31135833691528
912621.29541407010554.70458592989447
921013.3326243716318-3.3326243716318
931617.1873143264118-1.18731432641177
942221.20203881329270.797961186707256
951918.90630468498350.093695315016476
963128.91577792891492.08422207108510
973125.30188490848825.69811509151183
982924.85512878768244.14487121231755
991917.50282820335941.49717179664060
1002218.95228874806013.04771125193990
1012322.4724381975160.527561802483991
1021516.2874647056108-1.28746470561081
1032021.4645212040962-1.46452120409623
1041819.6425371514452-1.64253715144523
1052322.2171502344810.782849765518977
1062520.97445993751394.02554006248606
1072116.65294710756854.34705289243146
1082419.54557442782974.45442557217025
1092525.3595410763598-0.359541076359750
1101719.6935475859109-2.69354758591087
1111314.6943965458432-1.69439654584321
1122818.40987461177099.59012538822914
1132120.31063468010390.68936531989613
1142528.2836350486841-3.28363504868414
115921.0044477704288-12.0044477704288
1161618.0612276169349-2.06122761693494
1171921.2966898433180-2.29668984331795
1181719.6269476477759-2.62694764777592
1192524.73199799209820.268002007901782
1202015.63695124201494.36304875798511
1212921.87593440090527.12406559909482
1221419.1778709228727-5.17787092287272
1232227.0980959242537-5.09809592425374
1241515.9019397751253-0.901939775125261
1251925.6813751580878-6.6813751580878
1262022.1919545613241-2.19195456132412
1271517.7608142090159-2.76081420901587
1282022.1258994239983-2.12589942399832
1291820.5527935376764-2.55279353767642
1303325.78884797934847.21115202065161
1312224.0146988185677-2.01469881856772
1321616.7435243851904-0.743524385190442
1331719.4036823708245-2.40368237082452
1341615.3816109084570.618389091543015
1352117.36376958458823.63623041541182
1362627.9214437785666-1.92144377856657
1371821.4147283663736-3.41472836637364
1381823.2764637604010-5.27646376040095
1391718.7078618855540-1.70786188555397
1402224.9760915015815-2.97609150158152
1413024.9522424586755.04775754132501
1423027.62202950655532.37797049344472
1432430.0288532518421-6.02885325184213
1442122.3733372368221-1.37333723682208
1452125.7186060818219-4.71860608182192
1462927.77606260715771.22393739284233
1473123.5675720133917.432427986609
1482019.33817894762960.661821052370389
1491614.42711320950251.57288679049751
1502219.28885970434272.71114029565732
1512020.7667282598620-0.766728259862024
1522827.72009986542640.279900134573619
1533827.081132159721610.9188678402784
1542219.59067155144762.40932844855245
1552026.0566974089159-6.05669740891588
1561718.4485304103310-1.44853041033102
1572824.90557661215673.09442338784327
1582224.5396741854444-2.53967418544438
1593126.45186828782174.54813171217832


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.09861376610248360.1972275322049670.901386233897516
110.3549755718872730.7099511437745470.645024428112727
120.7492056729243740.5015886541512530.250794327075626
130.7439942746184630.5120114507630750.256005725381537
140.727142351575680.5457152968486410.272857648424320
150.6898060323229990.6203879353540020.310193967677001
160.6075205230409110.7849589539181780.392479476959089
170.5529639770054770.8940720459890470.447036022994523
180.5244892972136250.951021405572750.475510702786375
190.4697051197851490.9394102395702980.530294880214851
200.4986893216137590.9973786432275170.501310678386241
210.4311761806996560.8623523613993120.568823819300344
220.4194510925287390.8389021850574790.58054890747126
230.3769374835137510.7538749670275010.62306251648625
240.5309343490541260.9381313018917470.469065650945874
250.4887782716235480.9775565432470950.511221728376452
260.505724304437270.988551391125460.49427569556273
270.4383934621962860.8767869243925720.561606537803714
280.3793593171190680.7587186342381360.620640682880932
290.3178232475813530.6356464951627060.682176752418647
300.2780751083641660.5561502167283310.721924891635834
310.2696041099587250.5392082199174490.730395890041275
320.3990065914215260.7980131828430520.600993408578474
330.3432220705289270.6864441410578540.656777929471073
340.3136417154916670.6272834309833340.686358284508333
350.3567734065587750.713546813117550.643226593441225
360.3239982756858640.6479965513717290.676001724314136
370.4385551926157250.877110385231450.561444807384275
380.7456244379030740.5087511241938520.254375562096926
390.72998173480890.5400365303821990.270018265191100
400.6939340840255190.6121318319489610.306065915974481
410.6567229917388230.6865540165223550.343277008261177
420.6096354860561080.7807290278877840.390364513943892
430.5594323516939850.881135296612030.440567648306015
440.5527989117313380.8944021765373240.447201088268662
450.5401932485095580.9196135029808840.459806751490442
460.5841750100225660.8316499799548680.415824989977434
470.5471175912121250.905764817575750.452882408787875
480.5370116247742380.9259767504515230.462988375225762
490.5896696370225960.8206607259548070.410330362977404
500.568422033221750.86315593355650.43157796677825
510.5381782265344350.923643546931130.461821773465565
520.4910579843459150.982115968691830.508942015654085
530.4455369726952120.8910739453904240.554463027304788
540.4049352117232150.809870423446430.595064788276785
550.3665446293371980.7330892586743960.633455370662802
560.3357626061080490.6715252122160980.664237393891951
570.2927338204310590.5854676408621190.70726617956894
580.2673715418270750.534743083654150.732628458172925
590.2495105008442370.4990210016884750.750489499155763
600.3086708782982850.6173417565965710.691329121701715
610.2940977137318810.5881954274637620.70590228626812
620.2550995796658190.5101991593316380.744900420334181
630.2394300655797740.4788601311595480.760569934420226
640.2656442274263840.5312884548527680.734355772573616
650.3303643276374650.660728655274930.669635672362535
660.3389668445756520.6779336891513050.661033155424348
670.6838004982063630.6323990035872740.316199501793637
680.6733154810450920.6533690379098170.326684518954908
690.8411901611838290.3176196776323420.158809838816171
700.8191383275213730.3617233449572540.180861672478627
710.9308517380612750.138296523877450.069148261938725
720.9146569017311740.1706861965376520.0853430982688258
730.9382829337850670.1234341324298660.061717066214933
740.9263861039557440.1472277920885120.0736138960442558
750.9276281033889790.1447437932220420.0723718966110212
760.9215329032608190.1569341934783630.0784670967391814
770.9693287817645060.06134243647098850.0306712182354943
780.9616673404392940.07666531912141290.0383326595607064
790.954107486897140.09178502620571850.0458925131028593
800.9566019515869030.08679609682619440.0433980484130972
810.948666401436410.1026671971271790.0513335985635893
820.9476745572405540.1046508855188910.0523254427594454
830.933876863951650.1322462720966990.0661231360483494
840.9207784649871150.1584430700257710.0792215350128854
850.9112558434902310.1774883130195370.0887441565097685
860.8936859551560790.2126280896878430.106314044843921
870.8716472922200250.2567054155599490.128352707779975
880.9193797757638680.1612404484722640.0806202242361318
890.9026115625421930.1947768749156140.097388437457807
900.881765243633470.2364695127330590.118234756366529
910.881397413989920.2372051720201590.118602586010079
920.8713980396681860.2572039206636290.128601960331814
930.8491324834995320.3017350330009370.150867516500468
940.8204223519995750.3591552960008510.179577648000425
950.7870177432280470.4259645135439060.212982256771953
960.7557157175194140.4885685649611710.244284282480585
970.7732214987018420.4535570025963170.226778501298158
980.7699916228250970.4600167543498060.230008377174903
990.7343600261062780.5312799477874450.265639973893722
1000.7122853425320170.5754293149359650.287714657467983
1010.6738041808869680.6523916382260630.326195819113032
1020.6328806957375120.7342386085249760.367119304262488
1030.5917954923026490.8164090153947020.408204507697351
1040.5486312193378190.9027375613243630.451368780662181
1050.5063404886872430.9873190226255150.493659511312757
1060.4926916343885430.9853832687770850.507308365611457
1070.5000020890271860.9999958219456280.499997910972814
1080.5393036213969160.9213927572061670.460696378603084
1090.5018653437622560.9962693124754890.498134656237744
1100.460704289802820.921408579605640.53929571019718
1110.4137439132316120.8274878264632240.586256086768388
1120.74061884066950.5187623186610.2593811593305
1130.7755791622930020.4488416754139970.224420837706998
1140.7511924937027930.4976150125944140.248807506297207
1150.8754598640234440.2490802719531120.124540135976556
1160.8470931873958190.3058136252083630.152906812604181
1170.8176305257582430.3647389484835130.182369474241757
1180.784169778505270.4316604429894610.215830221494730
1190.756239619419450.4875207611611010.243760380580550
1200.8049705765881380.3900588468237250.195029423411862
1210.8840595190699330.2318809618601330.115940480930067
1220.8652497380235410.2695005239529180.134750261976459
1230.8449103247330520.3101793505338970.155089675266948
1240.8069001298555650.3861997402888710.193099870144435
1250.8115641803558520.3768716392882950.188435819644148
1260.7682122314611830.4635755370776330.231787768538817
1270.7368674094556410.5262651810887170.263132590544359
1280.6903307560793210.6193384878413580.309669243920679
1290.6450159225602050.709968154879590.354984077439795
1300.7658939350196670.4682121299606670.234106064980333
1310.7135802827241450.572839434551710.286419717275855
1320.6534074306808310.6931851386383370.346592569319169
1330.6153801898032810.7692396203934380.384619810196719
1340.5456903414100290.9086193171799420.454309658589971
1350.5710007073765480.8579985852469040.428999292623452
1360.5005357463897360.9989285072205280.499464253610264
1370.4534084939071960.9068169878143920.546591506092804
1380.4701866307889560.9403732615779110.529813369211044
1390.3962812666779530.7925625333559060.603718733322047
1400.3228377971210870.6456755942421730.677162202878913
1410.4259405330405810.8518810660811620.574059466959419
1420.3759469279344000.7518938558688010.6240530720656
1430.3033504922152390.6067009844304790.696649507784761
1440.2271858956990660.4543717913981320.772814104300934
1450.3335255447779450.667051089555890.666474455222055
1460.2541505742180360.5083011484360710.745849425781964
1470.2528706232855880.5057412465711750.747129376714412
1480.1596123012853570.3192246025707130.840387698714643
1490.08634341410370050.1726868282074010.9136565858963


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 level40.0285714285714286OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/10h1qx1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/10h1qx1290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/1sit31290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/1sit31290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/2sit31290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/2sit31290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/3lato1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/3lato1290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/4lato1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/4lato1290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/5lato1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/5lato1290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/6wjs91290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/6wjs91290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/76src1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/76src1290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/86src1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/86src1290453778.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/9h1qx1290453778.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t129045371808w5pgn250hf6pa/9h1qx1290453778.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by