Home » date » 2010 » Dec » 02 »

*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: Thu, 02 Dec 2010 19:05:14 +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/02/t1291316618r0d4bpr2fmgxq17.htm/, Retrieved Thu, 02 Dec 2010 20:03: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/02/t1291316618r0d4bpr2fmgxq17.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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
liked[t] = + 6.68487647585358 + 0.0804780908515778findingFriends[t] + 0.171089311176097knowingPeople[t] + 0.554952662162986celebrity[t] + 0.00330749834696463friend[t] -0.00236012166624288secondbestfriend[t] + 0.00334213262966341thirdbestfriend[t] + 0.00590218756718479t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.684876475853581.0626456.290800
findingFriends0.08047809085157780.0814040.98860.324460.16223
knowingPeople0.1710893111760970.0519013.29650.0012260.000613
celebrity0.5549526621629860.1229914.51211.3e-056e-06
friend0.003307498346964630.0030291.0920.2765880.138294
secondbestfriend-0.002360121666242880.003057-0.77190.4413890.220695
thirdbestfriend0.003342132629663410.0027621.210.2282110.114105
t0.005902187567184790.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.24127645103690.758723548963133
21312.54925104529340.450748954706599
31612.8901516541623.10984834583801
41212.4095002419506-0.409500241950625
51112.1954898338014-1.19548983380136
61210.54850985619731.45149014380274
71815.14000727246242.85999272753762
81111.892234091914-0.89223409191401
91412.54278783197161.45721216802845
10910.4731134123434-1.47311341234342
111413.69898391106000.301016088939985
121213.3914843781074-1.39148437810740
131113.5077253284476-2.50772532844756
141213.0619744150281-1.06197441502814
151312.42744371249400.572556287505966
161112.4166973187797-1.41669731877967
171212.9626491506296-0.962649150629635
181613.50521190457382.49478809542624
19911.4569226873542-2.45692268735425
201111.2933506639583-0.293350663958286
211310.10624352017262.89375647982742
221514.26323736183890.7367626381611
231013.1535936044104-3.15359360441045
241111.1960564530903-0.196056453090281
251313.8643356966233-0.864335696623341
261614.1191522238781.88084777612199
271514.70068729711030.299312702889655
281413.21552903698840.784470963011641
291414.0035872018418-0.00358720184175577
301411.63576622108242.3642337789176
31811.3402957711700-3.34029577117001
321314.0929366237416-1.09293662374159
331514.40126788206080.598732117939156
341311.29228403386191.70771596613815
351112.5385402892615-1.53854028926155
361514.09542187284950.904578127150489
371513.41147618011231.58852381988770
38912.1921086960505-3.19210869605046
391314.1414892414009-1.14148924140091
401614.94246338354021.05753661645983
411313.6297203365311-0.629720336531094
421110.58750550873260.412494491267403
431211.54195957366350.458040426336504
441212.1938177720423-0.193817772042344
451212.94719430052-0.947194300519994
461414.0009860746851-0.000986074685142166
471413.64933638459000.35066361541002
48811.4216993575606-3.42169935756064
491313.0582006172276-0.0582006172276401
501614.72878862625701.27121137374302
511312.43277199190040.567228008099589
521114.002539992185-3.00253999218499
531413.47478363592350.525216364076542
541311.31813835976961.68186164023035
551313.0546363292234-0.0546363292234419
561313.3887952814912-0.388795281491174
571212.5265099394571-0.526509939457064
581614.71187366600211.28812633399789
591510.90983998725524.09016001274485
601515.3544473216950-0.354447321695036
611211.04421948356850.955780516431483
621414.2495576324261-0.249557632426084
631214.3956537173204-2.39565371732038
641514.12709054661440.872909453385647
651211.81911667457170.180883325428266
661313.1905657649825-0.190565764982455
671214.0285792972029-2.02857929720291
681212.2856431790989-0.285643179098892
691314.0578624192014-1.05786241920144
70510.1742054615072-5.17420546150722
711313.3634865890547-0.363486589054699
721313.2811376779636-0.281137677963608
731413.17706085324350.822939146756531
741713.75764582994413.24235417005586
751313.8884682145868-0.88846821458676
761314.5393126769409-1.53931267694091
771213.7310812472200-1.73108124722002
781312.80782839040910.192171609590942
791412.38624999754581.61375000245418
801110.45437216530080.545627834699239
811211.66391690197330.336083098026708
821213.3317410554062-1.33174105540616
831613.97508705263172.02491294736828
841213.1091272321134-1.10912723211341
851210.54630453920971.45369546079026
861213.8069869235033-1.80698692350329
871011.6616138613276-1.66161386132757
881512.58535169849892.41464830150105
891515.2872147832097-0.287214783209684
901212.0979694998763-0.0979694998763441
911613.27942914676722.72057085323278
921513.94087979362261.05912020637738
931615.26361917860830.73638082139174
941314.9482687822939-1.94826878229385
951212.6663420064809-0.666342006480868
961112.1232685518916-1.12326855189158
971311.83480852351391.16519147648615
981011.2414466685161-1.24144666851609
991513.31832501609911.68167498390088
1001313.9733775621092-0.973377562109222
1011615.48068872124720.519311278752845
1021515.0685137262809-0.0685137262809211
1031814.69903715273163.30096284726835
1041310.72407824131352.27592175868646
1051010.4210863327862-0.421086332786167
1061615.07935336770460.920646632295383
1071311.55487914407351.44512085592652
1081515.4605022774142-0.460502277414206
1091411.94584353431592.05415646568412
1101511.66389980499243.33610019500761
1111413.31913558173550.680864418264514
1121314.764795042679-1.764795042679
1131313.3016576607498-0.301657660749798
1141514.35611887766160.643881122338437
1151614.78038412090111.21961587909889
1161414.5997422003543-0.599742200354304
1171414.2562178902544-0.256217890254430
1181613.30539105376112.69460894623891
1191414.7100053530057-0.710005353005712
1201212.9242922224764-0.924292222476409
1211312.80911478258380.190885217416195
1221214.0030273251826-2.00302732518263
1231212.2735552407858-0.273555240785796
1241414.6227499100675-0.62274991006753
1251414.5826488947704-0.582648894770409
1261412.19558837740931.80441162259069
1271615.52019635864480.479803641355155
1281314.5858352055783-1.58583520557830
1291413.30541141320750.69458858679251
130411.3423321021088-7.34233210210875
1311615.39784948985210.602150510147872
1321313.5934505145228-0.593450514522831
1331612.08697211916113.91302788083886
1341513.73368318684181.26631681315817
1351413.99753152337230.00246847662768986
1361312.11708195705790.882918042942115
1371414.5911438736323-0.591143873632274
1381212.3541344821222-0.354134482122229
1391514.47595503652910.524044963470924
1401413.75775608188210.242243918117941
1411313.3727877505990-0.372787750598958
1421414.3148335968670-0.31483359686698
1431613.71656973446892.28343026553106
144612.3421935818361-6.34219358183612
1451312.94797371617400.0520262838259516
1461313.1810783373908-0.181078337390839
1471412.91639031138871.08360968861134
1481514.87776353332020.122236466679821
1491414.4494877870511-0.449487787051066
1501515.2846955848154-0.284695584815378
1511314.2434534268062-1.24345342680624
1521615.0624571248640.937542875136014
1531212.0024567156971-0.00245671569706484
1541514.20686567997230.793134320027697
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.4234873032036820.8469746064073630.576512696796318
140.5188393277001920.9623213445996170.481160672299808
150.4089976503370090.8179953006740190.59100234966299
160.3123804121206040.6247608242412080.687619587879396
170.2312124375419050.4624248750838090.768787562458095
180.3123572432976840.6247144865953690.687642756702316
190.2524833725819250.5049667451638510.747516627418075
200.2768249328887670.5536498657775330.723175067111233
210.7370282805396880.5259434389206240.262971719460312
220.6893937322984440.6212125354031110.310606267701556
230.759430988653410.481138022693180.24056901134659
240.6981558084384770.6036883831230450.301844191561523
250.6322579052157950.735484189568410.367742094784205
260.6755668413758810.6488663172482380.324433158624119
270.6142765761696180.7714468476607640.385723423830382
280.5637998884179660.8724002231640680.436200111582034
290.5011385585763530.9977228828472930.498861441423647
300.5211919517262160.9576160965475680.478808048273784
310.701839794095750.5963204118085010.298160205904250
320.6650120590034580.6699758819930850.334987940996542
330.6326655350229140.7346689299541730.367334464977086
340.6774999598306830.6450000803386330.322500040169317
350.6418792018114960.7162415963770070.358120798188504
360.6076496475375160.7847007049249680.392350352462484
370.6021297489887210.7957405020225570.397870251011279
380.6612676352830850.677464729433830.338732364716915
390.6131587699373790.7736824601252430.386841230062621
400.5771930418534730.8456139162930550.422806958146527
410.5283737323899650.943252535220070.471626267610035
420.5186783692146110.9626432615707770.481321630785389
430.4755258966042260.9510517932084520.524474103395774
440.4242050519632340.8484101039264680.575794948036766
450.3818843024027400.7637686048054810.61811569759726
460.3314712976470550.6629425952941110.668528702352945
470.2874967748349360.5749935496698730.712503225165064
480.390877900479820.781755800959640.60912209952018
490.3419863076045830.6839726152091660.658013692395417
500.3286363724196060.6572727448392120.671363627580394
510.2989909464905160.5979818929810320.701009053509484
520.3644615270916210.7289230541832430.635538472908379
530.33127801035940.66255602071880.6687219896406
540.3320671483066130.6641342966132270.667932851693387
550.2874614385250930.5749228770501870.712538561474907
560.2462386636860310.4924773273720620.753761336313969
570.2097327438955790.4194654877911570.790267256104421
580.2063249292833640.4126498585667290.793675070716636
590.3810492000119860.7620984000239720.618950799988014
600.3351706182041170.6703412364082350.664829381795883
610.3021122723436550.604224544687310.697887727656345
620.2639698122119430.5279396244238860.736030187788057
630.3143023896242880.6286047792485760.685697610375712
640.2870368586747570.5740737173495150.712963141325243
650.2498271307859260.4996542615718520.750172869214074
660.2144177445699170.4288354891398330.785582255430083
670.2203073467681240.4406146935362470.779692653231876
680.1864670727100800.3729341454201590.81353292728992
690.1640312206435700.3280624412871400.83596877935643
700.4549328387277640.9098656774555290.545067161272236
710.4098127753178010.8196255506356010.5901872246822
720.3663989480587510.7327978961175020.633601051941249
730.3375845779408020.6751691558816040.662415422059198
740.4579913207056500.9159826414113010.54200867929435
750.4199773110070820.8399546220141650.580022688992918
760.4079037533099810.8158075066199610.592096246690019
770.4137858039759640.8275716079519290.586214196024036
780.3684247886973950.7368495773947910.631575211302605
790.3670352377390530.7340704754781050.632964762260947
800.3318610006749450.663722001349890.668138999325055
810.2953361204860120.5906722409720250.704663879513988
820.2720978849004990.5441957698009980.727902115099501
830.2813987987446270.5627975974892540.718601201255373
840.2593929434948300.5187858869896610.74060705650517
850.2422194907672610.4844389815345220.757780509232739
860.2576975198155260.5153950396310520.742302480184474
870.2759229053415380.5518458106830750.724077094658462
880.3055517357008590.6111034714017190.69444826429914
890.2673575350214090.5347150700428170.732642464978591
900.2345711330842950.4691422661685910.765428866915705
910.2701462509260230.5402925018520450.729853749073977
920.2406335298992030.4812670597984060.759366470100797
930.2080602894003010.4161205788006030.791939710599698
940.2189028089323990.4378056178647980.781097191067601
950.194339437185820.388678874371640.80566056281418
960.1990745173839410.3981490347678810.80092548261606
970.1832680959156850.3665361918313690.816731904084315
980.2175153881659010.4350307763318020.782484611834099
990.2284121570919360.4568243141838720.771587842908064
1000.2487705742105420.4975411484210840.751229425789458
1010.212932283141010.425864566282020.78706771685899
1020.1850981093304960.3701962186609910.814901890669504
1030.2101226916097400.4202453832194810.78987730839026
1040.2042516494760320.4085032989520650.795748350523968
1050.1824762046973280.3649524093946560.817523795302672
1060.1545476096439460.3090952192878920.845452390356054
1070.1345465270783460.2690930541566910.865453472921654
1080.1101167383417920.2202334766835830.889883261658208
1090.1119584482776590.2239168965553180.88804155172234
1100.3401319549696860.6802639099393710.659868045030314
1110.3181595151917060.6363190303834120.681840484808294
1120.3105352629725470.6210705259450940.689464737027453
1130.27765946802610.55531893605220.7223405319739
1140.2354383262440550.4708766524881100.764561673755945
1150.2041466151176330.4082932302352670.795853384882367
1160.1709740726929550.341948145385910.829025927307045
1170.1392737783670520.2785475567341040.860726221632948
1180.1713808387705160.3427616775410330.828619161229484
1190.1500197502961790.3000395005923580.849980249703821
1200.1242174709417680.2484349418835370.875782529058232
1210.09790992737225390.1958198547445080.902090072627746
1220.09192492101326540.1838498420265310.908075078986735
1230.07057265637101130.1411453127420230.929427343628989
1240.06336890809044080.1267378161808820.93663109190956
1250.05305019689557910.1061003937911580.94694980310442
1260.05266211574110170.1053242314822030.947337884258898
1270.03778446180741890.07556892361483780.962215538192581
1280.04625999519545620.09251999039091250.953740004804544
1290.06020301538457730.1204060307691550.939796984615423
1300.3223482762964540.6446965525929080.677651723703546
1310.2642705696735960.5285411393471930.735729430326404
1320.2095538027270020.4191076054540030.790446197272998
1330.3884943682693120.7769887365386240.611505631730688
1340.3629875015825690.7259750031651380.637012498417431
1350.3036245389101240.6072490778202480.696375461089876
1360.2828059920197360.5656119840394720.717194007980264
1370.2156453921940440.4312907843880880.784354607805956
1380.1580515469983190.3161030939966370.841948453001681
1390.1302112364144360.2604224728288730.869788763585564
1400.1005070980639790.2010141961279580.899492901936021
1410.07270701364921670.1454140272984330.927292986350783
1420.04863361467069750.0972672293413950.951366385329303
1430.1470180091910670.2940360183821340.852981990808933
1440.5918988194022070.8162023611955860.408101180597793
1450.4282472591685180.8564945183370350.571752740831482


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/Dec/02/t1291316618r0d4bpr2fmgxq17/10zm7p1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/10zm7p1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/1tlav1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/1tlav1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/2tlav1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/2tlav1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/3mu9y1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/3mu9y1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/4mu9y1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/4mu9y1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/5mu9y1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/5mu9y1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/6wl811291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/6wl811291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/7pc7m1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/7pc7m1291316703.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/8pc7m1291316703.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/02/t1291316618r0d4bpr2fmgxq17/8pc7m1291316703.ps (open in new window)


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