Home » date » 2010 » Dec » 18 »

MR - Happiness

*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: Sat, 18 Dec 2010 18:05: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/18/t1292695452uljk5yoyj2dt2tm.htm/, Retrieved Sat, 18 Dec 2010 19:04:15 +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/18/t1292695452uljk5yoyj2dt2tm.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 «
14 11 11 26 9 2 1 18 12 8 20 9 1 1 11 15 12 21 9 4 1 12 10 10 31 14 1 1 16 12 7 21 8 5 2 18 11 6 18 8 1 1 14 5 8 26 11 1 1 14 16 16 22 10 1 1 15 11 8 22 9 1 1 15 15 16 29 15 1 1 17 12 7 15 14 2 1 19 9 11 16 11 1 1 10 11 16 24 14 3 2 18 15 16 17 6 1 1 14 12 12 19 20 1 1 14 16 13 22 9 1 1 17 14 19 31 10 1 1 14 11 7 28 8 1 1 16 10 8 38 11 2 1 18 7 12 26 14 4 2 14 11 13 25 11 1 1 12 10 11 25 16 2 1 17 11 8 29 14 1 1 9 16 16 28 11 2 4 16 14 15 15 11 3 1 14 12 11 18 12 1 1 11 12 12 21 9 1 2 16 11 7 25 7 1 2 13 6 9 23 13 1 1 17 14 15 23 10 1 1 15 9 6 19 9 2 1 14 15 14 18 9 1 1 16 12 14 18 13 1 1 9 12 7 26 16 1 1 15 9 15 18 12 1 1 17 13 14 18 6 1 1 13 15 17 28 14 1 1 15 11 14 17 14 1 1 16 10 5 29 10 2 2 16 13 14 12 4 1 1 12 16 8 28 12 1 1 11 13 8 20 14 1 1 15 14 13 17 9 2 1 17 14 14 17 9 1 1 13 16 16 20 10 1 1 16 9 11 31 14 1 1 14 8 10 21 10 1 1 11 8 10 19 9 1 1 12 12 10 23 14 1 1 12 10 8 15 8 4 1 15 16 14 24 9 2 1 16 13 14 28 8 1 1 15 11 12 16 9 1 1 12 14 13 19 9 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 time8 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Happiness[t] = + 17.5662446474836 + 0.00713222387829059Popularity[t] + 0.0344298760876943KnowingPeople[t] + 0.00620232457943602CMistakes[t] -0.306971082504576DAction[t] + 0.173787200187903Tobacco[t] -0.826460409772176Drugs[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17.56624464748361.37917212.736800
Popularity0.007132223878290590.0768410.09280.9261830.463091
KnowingPeople0.03442987608769430.0665630.51730.6058060.302903
CMistakes0.006202324579436020.0352670.17590.8606540.430327
DAction-0.3069710825045760.07295-4.2084.6e-052.3e-05
Tobacco0.1737872001879030.2036930.85320.3950370.197519
Drugs-0.8264604097721760.368906-2.24030.026670.013335


Multiple Linear Regression - Regression Statistics
Multiple R0.404266973125832
R-squared0.163431785560322
Adjusted R-squared0.127059254497727
F-TEST (value)4.49327502886909
F-TEST (DF numerator)6
F-TEST (DF denominator)138
p-value0.000345024051561227
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.21953728874425
Sum Squared Residuals679.835717105414


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11414.9430624342372-0.943062434237218
21814.6359038821883.36409611781205
31115.3225839833167-4.32258398331675
41213.2238693444577-1.22386934445768
51614.78333580416371.2166641958363
61814.854478339483.14552166052002
71414.0092500975074-0.00925009750738331
81414.645305353057-0.645305353056965
91514.64117630746850.358823692531467
101513.14673398871181.85326601128815
111713.20939417086813.7906058291319
121914.07904537548934.92095462451073
131012.9152785434097-2.91527854340971
141815.83504583629982.1649541637002
151411.3907391544092.60926084559104
161414.8489868072985-0.848986807298458
171714.79015145477842.20984854522161
181414.950931461362-0.95093146136203
191614.293126312041.70687368796003
201812.93522199289255.06477800710745
211414.2179904966362-0.217990496636162
221212.7809303082475-0.780930308247507
231713.14973716700173.85026283299829
24912.0699541889004-3.06995418890038
251614.59379807502791.40620192497213
261413.80587561377840.194124386221564
271113.953365301346-2.95336530134599
281614.41283516035611.58716483964388
291313.4182630587259-0.418263058725908
301714.60281335379212.39718664620787
311514.71323233398620.286767666013842
321414.8514751611901-0.851475161190117
331613.60219415953692.39780584046306
34912.4898903760448-3.48989037604485
351513.92219844649431.07780155350566
361715.75812396094731.24187603905274
371313.4819326227247-0.481932622724682
381513.28188852857461.71811147142536
391613.61452643529442.38547356470564
401616.3348521784798-0.334852178479798
411213.7931381268229-1.79313812682288
421113.1081806935434-2.10818069354336
431514.97749793683260.0225020631674011
441714.83814061273242.16185938726761
451314.6329007038981-1.63290070389809
461613.25116699666712.74883300333292
471414.375465980925-0.375465980925039
481114.6700324142707-3.67003241427074
491213.1885151955788-1.18851519557877
501215.4189604946025-3.41896049460247
511515.0696085327329-0.0696085327329265
521615.20620504173250.793794958267528
531514.74168186434270.258318135657306
541213.6845561668229-1.68455616682292
551213.9075400405549-1.9075400405549
56812.8406105684022-4.84061056840216
571314.8526185408823-1.85261854088227
581114.5807937533709-3.58079375337095
591415.0902094203056-1.09020942030561
601513.44564294803931.55435705196072
611014.2759984277378-4.27599842773784
621114.6599763772592-3.65997637725922
631213.6802594145816-1.68025941458163
641513.38825794572391.61174205427609
651515.004795589042-0.00479558904200265
661413.52620780999090.473792190009095
671612.23477751057213.76522248942791
681515.348056346232-0.348056346231982
691515.6859279317339-0.68592793173387
701314.6391030284775-1.63910302847753
711714.56404095172272.4359590482773
721313.1713682921833-0.171368292183255
731514.3364688454470.663531154552962
741314.9217796370626-1.92177963706256
751513.58782160739231.41217839260775
761614.55961056212941.44038943787063
771514.5410858254950.458914174504973
781614.22140874982671.77859125017332
791514.24993764533980.750062354660162
801414.4958097548413-0.495809754841266
811513.17285087997821.82714912002178
82712.7157107881109-5.71571078811091
831715.05734362531841.94265637468163
841315.868958016042-2.86895801604195
851514.19411109761730.805888902382728
861413.7370158616030.262984138396953
871312.30745948138780.692540518612214
881614.50564381300451.49435618699549
891214.1897685716355-2.18976857163555
901415.2149013467112-1.21490134671121
911714.94814176346552.05185823653453
921515.322124052563-0.322124052563006
931712.52246045353484.47753954646517
941213.6387795517196-1.63877955171961
951614.0059927027791.99400729722102
961113.1679023111923-2.16790231119232
971513.91033309324581.08966690675417
98914.3366935788556-5.33669357885562
991614.63290070389811.36709929610191
1001012.9940336176989-2.99403361769893
1011011.6542629489503-1.65426294895033
1021514.45175930098360.548240699016378
1031114.0245266816668-3.02452668166678
1041314.9736674806888-1.97366748068877
1051412.76782336514571.2321766348543
1061815.01359451546562.98640548453438
1071614.84404159330691.15595840669308
1081412.62482018249911.37517981750094
1091413.84948498188690.150515018113135
1101413.95730736023670.0426926397632883
1111413.82962137544530.170378624554713
1121213.3671682446016-1.36716824460158
1131414.2629708497927-0.262970849792661
1141514.64893708664080.351062913359226
1151513.95182494795921.04817505204078
1161312.03495963246520.965040367534796
1171714.55661301034722.44338698965285
1181714.3264120646372.67358793536297
1191915.48495419923643.51504580076357
1201514.1224672740530.877532725947038
1211314.2524259992315-1.2524259992315
122912.2990960142057-3.29909601420574
1231515.0074391748881-0.00743917488812934
1241515.1136301037947-0.11363010379467
1251615.15042897637060.849571023629369
1261113.5264156638766-2.52641566387656
1271413.99343282166560.00656717833436187
1281113.175180647121-2.17518064712104
1291512.17196271791042.82803728208958
1301313.2840440446696-0.284044044669612
1311613.34049914768612.65950085231387
1321415.419478190948-1.41947819094801
1331514.45722482231660.542775177683419
1341614.08728934170351.91271065829649
1351614.93924323110871.06075676889128
1361112.8369732083107-1.83697320831071
1371313.229709204646-0.22970920464604
1381614.59379807502791.40620192497213
1391213.8874413591176-1.8874413591176
140913.0713705679521-4.07137056795212
1411312.86350181968340.136498180316632
1421315.868958016042-2.86895801604195
1431414.4581490951078-0.458149095107793
1441915.48495419923643.51504580076357
1451315.0213552946379-2.02135529463787


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.4378594266708340.8757188533416670.562140573329166
110.2831473841091540.5662947682183070.716852615890846
120.2266912459413550.453382491882710.773308754058645
130.5846325410988150.8307349178023710.415367458901185
140.5029461081478040.9941077837043920.497053891852196
150.415451300347890.830902600695780.58454869965211
160.409166744419790.8183334888395790.59083325558021
170.6891931662362340.6216136675275320.310806833763766
180.6317784433433650.736443113313270.368221556656635
190.744580014472180.5108399710556390.255419985527819
200.8941172241735060.2117655516529880.105882775826494
210.8665518205953420.2668963588093160.133448179404658
220.8438788560912720.3122422878174560.156121143908728
230.8631294509008120.2737410981983750.136870549099188
240.8917484563640240.2165030872719510.108251543635976
250.8601645233995430.2796709532009150.139835476600457
260.839941421677990.3201171566440190.160058578322009
270.8808341519221830.2383316961556350.119165848077817
280.8598889624144350.280222075171130.140111037585565
290.8656744540276250.2686510919447490.134325545972375
300.860648049543340.2787039009133190.13935195045666
310.8354737544981120.3290524910037760.164526245501888
320.8090801586705920.3818396826588150.190919841329407
330.7875559530962790.4248880938074430.212444046903721
340.874671589810520.250656820378960.12532841018948
350.849575342234150.3008493155317010.15042465776585
360.8162404170337270.3675191659325460.183759582966273
370.7762447539532090.4475104920935810.223755246046791
380.7437788692804820.5124422614390350.256221130719518
390.7517754520585990.4964490958828030.248224547941401
400.7205077111639880.5589845776720230.279492288836012
410.6937253390585820.6125493218828370.306274660941418
420.7039116330250680.5921767339498650.296088366974932
430.6558906370673450.688218725865310.344109362932655
440.6402932843899540.7194134312200910.359706715610046
450.6147227866530580.7705544266938830.385277213346942
460.6193450560522160.7613098878955680.380654943947784
470.6032883040920070.7934233918159860.396711695907993
480.7574259210713170.4851481578573650.242574078928683
490.732812420222380.5343751595552410.267187579777621
500.8006486324019150.398702735196170.199351367598085
510.762964899857380.4740702002852410.23703510014262
520.7249373736939820.5501252526120370.275062626306018
530.6824671717965420.6350656564069160.317532828203458
540.6613031367548870.6773937264902260.338696863245113
550.6421833507258650.715633298548270.357816649274135
560.8229551964213450.3540896071573110.177044803578655
570.8147079248340210.3705841503319570.185292075165979
580.857517499911440.2849650001771190.142482500088559
590.8395543636829340.3208912726341320.160445636317066
600.8218485148961670.3563029702076660.178151485103833
610.9013189597175820.1973620805648360.0986810402824178
620.9317857516402550.1364284967194910.0682142483597453
630.9236923100088460.1526153799823080.0763076899911539
640.9142465303337610.1715069393324770.0857534696662385
650.89310440647270.2137911870546010.1068955935273
660.8702019711133470.2595960577733070.129798028886654
670.9153999189979620.1692001620040760.0846000810020378
680.8953122435856660.2093755128286670.104687756414334
690.8735208966501990.2529582066996030.126479103349801
700.861806255399540.2763874892009180.138193744600459
710.8658923453246960.2682153093506080.134107654675304
720.8381323635011160.3237352729977690.161867636498884
730.8079685768951470.3840628462097060.192031423104853
740.8025601219182650.394879756163470.197439878081735
750.783821942119390.432356115761220.21617805788061
760.7629798761428280.4740402477143430.237020123857172
770.7241628378955130.5516743242089730.275837162104487
780.7107929466224460.5784141067551080.289207053377554
790.6720044697845370.6559910604309250.327995530215463
800.6278041152009480.7443917695981040.372195884799052
810.6173773141071430.7652453717857130.382622685892857
820.8214693886003870.3570612227992250.178530611399613
830.8152586709671310.3694826580657380.184741329032869
840.8396293331550490.3207413336899030.160370666844951
850.8118606262250020.3762787475499950.188139373774998
860.7774000462976530.4451999074046950.222599953702347
870.7434722210417650.513055557916470.256527778958235
880.7272875716692290.5454248566615430.272712428330771
890.7220417024917050.555916595016590.277958297508295
900.696576505630240.606846988739520.30342349436976
910.696986225507750.60602754898450.30301377449225
920.6510744420572250.697851115885550.348925557942775
930.8483353219134250.3033293561731490.151664678086575
940.8289702434115260.3420595131769480.171029756588474
950.8326248901311040.3347502197377930.167375109868896
960.8252081020526670.3495837958946660.174791897947333
970.8074937535350180.3850124929299640.192506246464982
980.934398815773350.13120236845330.0656011842266499
990.920499616046020.159000767907960.0795003839539798
1000.9211017487101950.157796502579610.0788982512898052
1010.9074815706460460.1850368587079070.0925184293539537
1020.8837490755641570.2325018488716850.116250924435843
1030.9060802282694330.1878395434611340.093919771730567
1040.9229416289441070.1541167421117860.0770583710558929
1050.9259359831051620.1481280337896770.0740640168948385
1060.9387401856248550.122519628750290.0612598143751449
1070.921154400302030.157691199395940.0788455996979701
1080.927087877921880.1458242441562390.0729121220781193
1090.9045448139805980.1909103720388050.0954551860194024
1100.9015271782530150.1969456434939710.0984728217469853
1110.8818682410653530.2362635178692940.118131758934647
1120.8541748591838980.2916502816322050.145825140816102
1130.814734769062380.3705304618752410.18526523093762
1140.769181379327480.4616372413450410.230818620672521
1150.7294896396224660.5410207207550690.270510360377534
1160.6736485946911540.6527028106176930.326351405308846
1170.7364629917807350.527074016438530.263537008219265
1180.7169336293079850.5661327413840310.283066370692015
1190.7422446626859780.5155106746280440.257755337314022
1200.7651491592225040.4697016815549920.234850840777496
1210.7056937529097480.5886124941805030.294306247090252
1220.7400756440697350.519848711860530.259924355930265
1230.6844747716658250.631050456668350.315525228334175
1240.6095647941801760.7808704116396480.390435205819824
1250.5285472385894660.9429055228210680.471452761410534
1260.4541247500443630.9082495000887270.545875249955637
1270.422509374574280.845018749148560.57749062542572
1280.3416981316780460.6833962633560910.658301868321954
1290.3012839933017690.6025679866035390.69871600669823
1300.223021039213520.4460420784270390.77697896078648
1310.4153010555056120.8306021110112230.584698944494388
1320.6459985668666870.7080028662666250.354001433133313
1330.517486816408250.96502636718350.48251318359175
1340.6046476726486570.7907046547026860.395352327351343
1350.5456861713112080.9086276573775830.454313828688792


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 level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/100xuc1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/100xuc1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/1bwf01292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/1bwf01292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/2bwf01292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/2bwf01292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/34oxl1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/34oxl1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/44oxl1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/44oxl1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/54oxl1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/54oxl1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/6wfwo1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/6wfwo1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/7povr1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/7povr1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/8povr1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/8povr1292695515.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/9povr1292695515.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/18/t1292695452uljk5yoyj2dt2tm/9povr1292695515.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by