Home » date » 2010 » Dec » 15 »

Multiple Regression Analysis

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 14 Dec 2010 23:59:54 +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/15/t1292372543zotmtd6eb8h5a8j.htm/, Retrieved Wed, 15 Dec 2010 01:24:35 +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/15/t1292372543zotmtd6eb8h5a8j.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 26 9 15 6 25 25 16 20 9 15 6 25 24 19 21 9 14 13 19 21 15 31 14 10 8 18 23 14 21 8 10 7 18 17 13 18 8 12 9 22 19 19 26 11 18 5 29 18 15 22 10 12 8 26 27 14 22 9 14 9 25 23 15 29 15 18 11 23 23 16 15 14 9 8 23 29 16 16 11 11 11 23 21 16 24 14 11 12 24 26 17 17 6 17 8 30 25 15 19 20 8 7 19 25 15 22 9 16 9 24 23 20 31 10 21 12 32 26 18 28 8 24 20 30 20 16 38 11 21 7 29 29 16 26 14 14 8 17 24 19 25 11 7 8 25 23 16 25 16 18 16 26 24 17 29 14 18 10 26 30 17 28 11 13 6 25 22 16 15 11 11 8 23 22 15 18 12 13 9 21 13 14 21 9 13 9 19 24 15 25 7 18 11 35 17 12 23 13 14 12 19 24 14 23 10 12 8 20 21 16 19 9 9 7 21 23 14 18 9 12 8 21 24 7 18 13 8 9 24 24 10 26 16 5 4 23 24 14 18 12 10 8 19 23 16 18 6 11 8 17 26 16 28 14 11 8 24 24 16 17 14 12 6 15 21 14 29 10 12 8 25 23 20 12 4 15 4 27 28 14 25 12 12 7 29 23 14 28 12 16 14 27 22 11 20 14 14 10 18 24 15 17 9 17 9 25 21 16 17 9 13 6 22 23 14 20 10 10 8 26 23 16 31 14 17 11 23 20 14 21 10 12 8 16 23 12 19 9 13 8 27 21 16 23 1 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Learning[t] = + 12.3256161875859 + 0.00618479983854838Concern[t] -0.278785234171933Doubts[t] + 0.103632621238310Expectations[t] + 0.0086704709418611Criticism[t] + 0.0271802218699456Standards[t] + 0.157965607370892Organization[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)12.32561618758591.4624818.427900
Concern0.006184799838548380.0377720.16370.8701670.435083
Doubts-0.2787852341719330.069179-4.02999e-054.5e-05
Expectations0.1036326212383100.062961.6460.1019590.05098
Criticism0.00867047094186110.0790660.10970.9128310.456416
Standards0.02718022186994560.0490930.55360.5806860.290343
Organization0.1579656073708920.0497343.17620.0018280.000914


Multiple Linear Regression - Regression Statistics
Multiple R0.455226373457424
R-squared0.207231051091198
Adjusted R-squared0.173968018269849
F-TEST (value)6.23007084784512
F-TEST (DF numerator)6
F-TEST (DF denominator)143
p-value7.8201096992414e-06
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.06577475960640
Sum Squared Residuals610.241826112041


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11316.2125117510879-3.21251175108787
21616.0174373446854-0.0174373446853516
31915.34370466654633.65629533345371
41513.84249464728141.15750535271862
51414.4968939387603-0.49689393876028
61315.1275978258265-2.12759782582654
71914.96013031140034.03986968859972
81515.9585418323419-0.958541832341931
91415.7942201285788-1.79422012857883
101514.54231330551410.457686694485855
111614.72359998220141.27640001779863
121614.53569228089081.46430771910921
131614.57449370674961.42550629325035
141717.3537115487665-0.353711548766472
151512.22274136738042.77725863261955
161515.9743051491855-0.974305149185507
172016.98669622964993.01330377035011
181816.90381984176271.09618015823732
191617.1002083961413-1.10020839614133
201614.35688651854281.64311348145717
211914.52110524014064.47889475985942
221614.52164749967811.47835250032195
231715.99972798595031.00027201404970
241714.98614881783152.01385118216853
251614.66146167559761.33853832440245
261513.14111564428181.85888435571818
271415.6792869836532-1.67928698365319
281516.1262249977494-1.12622499774941
291214.7061596807064-2.70615968070645
301414.8538516567355-0.853851656735453
311615.13144079350810.86855920649187
321415.6027899356973-1.60278993569727
33714.163329650608-7.16332965060799
341012.9950219065064-2.99502190650639
351414.3468429395941-0.346842939594062
361616.5427233442368-0.542723344236757
371614.24861980759461.75138019240539
381613.54835986978302.45164013021702
391415.3427927798583-1.34279277985826
402018.03076704817641.96923295182363
411414.8605335286981-0.860533528698117
421415.1419856586492-1.14198565864925
431114.3642988832652-3.3642988832652
441515.7582627783592-0.758262778359236
451615.55211142971240.447888570287641
461415.1070445607046-1.10704456070464
471614.25593869601221.74406130398781
481415.0486923843204-1.04869238432036
491215.4017918658811-3.40179186588112
501614.94337903674481.05662096325517
51913.6735393075749-4.67353930757492
521414.2848213877727-0.284821387772669
531615.59164126070110.408358739298907
541614.98062240455781.01937759544224
551515.0448667768714-0.0448667768714398
561614.71443473482621.28556526517378
571213.4044584111642-1.40445841116418
581616.4306176266659-0.430617626665932
591616.1199728896308-0.119972889630781
601416.3731463457375-2.37314634573747
611612.45555834015813.54444165984192
621715.99593885196171.00406114803827
631814.58100781965353.41899218034646
641815.40954227113772.59045772886225
651214.4918698578981-2.49186985789814
661615.84478187978130.155218120218692
671014.3109847797333-4.31098477973325
681412.55498554049301.44501445950697
691815.35466948654092.64533051345908
701816.22944926640441.77055073359564
711615.51039144600540.489608553994597
721615.46474629104730.535253708952651
731614.73826258631821.26173741368180
741314.6840829976808-1.68408299768081
751615.06492135462180.935078645378235
761614.77503259792851.22496740207154
772015.99657987829394.0034201217061
781615.26363112794390.736368872056057
791512.65331324227042.34668675772957
801515.3514283261438-0.351428326143807
811615.85587162968560.144128370314401
821414.1055970151842-0.105597015184237
831513.21797072333031.78202927666970
841214.8618911097905-2.86189110979051
851716.05443953512710.945560464872856
861615.22064294064290.77935705935714
871513.00157741501711.99842258498291
881314.3841044646471-1.38410446464714
891615.93587948809530.0641205119047345
901615.29196242518220.708037574817808
911616.2431343485888-0.243134348588786
921615.88552516840200.114474831598036
931415.5962077967892-1.59620779678920
941614.20921244544231.79078755455770
951615.20349920411610.79650079588393
962016.43453708386303.56546291613696
971515.5524538535673-0.55245385356726
981614.14235004000521.85764995999478
991314.3388817605544-1.3388817605544
1001715.94105650881611.05894349118395
1011614.27237939738661.72762060261342
1021213.3820911668385-1.38209116683846
1031615.03761861509710.962381384902888
1041615.38382938046630.616170619533714
1051715.52891876135711.47108123864287
1061313.1697057822538-0.16970578225384
1071215.8938827607261-3.89388276072607
1081815.83725276027652.1627472397235
1091413.76143386281540.238566137184593
1101414.5518760110905-0.551876011090541
1111313.7840851839024-0.78408518390235
1121615.47187790223020.528122097769778
1131312.59210197582570.407898024174267
1141615.37968062777260.620319372227447
1151314.8709940137106-1.87099401371062
1161615.88406084097250.115939159027488
1171514.78880714654040.211192853459580
1181615.40849610018220.591503899817782
1191514.93255621764230.0674437823577326
1201715.64825386597941.35174613402057
1211515.8977377480297-0.897737748029724
1221213.6393640506104-1.63936405061043
1231614.42925409628511.57074590371489
1241014.2187822446243-4.2187822446243
1251614.31256823795911.68743176204089
1261414.7389013208296-0.738901320829561
1271516.4755884143781-1.47558841437810
1281314.5183295954537-1.51832959545375
1291515.4177865658512-0.417786565851156
1301113.7857724701193-2.78577247011932
1311214.2703691701158-2.27036917011577
132814.5989059202342-6.59890592023418
1331616.3110948713655-0.311094871365533
1341514.91614389966030.0838561003397311
1351715.34719494374591.65280505625411
1361615.44245365901050.55754634098952
1371015.0704011970605-5.07040119706048
1381813.86750570345384.13249429654624
1391313.9430146783361-0.943014678336107
1401514.33334972215600.66665027784403
1411614.66146167559761.33853832440245
1421615.02810456798550.97189543201446
1431413.47124320054340.528756799456632
1441013.1612303086049-3.16123030860495
1451716.05443953512710.945560464872856
1461314.3803771702264-1.38037717022638
1471515.8977377480297-0.897737748029724
1481615.94682677860480.0531732213951709
1491215.284119549729-3.28411954972900
1501313.5624866853128-0.562486685312814


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.9291623734389260.1416752531221480.0708376265610739
110.8758709469553730.2482581060892540.124129053044627
120.79967379025670.4006524194865990.200326209743300
130.7082172397929190.5835655204141620.291782760207081
140.6290473741203050.741905251759390.370952625879695
150.5488643413386670.9022713173226660.451135658661333
160.4646116104853080.9292232209706160.535388389514692
170.4494572782308670.8989145564617340.550542721769133
180.4545430005169360.9090860010338720.545456999483064
190.3698739886647690.7397479773295380.63012601133523
200.3165600391375210.6331200782750410.683439960862479
210.4603151157030170.9206302314060340.539684884296983
220.4437757198236560.8875514396473110.556224280176344
230.3850965234826640.7701930469653270.614903476517336
240.326861036115830.653722072231660.67313896388417
250.2694334468874840.5388668937749670.730566553112516
260.2297344776085710.4594689552171420.770265522391429
270.1840833803791990.3681667607583990.8159166196208
280.2656198333598650.531239666719730.734380166640135
290.3640428081275760.7280856162551510.635957191872424
300.3146392689661040.6292785379322070.685360731033896
310.2726025298308380.5452050596616760.727397470169162
320.2326486683486410.4652973366972820.767351331651359
330.9220421377444130.1559157245111740.0779578622555869
340.9519046678697280.0961906642605430.0480953321302715
350.9356439455868280.1287121088263440.0643560544131718
360.9213179332032070.1573641335935860.078682066796793
370.9095876803843060.1808246392313870.0904123196156936
380.9036939949385450.1926120101229090.0963060050614546
390.8855504546179840.2288990907640330.114449545382016
400.9036397921371630.1927204157256730.0963602078628366
410.8822665547274740.2354668905450530.117733445272526
420.8639835705087310.2720328589825370.136016429491269
430.9202620779831520.1594758440336970.0797379220168483
440.9053320141366770.1893359717266460.0946679858633232
450.8818394747177110.2363210505645780.118160525282289
460.8583211343334880.2833577313330230.141678865666512
470.8399563080155030.3200873839689940.160043691984497
480.8136007321354740.3727985357290520.186399267864526
490.8596952067151830.2806095865696340.140304793284817
500.8370363561186370.3259272877627260.162963643881363
510.9255165397039820.1489669205920350.0744834602960177
520.907060861884710.1858782762305790.0929391381152894
530.888738469536270.2225230609274620.111261530463731
540.8733428696304290.2533142607391430.126657130369571
550.8460497111504870.3079005776990250.153950288849513
560.8361775099326760.3276449801346480.163822490067324
570.8181581120563720.3636837758872570.181841887943628
580.7845754545205990.4308490909588030.215424545479402
590.7465047850409010.5069904299181980.253495214959099
600.7476897301424980.5046205397150040.252310269857502
610.8080469362212550.383906127557490.191953063778745
620.7850160948511230.4299678102977550.214983905148877
630.8380999767299590.3238000465400830.161900023270041
640.8612762319875360.2774475360249280.138723768012464
650.8742404699275970.2515190601448060.125759530072403
660.8482678615428420.3034642769143150.151732138457158
670.921927789852140.1561444202957180.078072210147859
680.9106068558013580.1787862883972840.0893931441986421
690.929043625279550.1419127494409020.0709563747204508
700.9275871919228010.1448256161543970.0724128080771987
710.9101405265333170.1797189469333670.0898594734666833
720.8900533878261720.2198932243476560.109946612173828
730.8771933037375360.2456133925249280.122806696262464
740.8680541954638850.2638916090722300.131945804536115
750.8473156367238180.3053687265523630.152684363276182
760.828223182856580.3435536342868410.171776817143420
770.9051928872524660.1896142254950670.0948071127475335
780.8863576424253350.2272847151493300.113642357574665
790.89170252965480.2165949406904000.108297470345200
800.8675854151877820.2648291696244350.132414584812218
810.8400027363943460.3199945272113080.159997263605654
820.8130299932693970.3739400134612060.186970006730603
830.814252900536090.3714941989278190.185747099463909
840.8431841055385360.3136317889229270.156815894461464
850.8185495070398750.3629009859202490.181450492960125
860.790903050721740.4181938985565190.209096949278260
870.7989419382231490.4021161235537030.201058061776851
880.7825231029186160.4349537941627670.217476897081384
890.7498920946125420.5002158107749150.250107905387457
900.7137609603400970.5724780793198060.286239039659903
910.6717229148034350.656554170393130.328277085196565
920.6267151035951450.7465697928097090.373284896404854
930.6184575375771780.7630849248456430.381542462422822
940.6210067229959390.7579865540081220.378993277004061
950.5780279739635770.8439440520728460.421972026036423
960.665161995195470.6696760096090610.334838004804530
970.619028951071470.7619420978570590.380971048928530
980.6482681617426140.7034636765147720.351731838257386
990.618685244871810.762629510256380.38131475512819
1000.5982077401272970.8035845197454050.401792259872703
1010.6111167530041570.7777664939916860.388883246995843
1020.5777719616482720.8444560767034560.422228038351728
1030.5323973744811440.9352052510377120.467602625518856
1040.5111213937310480.9777572125379040.488878606268952
1050.5039799064221630.9920401871556750.496020093577837
1060.4501711370674220.9003422741348440.549828862932578
1070.5866036887369350.826792622526130.413396311263065
1080.5900061464344760.8199877071310480.409993853565524
1090.5864498841884450.827100231623110.413550115811555
1100.535519440286060.928961119427880.46448055971394
1110.481438379199430.962876758398860.51856162080057
1120.4295165703952450.859033140790490.570483429604755
1130.3978175957459140.7956351914918270.602182404254086
1140.3602571861960270.7205143723920540.639742813803973
1150.3437947892940010.6875895785880020.656205210705999
1160.2902586908711780.5805173817423550.709741309128822
1170.2647868174765840.5295736349531670.735213182523416
1180.2675193308925900.5350386617851790.73248066910741
1190.2190093834051960.4380187668103910.780990616594804
1200.1879243449694320.3758486899388650.812075655030568
1210.1544073500228540.3088147000457070.845592649977146
1220.1405371390905320.2810742781810630.859462860909468
1230.1311061952173870.2622123904347750.868893804782613
1240.1774338093142160.3548676186284320.822566190685784
1250.1428627141595030.2857254283190060.857137285840497
1260.1104636976404150.2209273952808310.889536302359585
1270.08326753648247460.1665350729649490.916732463517525
1280.06299010801900080.1259802160380020.937009891981
1290.04431207837384920.08862415674769830.95568792162615
1300.03631639597100870.07263279194201740.963683604028991
1310.02690943476501740.05381886953003470.973090565234983
1320.1961735422746980.3923470845493960.803826457725302
1330.1428393529853230.2856787059706460.857160647014677
1340.1032720159317210.2065440318634420.89672798406828
1350.3152837951913180.6305675903826360.684716204808682
1360.2425885521496950.4851771042993910.757411447850305
1370.5844819251579990.8310361496840030.415518074842001
1380.5754053585707990.8491892828584010.424594641429201
1390.438559802691960.877119605383920.56144019730804
1400.3132088952179260.6264177904358510.686791104782075


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.0305343511450382OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/10k4da1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/10k4da1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/1v3gg1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/1v3gg1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/2v3gg1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/2v3gg1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/36cyj1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/36cyj1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/46cyj1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/46cyj1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/56cyj1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/56cyj1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/6ymxm1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/6ymxm1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/7rvep1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/7rvep1292371182.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/8rvep1292371182.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/15/t1292372543zotmtd6eb8h5a8j/8rvep1292371182.ps (open in new window)


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