Home » date » 2010 » Nov » 30 »

Workshop 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: Tue, 30 Nov 2010 13:44:41 +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/30/t1291124610yd9xvvgxhpy4ox5.htm/, Retrieved Tue, 30 Nov 2010 14:43:42 +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/30/t1291124610yd9xvvgxhpy4ox5.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 «
13 14 13 3 25 55 147 12 8 13 5 158 7 71 10 12 16 6 0 0 0 9 7 12 6 143 10 0 10 10 11 5 67 74 43 12 7 12 3 0 0 0 13 16 18 8 148 138 8 12 11 11 4 28 0 0 12 14 14 4 114 113 34 6 6 9 4 0 0 0 5 16 14 6 123 115 103 12 11 12 6 145 9 0 11 16 11 5 113 114 73 14 12 12 4 152 59 159 14 7 13 6 0 0 0 12 13 11 4 36 114 113 12 11 12 6 0 0 0 11 15 16 6 8 102 44 11 7 9 4 108 0 0 7 9 11 4 112 86 0 9 7 13 2 51 17 41 11 14 15 7 43 45 74 11 15 10 5 120 123 0 12 7 11 4 13 24 0 12 15 13 6 55 5 0 11 17 16 6 103 123 32 11 15 15 7 127 136 126 8 14 14 5 14 4 154 9 14 14 6 135 76 129 12 8 14 4 38 99 98 10 8 8 4 11 98 82 10 14 13 7 43 67 45 12 14 15 7 141 92 8 8 8 13 4 62 13 0 12 11 11 4 62 24 129 11 16 15 6 135 129 31 12 10 15 6 117 117 117 7 8 9 5 82 11 99 11 14 13 6 145 20 55 11 16 16 7 87 91 132 12 13 13 6 76 111 58 9 5 11 3 124 0 0 15 8 12 3 151 58 0 11 10 12 4 131 0 0 11 8 12 6 127 146 101 11 13 14 7 76 129 31 11 15 14 5 25 48 147 15 6 8 4 0 0 0 11 12 13 5 58 111 132 12 16 16 6 115 32 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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
Liked[t] = + 6.68487647585357 + 0.0804780908515764FindingFriends[t] + 0.171089311176096KnowingPeople[t] + 0.554952662162989Celebrity[t] + 0.00330749834696466friendone[t] -0.00236012166624288friendtwo[t] + 0.00334213262966336`friendthree `[t] + 0.00590218756718485t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.684876475853571.0626456.290800
FindingFriends0.08047809085157640.0814040.98860.324460.16223
KnowingPeople0.1710893111760960.0519013.29650.0012260.000613
Celebrity0.5549526621629890.1229914.51211.3e-056e-06
friendone0.003307498346964660.0030291.0920.2765880.138294
friendtwo-0.002360121666242880.003057-0.77190.4413890.220695
`friendthree `0.003342132629663360.0027621.210.2282110.114105
t0.005902187567184850.0032471.81780.0711130.035557


Multiple Linear Regression - Regression Statistics
Multiple R0.610957784065894
R-squared0.373269413910707
Adjusted R-squared0.343626751055132
F-TEST (value)12.5923037255241
F-TEST (DF numerator)7
F-TEST (DF denominator)148
p-value1.30406796472471e-12
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.76255186325910
Sum Squared Residuals459.775182460365


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11312.24127645103710.758723548962934
21312.54925104529340.450748954706606
31612.89015165416203.10984834583802
41212.4095002419506-0.409500241950638
51112.1954898338014-1.19548983380136
61210.54850985619721.45149014380275
71815.14000727246242.85999272753762
81111.892234091914-0.892234091914003
91412.54278783197151.45721216802846
10910.4731134123434-1.47311341234342
111413.69898391106000.301016088939982
121213.3914843781074-1.39148437810740
131113.5077253284476-2.50772532844755
141213.0619744150281-1.06197441502812
151312.42744371249400.57255628750597
161112.4166973187797-1.41669731877966
171212.9626491506296-0.962649150629632
181613.50521190457382.49478809542624
19911.4569226873542-2.45692268735425
201111.2933506639583-0.293350663958290
211310.10624352017262.89375647982743
221514.26323736183890.736762638161104
231013.1535936044104-3.15359360441045
241111.1960564530903-0.196056453090276
251313.8643356966233-0.864335696623336
261614.1191522238781.88084777612199
271514.70068729711030.299312702889659
281413.21552903698840.78447096301165
291414.0035872018418-0.00358720184175349
301411.63576622108242.36423377891761
31811.34029577117-3.34029577117001
321314.0929366237416-1.09293662374159
331514.40126788206080.598732117939154
341311.29228403386191.70771596613814
351112.5385402892615-1.53854028926154
361514.09542187284950.90457812715049
371513.41147618011231.58852381988771
38912.1921086960505-3.19210869605046
391314.1414892414009-1.14148924140091
401614.94246338354021.05753661645984
411313.6297203365311-0.62972033653109
421110.58750550873260.4124944912674
431211.54195957366350.458040426336511
441212.1938177720423-0.193817772042343
451212.94719430052-0.947194300519995
461414.0009860746851-0.000986074685144223
471413.64933638459000.350663615410032
48811.4216993575606-3.42169935756063
491313.0582006172276-0.0582006172276327
501614.72878862625701.27121137374303
511312.43277199190040.567228008099584
521114.0025399921850-3.00253999218499
531413.47478363592350.52521636407655
541311.31813835976961.68186164023035
551313.0546363292234-0.0546363292234351
561313.3887952814912-0.388795281491164
571212.5265099394571-0.52650993945706
581614.71187366600211.28812633399790
591510.90983998725514.09016001274485
601515.3544473216950-0.354447321695035
611211.04421948356850.95578051643149
621414.2495576324261-0.249557632426077
631214.3956537173204-2.39565371732038
641514.12709054661430.872909453385653
651211.81911667457170.180883325428266
661313.1905657649825-0.190565764982453
671214.0285792972029-2.02857929720291
681212.2856431790989-0.285643179098895
691314.0578624192014-1.05786241920144
70510.1742054615072-5.17420546150722
711313.3634865890547-0.363486589054693
721313.2811376779636-0.281137677963601
731413.17706085324350.822939146756533
741713.75764582994413.24235417005586
751313.8884682145868-0.888468214586758
761314.5393126769409-1.5393126769409
771213.73108124722-1.73108124722001
781312.80782839040910.192171609590942
791412.38624999754581.61375000245418
801110.45437216530080.545627834699243
811211.66391690197330.336083098026707
821213.3317410554062-1.33174105540617
831613.97508705263172.02491294736828
841213.1091272321134-1.10912723211341
851210.54630453920971.45369546079026
861213.8069869235033-1.80698692350330
871011.6616138613276-1.66161386132758
881512.58535169849902.41464830150104
891515.2872147832097-0.287214783209686
901212.0979694998763-0.0979694998763433
911613.27942914676722.72057085323277
921513.94087979362261.05912020637738
931615.26361917860830.73638082139174
941314.9482687822939-1.94826878229385
951212.6663420064809-0.666342006480869
961112.1232685518916-1.12326855189158
971311.83480852351391.16519147648613
981011.2414466685161-1.24144666851609
991513.31832501609911.68167498390088
1001313.9733775621092-0.973377562109227
1011615.48068872124720.519311278752849
1021515.0685137262809-0.0685137262809203
1031814.69903715273163.30096284726836
1041310.72407824131352.27592175868646
1051010.4210863327862-0.421086332786162
1061615.07935336770460.920646632295382
1071311.55487914407351.44512085592652
1081515.4605022774142-0.460502277414208
1091411.94584353431592.05415646568413
1101511.66389980499243.33610019500760
1111413.31913558173550.680864418264513
1121314.764795042679-1.76479504267901
1131313.3016576607498-0.301657660749802
1141514.35611887766160.643881122338433
1151614.78038412090111.21961587909889
1161414.5997422003543-0.599742200354303
1171414.2562178902544-0.256217890254429
1181613.30539105376112.69460894623890
1191414.7100053530057-0.710005353005711
1201212.9242922224764-0.9242922224764
1211312.80911478258380.190885217416204
1221214.0030273251826-2.00302732518263
1231212.2735552407858-0.273555240785795
1241414.6227499100675-0.622749910067525
1251414.5826488947704-0.582648894770411
1261412.19558837740931.80441162259069
1271615.52019635864490.479803641355146
1281314.5858352055783-1.58583520557829
1291413.30541141320750.694588586792506
130411.3423321021088-7.34233210210876
1311615.39784948985210.602150510147868
1321313.5934505145228-0.593450514522837
1331612.08697211916113.91302788083886
1341513.73368318684181.26631681315817
1351413.99753152337230.00246847662768872
1361312.11708195705790.882918042942112
1371414.5911438736323-0.591143873632276
1381212.3541344821222-0.354134482122223
1391514.47595503652910.524044963470921
1401413.75775608188210.242243918117944
1411313.3727877505990-0.372787750598957
1421414.3148335968670-0.314833596866979
1431613.71656973446892.28343026553106
144612.3421935818361-6.34219358183612
1451312.94797371617400.0520262838259557
1461313.1810783373908-0.181078337390845
1471412.91639031138871.08360968861134
1481514.87776353332020.122236466679822
1491414.4494877870511-0.449487787051067
1501515.2846955848154-0.284695584815386
1511314.2434534268062-1.24345342680624
1521615.0624571248640.93754287513601
1531212.0024567156971-0.00245671569706828
1541514.20686567997230.79313432002769
1551214.5793882744699-2.57938827446993
1561412.08096525680811.91903474319191


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.6141832515470040.7716334969059920.385816748452996
120.4570043567957270.9140087135914540.542995643204273
130.4234873032036810.8469746064073620.576512696796319
140.5188393277001920.9623213445996160.481160672299808
150.4089976503370110.8179953006740230.591002349662989
160.3123804121206050.6247608242412090.687619587879395
170.2312124375419040.4624248750838080.768787562458096
180.3123572432976860.6247144865953720.687642756702314
190.2524833725819240.5049667451638480.747516627418076
200.2768249328887650.553649865777530.723175067111235
210.7370282805396880.5259434389206240.262971719460312
220.6893937322984440.6212125354031110.310606267701556
230.759430988653410.4811380226931790.240569011346590
240.6981558084384770.6036883831230460.301844191561523
250.6322579052157960.7354841895684080.367742094784204
260.675566841375880.648866317248240.32443315862412
270.6142765761696190.7714468476607610.385723423830381
280.5637998884179660.8724002231640680.436200111582034
290.5011385585763530.9977228828472940.498861441423647
300.5211919517262150.957616096547570.478808048273785
310.7018397940957510.5963204118084970.298160205904249
320.6650120590034570.6699758819930850.334987940996543
330.6326655350229160.7346689299541670.367334464977083
340.6774999598306840.6450000803386310.322500040169316
350.6418792018114940.7162415963770110.358120798188506
360.6076496475375170.7847007049249660.392350352462483
370.6021297489887180.7957405020225630.397870251011282
380.6612676352830850.677464729433830.338732364716915
390.6131587699373770.7736824601252450.386841230062623
400.5771930418534730.8456139162930540.422806958146527
410.5283737323899660.9432525352200690.471626267610034
420.518678369214610.962643261570780.48132163078539
430.4755258966042250.951051793208450.524474103395775
440.4242050519632350.848410103926470.575794948036765
450.3818843024027400.7637686048054810.61811569759726
460.3314712976470560.6629425952941120.668528702352944
470.2874967748349370.5749935496698740.712503225165063
480.3908779004798210.7817558009596420.609122099520179
490.3419863076045830.6839726152091650.658013692395417
500.3286363724196060.6572727448392120.671363627580394
510.2989909464905150.597981892981030.701009053509485
520.3644615270916210.7289230541832430.635538472908379
530.3312780103593980.6625560207187960.668721989640602
540.3320671483066130.6641342966132270.667932851693387
550.2874614385250940.5749228770501880.712538561474906
560.2462386636860310.4924773273720620.753761336313969
570.2097327438955790.4194654877911590.79026725610442
580.2063249292833670.4126498585667330.793675070716633
590.3810492000119860.7620984000239720.618950799988014
600.3351706182041170.6703412364082350.664829381795883
610.3021122723436550.6042245446873110.697887727656345
620.2639698122119420.5279396244238840.736030187788058
630.3143023896242870.6286047792485740.685697610375713
640.2870368586747570.5740737173495150.712963141325243
650.2498271307859260.4996542615718530.750172869214074
660.2144177445699180.4288354891398350.785582255430082
670.2203073467681240.4406146935362480.779692653231876
680.1864670727100800.3729341454201590.81353292728992
690.1640312206435720.3280624412871430.835968779356429
700.4549328387277640.9098656774555290.545067161272236
710.4098127753178010.8196255506356030.590187224682199
720.366398948058750.73279789611750.63360105194125
730.3375845779407990.6751691558815970.662415422059201
740.4579913207056530.9159826414113060.542008679294347
750.4199773110070810.8399546220141620.580022688992919
760.4079037533099770.8158075066199550.592096246690023
770.4137858039759650.827571607951930.586214196024035
780.3684247886973960.7368495773947920.631575211302604
790.3670352377390520.7340704754781040.632964762260948
800.3318610006749460.6637220013498930.668138999325054
810.2953361204860160.5906722409720320.704663879513984
820.2720978849005020.5441957698010030.727902115099498
830.2813987987446280.5627975974892560.718601201255372
840.2593929434948300.5187858869896600.74060705650517
850.2422194907672590.4844389815345170.757780509232741
860.2576975198155250.515395039631050.742302480184475
870.2759229053415360.5518458106830730.724077094658464
880.3055517357008610.6111034714017230.694448264299139
890.2673575350214090.5347150700428180.732642464978591
900.2345711330842930.4691422661685870.765428866915707
910.2701462509260260.5402925018520510.729853749073974
920.2406335298992040.4812670597984090.759366470100796
930.2080602894003030.4161205788006060.791939710599697
940.2189028089323980.4378056178647960.781097191067602
950.1943394371858190.3886788743716390.80566056281418
960.1990745173839410.3981490347678820.800925482616059
970.1832680959156860.3665361918313710.816731904084314
980.2175153881658980.4350307763317960.782484611834102
990.2284121570919360.4568243141838720.771587842908064
1000.2487705742105440.4975411484210880.751229425789456
1010.2129322831410110.4258645662820210.78706771685899
1020.1850981093304960.3701962186609920.814901890669504
1030.2101226916097420.4202453832194840.789877308390258
1040.2042516494760320.4085032989520650.795748350523968
1050.1824762046973260.3649524093946530.817523795302674
1060.1545476096439450.309095219287890.845452390356055
1070.1345465270783460.2690930541566910.865453472921655
1080.1101167383417920.2202334766835840.889883261658208
1090.1119584482776580.2239168965553170.888041551722342
1100.3401319549696830.6802639099393670.659868045030317
1110.3181595151917050.636319030383410.681840484808295
1120.3105352629725480.6210705259450960.689464737027452
1130.2776594680260990.5553189360521980.722340531973901
1140.2354383262440520.4708766524881050.764561673755948
1150.2041466151176320.4082932302352650.795853384882368
1160.1709740726929540.3419481453859090.829025927307046
1170.1392737783670500.2785475567340990.86072622163295
1180.1713808387705160.3427616775410310.828619161229484
1190.1500197502961780.3000395005923570.849980249703822
1200.1242174709417680.2484349418835360.875782529058232
1210.0979099273722550.195819854744510.902090072627745
1220.09192492101326540.1838498420265310.908075078986735
1230.07057265637101080.1411453127420220.92942734362899
1240.06336890809044040.1267378161808810.93663109190956
1250.05305019689558020.1061003937911600.94694980310442
1260.05266211574110150.1053242314822030.947337884258898
1270.03778446180741920.07556892361483840.962215538192581
1280.0462599951954560.0925199903909120.953740004804544
1290.06020301538457560.1204060307691510.939796984615424
1300.3223482762964550.6446965525929110.677651723703545
1310.2642705696735960.5285411393471920.735729430326404
1320.2095538027270020.4191076054540030.790446197272998
1330.3884943682693110.7769887365386210.611505631730689
1340.3629875015825690.7259750031651380.637012498417431
1350.3036245389101240.6072490778202490.696375461089876
1360.2828059920197360.5656119840394720.717194007980264
1370.2156453921940420.4312907843880850.784354607805958
1380.1580515469983180.3161030939966370.841948453001682
1390.1302112364144360.2604224728288710.869788763585564
1400.1005070980639790.2010141961279580.899492901936021
1410.0727070136492170.1454140272984340.927292986350783
1420.04863361467069850.0972672293413970.951366385329302
1430.1470180091910660.2940360183821320.852981990808934
1440.5918988194022070.8162023611955860.408101180597793
1450.4282472591685190.8564945183370380.571752740831481


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 level30.0222222222222222OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/10gspo1291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/10gspo1291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/120ry1291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/120ry1291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/220ry1291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/220ry1291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/320ry1291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/320ry1291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/4ca811291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/4ca811291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/5ca811291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/5ca811291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/6ca811291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/6ca811291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/751p31291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/751p31291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/8gspo1291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/8gspo1291124669.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/9gspo1291124669.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/30/t1291124610yd9xvvgxhpy4ox5/9gspo1291124669.ps (open in new window)


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