Home » date » 2010 » Dec » 03 »

*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: Fri, 03 Dec 2010 21:35:27 +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/03/t12914120132sfojpe83fr9xsb.htm/, Retrieved Fri, 03 Dec 2010 22:33:44 +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/03/t12914120132sfojpe83fr9xsb.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 12 8 13 5 10 12 16 6 9 7 12 6 10 10 11 5 12 7 12 3 13 16 18 8 12 11 11 4 12 14 14 4 6 6 9 4 5 16 14 6 12 11 12 6 11 16 11 5 14 12 12 4 14 7 13 6 12 13 11 4 12 11 12 6 11 15 16 6 11 7 9 4 7 9 11 4 9 7 13 2 11 14 15 7 11 15 10 5 12 7 11 4 12 15 13 6 11 17 16 6 11 15 15 7 8 14 14 5 9 14 14 6 12 8 14 4 10 8 8 4 10 14 13 7 12 14 15 7 8 8 13 4 12 11 11 4 11 16 15 6 12 10 15 6 7 8 9 5 11 14 13 6 11 16 16 7 12 13 13 6 9 5 11 3 15 8 12 3 11 10 12 4 11 8 12 6 11 13 14 7 11 15 14 5 15 6 8 4 11 12 13 5 12 16 16 6 12 5 13 6 9 15 11 6 12 12 14 5 12 8 13 4 13 13 13 5 11 14 13 5 9 12 12 4 9 16 16 6 11 10 15 2 11 15 15 8 12 8 12 3 12 16 14 6 9 19 12 6 11 14 15 6 9 6 12 5 12 13 13 5 12 15 12 6 12 7 12 5 12 13 13 6 14 4 5 2 11 14 13 5 12 13 13 5 11 11 14 5 6 14 17 6 10 12 13 6 12 15 13 6 13 14 12 5 8 13 13 5 12 8 14 4 12 6 11 2 12 7 12 4 6 13 12 6 11 13 16 6 10 11 12 5 12 5 12 3 13 12 12 6 11 8 10 4 7 11 15 5 11 14 15 8 11 9 12 4 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 time13 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Liked[t] = + 7.07678977830615 + 0.0887064792188269FindingFriends[t] + 0.180163506492804KnowingFriends[t] + 0.583237749836951Celebrity[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.076789778306151.0516546.729200
FindingFriends0.08870647921882690.0803511.1040.2713420.135671
KnowingFriends0.1801635064928040.0494853.64080.0003720.000186
Celebrity0.5832377498369510.122354.7674e-062e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.592277490989078
R-squared0.350792626332318
Adjusted R-squared0.337979322904666
F-TEST (value)27.3772199583827
F-TEST (DF numerator)3
F-TEST (DF denominator)152
p-value3.26405569239796e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.77011811147447
Sum Squared Residuals476.264355542632


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11312.50197634856130.498023651438748
21312.49876433005930.50123566994072
31613.62524314742982.37475685257020
41212.6357191357470-0.635719135746955
51112.6816783846072-1.68167838460724
61211.15212532389260.847874676107423
71815.77849211073142.2215078892686
81112.4560170997007-1.45601709970075
91412.99650761917921.00349238082084
10911.0229606919238-2.02296069192376
111413.90236477730690.0976352226931168
121213.6224925993746-1.62249259937465
131113.8513659027829-2.85136590278289
141212.8135935646312-0.813593564631204
151313.0792515318411-0.079251531841085
161112.8163441126864-1.81634411268635
171213.6224925993746-1.62249259937465
181614.25444014612701.74555985387296
19911.6466565945107-2.64665659451070
201111.652157690621-0.652157690621004
211310.30276813639912.69723186360085
221514.65751438947120.342485610528814
231013.6712023962901-3.67120239629009
241111.7353630737295-0.73536307372953
251314.3431466253459-1.34314662534587
261614.61476715911261.38523284088735
271514.8376778959640.16232210403601
281413.22491945214080.775080547859197
291413.89686368119660.103136318803419
301411.91552658022232.08447341977767
31811.7381136217847-3.73811362178468
321314.5688079102524-1.56880791025236
331514.746220868690.253779131309987
341311.56070066334701.43929933665297
351112.4560170997007-1.45601709970075
361514.43460365261980.565396347380157
371513.44232909288181.55767090711816
38912.0552319339651-3.05523193396515
391314.0742766396342-1.07427663963423
401615.01784140245680.982158597543205
411313.9828196123603-0.982819612360257
421110.52567887325050.474321126749511
431211.59840826804190.401591731958138
441212.1871471139891-0.187147113989115
451212.9932956006774-0.99329560067741
461414.4773508829784-0.477350882978382
471413.67120239629010.328797603709913
48811.8213190048932-3.82131900489321
491313.1307118768117-0.130711876811675
501614.52331013183871.47668986816133
511312.54151156041780.458488439582177
521114.0770271876894-3.07702718768939
531413.21941835603050.780581643969498
541311.91552658022231.08447341977767
551313.4882883417421-0.488288341742133
561313.4910388897973-0.491038889797283
571212.3700611685371-0.37006116853707
581614.25719069418221.74280930581781
591511.02067161431523.97932838568479
601515.4209156458009-0.420915645800941
611211.33228883038540.667711169614618
621414.5233101318387-0.52331013183867
631214.7976812136606-2.79768121366060
641514.07427663963420.925723360365765
651211.87231787941720.127682120582804
661313.3995818625233-0.399581862523306
671214.3431466253459-2.34314662534587
681212.3186008235665-0.318600823566480
691313.9828196123603-0.982819612360257
70510.2058100130149-5.20581001301487
711313.4910388897973-0.491038889797283
721313.3995818625233-0.399581862523306
731412.95054837031891.04945162968113
741713.63074424354013.3692557564599
751313.6252431474298-0.6252431474298
761314.3431466253459-1.34314662534587
771213.6684518482349-1.66845184823494
781313.044755945648-0.044755945647999
791411.91552658022232.08447341977767
801110.38872406756280.611275932437178
811211.73536307372950.264636926270471
821213.4505807370473-1.45058073704730
831613.89411313314142.10588686685857
841212.8618418911000-0.861841891100044
851210.79179831090701.20820168909303
861213.8913625850863-1.89136258508628
871011.8268201010035-1.82682010100351
881512.59572245344362.40427754655644
891515.2407521393081-0.240752139308137
901212.0069836074963-0.00698360749631072
911613.35362261366302.64637738633698
921513.89411313314141.10588686685857
931615.10654788167560.893452118324378
941314.3458971734010-1.34589717340102
951212.9505483703189-0.95054837031887
961111.9155265802223-0.915526580222334
971311.91781565783091.08218434216911
981011.2408318031114-1.24083180311140
991513.22491945214081.77508054785920
1001313.6224925993746-0.622492599374649
1011615.19800490894960.801995091050401
1021514.92638437518280.0736156248171831
1031814.88088659676913.11911340323087
1041310.61438535246932.38561464753068
105109.850984096139560.149015903860440
1061614.69751107177461.30248892822543
1071311.69536639142611.30463360857386
1081515.4209156458009-0.420915645800941
1091411.51520288493332.48479711506666
1101511.6521576906213.34784230937900
1111413.04200539759280.957994602407152
1121314.5715584583075-1.57155845830751
1131312.90183857340340.0981614265965683
1141513.98281961236031.01718038763974
1151614.38589385570441.61410614429560
1161414.0742766396342-0.0742766396342347
1171414.1629831188531-0.162983118853061
1181613.08200207989622.91799792010376
1191414.3431466253459-0.343146625345866
1201212.5474741269747-0.547474126974723
1211312.63618060619350.36381939380645
1221213.8513659027829-1.85136590278289
1231212.0069836074963-0.00698360749631072
1241414.4318531045647-0.431853104564693
1251414.3431466253459-0.343146625345866
1261412.13843731707371.86156268292632
1271615.32945861852700.670541381473036
1281314.3431466253459-1.34314662534587
1291412.50426542616961.49573457383041
130411.2003736503614-7.20037365036142
1311615.32945861852700.670541381473036
1321313.7139496266486-0.713949626648626
1331611.91552658022234.08447341977767
1341513.71119907859351.28880092140652
1351413.98281961236030.0171803876397428
1361312.09569008671510.904309913284862
1371414.2544401461270-0.254440146127039
1381212.2331063628494-0.233106362849403
1391514.34314662534590.656853374654135
1401413.40233241057850.597667589421543
1411313.2681281529459-0.268128152945941
1421414.1629831188531-0.162983118853061
1431612.99650761917923.00349238082084
144612.0984406347703-6.09844063477029
1451312.27585359320790.724146406792058
1461312.45005453314380.549945466856154
1471412.49876433005931.50123566994072
1481514.60926606300230.390733936997654
1491414.4346036526198-0.434603652619843
1501514.96913160554140.0308683944586446
1511314.2971873764856-1.29718737648558
1521614.92638437518281.07361562481718
1531212.0069836074963-0.00698360749631072
1541513.62524314742981.3747568525702
1551214.0742766396342-2.07427663963423
1561411.20083512080802.79916487919198


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.5062727062668060.9874545874663870.493727293733194
80.5100990293563190.9798019412873620.489900970643681
90.379627766006870.759255532013740.62037223399313
100.2620158204221770.5240316408443540.737984179577823
110.1748264403981210.3496528807962420.825173559601879
120.2643961776036020.5287923552072050.735603822396398
130.5241601247409240.9516797505181510.475839875259076
140.4491594904742470.8983189809484950.550840509525752
150.3618756805878970.7237513611757940.638124319412103
160.337075744091220.674151488182440.66292425590878
170.3315605855027960.6631211710055930.668439414497203
180.3255293538236210.6510587076472420.674470646176379
190.3255479630619120.6510959261238230.674452036938088
200.2680130221484590.5360260442969180.731986977851541
210.5391615117222230.9216769765555530.460838488277777
220.468510550345840.937021100691680.53148944965416
230.6607047197517950.6785905604964110.339295280248205
240.5985667778500630.8028664442998740.401433222149937
250.5566247330019370.8867505339961260.443375266998063
260.5425064656109610.9149870687780770.457493534389039
270.4782595576066920.9565191152133830.521740442393308
280.4342351830283520.8684703660567040.565764816971648
290.3731882090612070.7463764181224140.626811790938793
300.4294271228785850.858854245757170.570572877121415
310.5833443715425630.8333112569148740.416655628457437
320.5629421912085030.8741156175829940.437057808791497
330.5062324134170900.9875351731658190.493767586582910
340.5124484519051750.975103096189650.487551548094825
350.4798420478515840.959684095703170.520157952148416
360.4307744606665820.8615489213331650.569225539333418
370.4289609704426300.8579219408852590.571039029557370
380.5018349854461110.9963300291077780.498165014553889
390.4627983814969010.9255967629938020.537201618503099
400.425028502207860.850057004415720.57497149779214
410.3855407218877910.7710814437755810.614459278112209
420.3551362628665450.710272525733090.644863737133455
430.3120073379542700.6240146759085410.68799266204573
440.2670329110416560.5340658220833130.732967088958344
450.2332746097622550.466549219524510.766725390237745
460.196304411753820.392608823507640.80369558824618
470.1639837846700070.3279675693400140.836016215329993
480.2779436603001460.5558873206002920.722056339699854
490.2369794457837320.4739588915674640.763020554216268
500.2256527656222110.4513055312444220.77434723437779
510.2033927352193900.4067854704387800.79660726478061
520.2815287458485680.5630574916971370.718471254151432
530.252874797983490.505749595966980.74712520201651
540.2385500788292360.4771001576584730.761449921170764
550.2035554271587510.4071108543175010.79644457284125
560.1719273375501330.3438546751002650.828072662449867
570.1433846477540430.2867692955080850.856615352245957
580.1455955913926480.2911911827852970.854404408607352
590.2996252308228030.5992504616456060.700374769177197
600.2603906043428070.5207812086856140.739609395657193
610.2290472654304550.4580945308609110.770952734569545
620.1971469429965990.3942938859931980.802853057003401
630.2538094003364030.5076188006728060.746190599663597
640.2295878220083330.4591756440166650.770412177991667
650.1986563400975780.3973126801951550.801343659902423
660.1683079344465500.3366158688931000.83169206555345
670.1889072818863010.3778145637726020.811092718113699
680.1595138682152020.3190277364304030.840486131784798
690.1391723831296030.2783447662592050.860827616870397
700.4248549697481220.8497099394962440.575145030251878
710.3828065509501230.7656131019002470.617193449049877
720.3416154553820520.6832309107641050.658384544617948
730.3178505925721360.6357011851442730.682149407427864
740.443264900012320.886529800024640.55673509998768
750.4023246675184230.8046493350368460.597675332481577
760.3827195649266250.7654391298532510.617280435073375
770.3811759492570790.7623518985141580.618824050742921
780.3376441452416320.6752882904832650.662355854758367
790.3587767481959510.7175534963919010.64122325180405
800.3238450465398810.6476900930797620.676154953460119
810.2873658905539470.5747317811078940.712634109446053
820.2702472083181800.5404944166363610.72975279168182
830.2891312221944310.5782624443888620.710868777805569
840.2598541045270860.5197082090541710.740145895472914
850.2396210776248140.4792421552496280.760378922375186
860.2485528546694240.4971057093388490.751447145330576
870.2584666813554840.5169333627109670.741533318644516
880.3011081552469210.6022163104938420.698891844753079
890.2621780707299560.5243561414599120.737821929270044
900.2270587506383320.4541175012766640.772941249361668
910.2728276685310120.5456553370620240.727172331468988
920.2498854315558770.4997708631117540.750114568444123
930.2234477935873960.4468955871747920.776552206412604
940.2053136392789960.4106272785579920.794686360721004
950.1842921530102340.3685843060204680.815707846989766
960.1699702499487010.3399404998974010.830029750051299
970.1567226002642360.3134452005284730.843277399735764
980.1657215225897540.3314430451795080.834278477410246
990.1860079504642890.3720159009285790.81399204953571
1000.1635496165085770.3270992330171540.836450383491423
1010.1457143095462060.2914286190924120.854285690453794
1020.1199442361584240.2398884723168470.880055763841576
1030.1600768628634890.3201537257269780.839923137136511
1040.1717279599795640.3434559199591280.828272040020436
1050.1453736885462560.2907473770925110.854626311453744
1060.1290956286631980.2581912573263960.870904371336802
1070.1149234737390660.2298469474781310.885076526260934
1080.0927882278653660.1855764557307320.907211772134634
1090.1092806670736250.2185613341472490.890719332926375
1100.2952302042527680.5904604085055350.704769795747233
1110.2860200615761930.5720401231523850.713979938423807
1120.2690284375580520.5380568751161050.730971562441948
1130.2322976205459520.4645952410919040.767702379454048
1140.2027129198109820.4054258396219630.797287080189018
1150.1918664438531180.3837328877062360.808133556146882
1160.1590399875090600.3180799750181190.84096001249094
1170.1296646460120970.2593292920241950.870335353987903
1180.1640199028906180.3280398057812350.835980097109382
1190.1344131983816350.2688263967632690.865586801618365
1200.1085029270338130.2170058540676250.891497072966188
1210.08564308396225270.1712861679245050.914356916037747
1220.08122889154002860.1624577830800570.918771108459971
1230.06199366899223830.1239873379844770.938006331007762
1240.05387615439217830.1077523087843570.946123845607822
1250.04151565987862790.08303131975725580.958484340121372
1260.03817673010549070.07635346021098150.96182326989451
1270.02887205719317180.05774411438634350.971127942806828
1280.02729896898614720.05459793797229450.972701031013853
1290.09669132973672850.1933826594734570.903308670263271
1300.4061285923109230.8122571846218450.593871407689077
1310.3604488270009330.7208976540018660.639551172999067
1320.3029338441815650.605867688363130.697066155818435
1330.4731594249348570.9463188498697140.526840575065143
1340.4141080409850120.8282160819700230.585891959014988
1350.345802842065560.691605684131120.65419715793444
1360.2850323858755750.570064771751150.714967614124425
1370.2249406299751260.4498812599502520.775059370024874
1380.1926463609669710.3852927219339420.807353639033029
1390.1454032490305570.2908064980611150.854596750969443
1400.1211189090562750.2422378181125500.878881090943725
1410.08656971564180180.1731394312836040.913430284358198
1420.05838555365041760.1167711073008350.941614446349582
1430.06830533464796450.1366106692959290.931694665352035
1440.866930905827330.266138188345340.13306909417267
1450.7991122582092250.401775483581550.200887741790775
1460.704805556294470.5903888874110610.295194443705530
1470.5945562371682480.8108875256635040.405443762831752
1480.4557449324294880.9114898648589760.544255067570512
1490.3135031101961080.6270062203922160.686496889803892


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.0279720279720280OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/105vui1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/105vui1291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/1n3xm1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/1n3xm1291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/2yuxp1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/2yuxp1291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/3yuxp1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/3yuxp1291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/4qlw91291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/4qlw91291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/5qlw91291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/5qlw91291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/6qlw91291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/6qlw91291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/71cdu1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/71cdu1291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/81cdu1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/81cdu1291412113.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/9u4ux1291412113.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t12914120132sfojpe83fr9xsb/9u4ux1291412113.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by