Home » date » 2010 » Dec » 12 »

model 2 monthly dummy

*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: Sun, 12 Dec 2010 14:18:45 +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/12/t1292163446p0symr40ams16d2.htm/, Retrieved Sun, 12 Dec 2010 15:17:37 +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/12/t1292163446p0symr40ams16d2.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 «
24 14 11 12 24 26 25 11 7 8 25 23 17 6 17 8 30 25 18 12 10 8 19 23 18 8 12 9 22 19 16 10 12 7 22 29 20 10 11 4 25 25 16 11 11 11 23 21 18 16 12 7 17 22 17 11 13 7 21 25 23 13 14 12 19 24 30 12 16 10 19 18 23 8 11 10 15 22 18 12 10 8 16 15 15 11 11 8 23 22 12 4 15 4 27 28 21 9 9 9 22 20 15 8 11 8 14 12 20 8 17 7 22 24 31 14 17 11 23 20 27 15 11 9 23 21 34 16 18 11 21 20 21 9 14 13 19 21 31 14 10 8 18 23 19 11 11 8 20 28 16 8 15 9 23 24 20 9 15 6 25 24 21 9 13 9 19 24 22 9 16 9 24 23 17 9 13 6 22 23 24 10 9 6 25 29 25 16 18 16 26 24 26 11 18 5 29 18 25 8 12 7 32 25 17 9 17 9 25 21 32 16 9 6 29 26 33 11 9 6 28 22 13 16 12 5 17 22 32 12 18 12 28 22 25 12 12 7 29 23 29 14 18 10 26 30 22 9 14 9 25 23 18 10 15 8 14 17 17 9 16 5 25 23 20 10 10 8 26 23 15 12 11 8 20 25 20 14 14 10 18 24 33 14 9 6 32 24 29 10 12 8 25 23 23 14 17 7 25 21 26 16 5 4 23 24 18 9 12 8 21 24 20 10 12 8 20 28 11 6 6 4 15 16 28 8 24 20 30 20 26 13 12 8 24 29 22 10 12 8 26 27 17 8 14 6 24 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
PS[t] = + 6.85249471188449 + 0.334156412849869CM[t] -0.370092394686342Doubts_about_actions[t] + 0.159316471007100PE[t] + 0.0649584207606242PC[t] + 0.40340194756281O[t] -0.112988112395837M1[t] + 0.301657650441828M2[t] + 0.663745180491901M3[t] + 0.151960848781341M4[t] + 0.372819591437056M5[t] + 1.02662475283370M6[t] + 0.417404861828108M7[t] + 1.66380986838678M8[t] + 1.41001962150359M9[t] + 0.924259509685394M10[t] -0.535671626926259M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.852494711884492.4787742.76450.0064590.003229
CM0.3341564128498690.0596925.59800
Doubts_about_actions-0.3700923946863420.116287-3.18260.0017930.000897
PE0.1593164710071000.1066281.49410.1373590.068679
PC0.06495842076062420.1394340.46590.6420210.32101
O0.403401947562810.0761395.298200
M1-0.1129881123958371.367893-0.08260.9342860.467143
M20.3016576504418281.3698780.22020.8260260.413013
M30.6637451804919011.3623930.48720.6268740.313437
M40.1519608487813411.4045630.10820.9139970.456999
M50.3728195914370561.3995610.26640.7903310.395165
M61.026624752833701.4018810.73230.4651810.23259
M70.4174048618281081.4234880.29320.7697770.384888
M81.663809868386781.3974531.19060.2357970.117898
M91.410019621503591.3821361.02020.3093810.15469
M100.9242595096853941.3717390.67380.5015420.250771
M11-0.5356716269262591.422233-0.37660.7070020.353501


Multiple Linear Regression - Regression Statistics
Multiple R0.622661478001645
R-squared0.387707316187193
Adjusted R-squared0.318716591250539
F-TEST (value)5.61970201854202
F-TEST (DF numerator)16
F-TEST (DF denominator)142
p-value3.06102809766173e-09
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.48067319339608
Sum Squared Residuals1720.34219485010


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12422.59839984911521.40160015088476
22522.35017379910262.64982620089742
33024.28944060498205.71055939501796
41919.9692391258280-0.969239125827973
52220.44045101975261.55954898024735
62223.5898612001837-1.58986120018373
72522.34946743703742.65053256296262
82320.73025555258342.26974444741663
91719.5972008934956-2.59720089349562
102121.9972686559548-0.997268655954795
111921.8827978343171-2.88279783431708
121922.8959611609948-3.89596116099485
131522.7412731726110-7.74127317261105
141616.8917203469860-0.891720346985974
152319.60456113711963.39543886288044
162723.47879821602663.52120178397345
172220.99828039815741.00171960184259
181417.0436984178923-3.04369841789228
192223.8370243671717-1.83702436717173
202325.1848214397522-2.18482143975215
212322.54189942678210.458100573217885
222124.8668720012348-3.86687200123479
231921.5496071654349-2.54960716543491
241823.4211268547222-5.42112685472224
252022.5848651810082-2.58486518100816
262322.19593540389300.804064596106974
272523.32968092837441.67031907162564
281923.0282953297813-4.02829532978134
292423.65785795074540.342142049254590
302221.96805637258950.0319436274104627
312525.1109847781951-0.110984778195149
322624.53741453834171.46258546165828
332923.33328836399645.66671163600362
343225.62148067180576.37851932819433
352520.43109724401424.56890275598577
362923.93607100835955.0639289916405
372824.3940934919943.60590650800599
381716.68814001666330.311859983336738
392826.29017674097321.70982325902682
402922.56200853703066.43799146296938
412627.3538958629773-1.35389586297727
422523.99303017012791.00696982987215
431419.3510385979061-5.35103859790606
442523.01823248040331.98176751959671
452622.63579551362263.36420448637735
462020.7051889143151-0.70518891431514
471820.3803193595599-2.38031935955988
483224.20360831545647.79639168454357
492524.43882843738620.561171562613768
502521.29298618352863.70701381647143
512321.02089109107691.97910890892308
522121.801551199464-0.801551199464008
532023.9342381633844-3.93423816338436
541517.0044493080387-2.00444930803873
553026.85634264665733.14365735334275
562426.5232916809371-2.52329168093708
572625.23634907158780.763650928412177
582421.99169804757192.00830195242813
592220.40635678820311.59364321179687
601415.0245112216698-1.02451122166975
612421.67080619376042.3291938062396
622422.61302447447361.38697552552639
632423.40449707147020.595502928529774
642419.74887415745094.25112584254914
651918.22147256378260.778527436217351
663127.35933786556593.64066213443408
672226.6218045032383-4.62180450323831
682722.59666726023804.40333273976202
691918.52668484181940.473315158180565
702522.74606337325082.25393662674917
712023.9538129310552-3.95381293105519
722121.0374369821878-0.0374369821878016
732726.89619092139280.103809078607203
742324.1537863151167-1.15378631511666
752525.7380213530364-0.738021353036376
762021.8920350263386-1.89203502633858
772118.93396748148732.06603251851267
782222.9519985207818-0.951998520781768
792322.98925123710150.0107487628985287
802525.1373752925557-0.137375292555674
812524.37936921822070.62063078177933
821724.3316144685456-7.3316144685456
831920.3586233541285-1.35862335412847
842523.45517829661841.54482170338161
851921.7349870254826-2.73498702548262
862022.7858399135692-2.78583991356919
872622.59152064174893.40847935825114
882320.48768031227542.51231968772456
892724.47390940002592.52609059997409
901721.3651148582308-4.36511485823084
911723.2084174838922-6.20841748389221
921921.3533357694662-2.35333576946622
931720.5748857342479-3.57488573424786
942222.27480789833-0.274807898330001
952122.6288813498089-1.62888134980886
963228.12401714027663.87598285972337
972124.0769821528684-3.07698215286836
982124.1521256301243-3.15212563012434
991821.3723276805754-3.37232768057538
1001820.9103911893702-2.91039118937019
1012322.72076002353680.279239976463159
1021921.0738079701298-2.07380797012977
1032020.7532245962790-0.753224596278977
1042123.4845549731727-2.48455497317272
1052024.8675401713321-4.86754017133209
1061719.0776735155312-2.07767351553116
1071819.2790753612779-1.27907536127786
1081920.3131446122449-1.31314461224493
1092221.48785398741890.512146012581061
1101518.4265069306332-3.42650693063324
1111418.9306777030369-4.93067770303689
1121826.4103072897199-8.41030728971993
1132421.4982896343652.50171036563499
1143524.082455238222910.9175447617771
1152919.32407211161169.67592788838835
1162122.9796209967813-1.97962099678127
1172521.26660644850253.73339355149745
1182018.87463266578891.12536733421109
1192222.1454594740557-0.145459474055698
1201316.2431973967479-3.24319739674791
1212622.60891805705913.39108194294092
1221716.58226355908920.41773644091077
1232520.29599767562444.70400232437565
1242020.4867606355997-0.486760635599709
1251917.98672765619361.01327234380639
1262122.9975235473161-1.99752354731611
1272220.85615174359081.14384825640918
1282423.8890156795150.110984320484983
1292123.8799128354004-2.87991283540036
1302625.97981955624010.0201804437599116
1312419.64413963369534.35586036630469
1321619.7710716822945-3.7710716822945
1332321.65505798727361.34494201272639
1341820.5118425264845-2.51184252648450
1351622.542310427475-6.54231042747502
1362623.592077637972.40792236202999
1371918.79851573160190.201484268398138
1382117.35279138803413.64720861196585
1392122.1678896151079-1.16788961510788
1402219.86383086746142.13616913253862
1412320.77201448506422.22798551493581
1422925.27451198992443.72548801007562
1432118.31206666275722.68793333724275
1442119.44004760379681.55995239620315
1452321.24335562028281.75664437971718
1462722.74708846714034.25291153285969
1472525.5018999362049-0.501899936204929
1482120.63198134314480.368018656855221
1491016.9816341139897-6.9816341139897
1502023.2178751428864-3.21787514288639
1512622.57433088221113.42566911778890
1522424.7015834687921-0.70158346879213
1532932.3884529959283-3.38845299592827
1541919.2583682415068-0.258368241506761
1552421.02776284169212.97223715830786
1561920.1346277246302-1.13462772463022
1572422.86838792234671.13161207765330
1582221.60856643319550.391433566804472
1591724.0879970083019-7.08799700830192


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.7574300882464580.4851398235070840.242569911753542
210.7013053830979890.5973892338040210.298694616902011
220.5794902721491750.841019455701650.420509727850825
230.4531008279607620.9062016559215250.546899172039238
240.3982957635423170.7965915270846340.601704236457683
250.2959978424784350.5919956849568710.704002157521565
260.2264689383816270.4529378767632530.773531061618373
270.168755297497650.33751059499530.83124470250235
280.2150910061107440.4301820122214880.784908993889256
290.1532460743528700.3064921487057390.84675392564713
300.1207661965199010.2415323930398010.8792338034801
310.08903052579353830.1780610515870770.910969474206462
320.05983779762798250.1196755952559650.940162202372018
330.1627013652827410.3254027305654820.83729863471726
340.2581659208904520.5163318417809040.741834079109548
350.3336457064746220.6672914129492440.666354293525378
360.4736231563110110.9472463126220220.526376843688989
370.4526540392601120.9053080785202250.547345960739888
380.3936275624327040.7872551248654070.606372437567296
390.3413246855742940.6826493711485890.658675314425706
400.4787867111968210.9575734223936420.521213288803179
410.4413754495630540.8827508991261090.558624550436946
420.4108684845889350.8217369691778710.589131515411065
430.3824456350363760.7648912700727520.617554364963624
440.3845597739061910.7691195478123810.615440226093809
450.3463203121322220.6926406242644450.653679687867778
460.2922328980622710.5844657961245420.707767101937729
470.264305760740410.528611521480820.73569423925959
480.4060585920092680.8121171840185370.593941407990732
490.3509374389208780.7018748778417560.649062561079122
500.352636129441420.705272258882840.64736387055858
510.3739622701968300.7479245403936610.62603772980317
520.3252679318897510.6505358637795030.674732068110249
530.3749671052497090.7499342104994190.625032894750291
540.3441893637113470.6883787274226930.655810636288653
550.4833877155335120.9667754310670250.516612284466488
560.5153530306553730.9692939386892540.484646969344627
570.4795380634118260.9590761268236520.520461936588174
580.4370277654653340.8740555309306680.562972234534666
590.3909055448357250.781811089671450.609094455164275
600.3531606513568870.7063213027137740.646839348643113
610.3408912973749760.6817825947499530.659108702625024
620.3098174240426190.6196348480852370.690182575957381
630.2824459807317530.5648919614635060.717554019268247
640.3214881484663170.6429762969326340.678511851533683
650.2853686767661670.5707373535323350.714631323233833
660.2870604646005420.5741209292010830.712939535399458
670.3379427084615580.6758854169231160.662057291538442
680.3511919904626860.7023839809253720.648808009537314
690.3078100440938330.6156200881876670.692189955906167
700.2821887249833770.5643774499667530.717811275016623
710.3078265747552840.6156531495105680.692173425244716
720.2674579273454080.5349158546908150.732542072654592
730.2272600466885320.4545200933770640.772739953311468
740.1971697209484650.394339441896930.802830279051535
750.1962152003100230.3924304006200460.803784799689977
760.1760781796591330.3521563593182650.823921820340867
770.1673041077110890.3346082154221780.832695892288911
780.1383765940048670.2767531880097350.861623405995133
790.1131899543577910.2263799087155830.886810045642209
800.09397620604256750.1879524120851350.906023793957432
810.07689872512938950.1537974502587790.92310127487061
820.1733049593455070.3466099186910150.826695040654493
830.1449724824267240.2899449648534490.855027517573276
840.1227505366096810.2455010732193610.877249463390319
850.1131432300461730.2262864600923460.886856769953827
860.1080205290733480.2160410581466960.891979470926652
870.1344502569875850.2689005139751710.865549743012415
880.1338842993380400.2677685986760810.86611570066196
890.1221427532862980.2442855065725960.877857246713702
900.1370229236682430.2740458473364860.862977076331757
910.2223452615713780.4446905231427560.777654738428622
920.2036274023088310.4072548046176630.796372597691169
930.2014658339184490.4029316678368980.798534166081551
940.1670816621614340.3341633243228670.832918337838566
950.1447136155089550.289427231017910.855286384491045
960.1741804455825430.3483608911650870.825819554417456
970.1793810974998020.3587621949996030.820618902500198
980.1752431950005910.3504863900011830.824756804999409
990.1696890675974240.3393781351948470.830310932402576
1000.1535778743867150.307155748773430.846422125613285
1010.1282654944743780.2565309889487550.871734505525622
1020.1160203861417300.2320407722834610.88397961385827
1030.1108887810559620.2217775621119240.889111218944038
1040.09538621113314290.1907724222662860.904613788866857
1050.1194631579481820.2389263158963640.880536842051818
1060.1106643519592890.2213287039185790.88933564804071
1070.1011384619891340.2022769239782690.898861538010866
1080.07979277207941090.1595855441588220.92020722792059
1090.06600141085345340.1320028217069070.933998589146547
1100.066619869552960.133239739105920.93338013044704
1110.06640266595030520.1328053319006100.933597334049695
1120.1896617869815890.3793235739631770.810338213018411
1130.1841561109873790.3683122219747570.815843889012622
1140.7093004614532080.5813990770935830.290699538546792
1150.9207161156514040.1585677686971910.0792838843485956
1160.8967818292606080.2064363414787850.103218170739393
1170.9324522192198890.1350955615602230.0675477807801113
1180.9095329394413060.1809341211173890.0904670605586943
1190.925016586440590.149966827118820.07498341355941
1200.940928215299410.1181435694011820.0590717847005909
1210.9216450001336460.1567099997327080.0783549998663538
1220.8938294393380430.2123411213239140.106170560661957
1230.9731822850402070.05363542991958530.0268177149597927
1240.9589495228196240.08210095436075150.0410504771803757
1250.9420294024980170.1159411950039660.0579705975019832
1260.9192909553791920.1614180892416160.0807090446208081
1270.8911522439292280.2176955121415440.108847756070772
1280.8565617929794050.2868764140411890.143438207020595
1290.8331006495683950.3337987008632090.166899350431605
1300.7956597560507920.4086804878984160.204340243949208
1310.7368630073316230.5262739853367530.263136992668377
1320.6662995247124480.6674009505751030.333700475287552
1330.5986420254441780.8027159491116430.401357974555822
1340.5192004936736350.961599012652730.480799506326365
1350.450774785013380.901549570026760.54922521498662
1360.384688754745020.769377509490040.61531124525498
1370.4695366212710280.9390732425420560.530463378728972
1380.6579096205848220.6841807588303560.342090379415178
1390.5298678369355110.9402643261289780.470132163064489


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 level20.0166666666666667OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/10p76e1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/10p76e1292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/1io9k1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/1io9k1292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/2bx851292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/2bx851292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/3bx851292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/3bx851292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/4bx851292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/4bx851292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/536pq1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/536pq1292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/636pq1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/636pq1292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/7wy7t1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/7wy7t1292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/8wy7t1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/8wy7t1292163513.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/9p76e1292163513.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292163446p0symr40ams16d2/9p76e1292163513.ps (open in new window)


 
Parameters (Session):
par1 = 5 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 5 ; par2 = Include Monthly 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