Home » date » 2010 » Nov » 22 »

Workshop 7 - Doubts About Actions

*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: Mon, 22 Nov 2010 18:43:58 +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/Nov/22/t1290451333vpxaf9q2dkrhty1.htm/, Retrieved Mon, 22 Nov 2010 19:42:16 +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/Nov/22/t1290451333vpxaf9q2dkrhty1.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'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
D[t] = + 7.47561072472881 + 0.248860445943252CM[t] -0.105949734415458PE[t] + 0.147529539189438PC[t] -0.192213547252973PS[t] + 0.109733980302452`O `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.475610724728811.5829114.72275e-063e-06
CM0.2488604459432520.0400376.215700
PE-0.1059497344154580.073943-1.43290.1539410.07697
PC0.1475295391894380.0928761.58850.1142460.057123
PS-0.1922135472529730.056762-3.38639e-040.00045
`O `0.1097339803024520.0566451.93720.054560.02728


Multiple Linear Regression - Regression Statistics
Multiple R0.489435601598432
R-squared0.239547208112019
Adjusted R-squared0.214695809684307
F-TEST (value)9.63918424183728
F-TEST (DF numerator)5
F-TEST (DF denominator)153
p-value5.12764863902504e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.48174999937267
Sum Squared Residuals942.339708086093


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11412.29312717286251.70687282713751
21111.8542529115495-0.85425291154948
368.06227222418893-2.06227222418893
41210.94766187021821.05233812978182
589.86771537760798-1.86771537760798
61010.1722752103671-0.172275210367121
7109.815501548018540.184498451981456
8119.798257711867741.20174228813226
91610.86292597640135.13707402359868
101110.06846354793810.931536452061921
111312.46801729933280.531982700667187
121213.0446779919111-1.04467799191107
13813.0401936526073-5.0401936526073
141210.64643066955751.35356933044252
15119.216542628658631.78345737134137
1647.34559388921211-3.34559388921211
17911.0418798989866-2.04187989898656
1889.84912475091086-1.84912475091086
19810.0892984205506-2.08929842055058
201412.78573201422131.21426798577868
211512.24066353886462.75933646113537
221613.81079071214162.18920928785844
23911.7886240057284-2.78862400572839
241414.3750612147334-0.375061214733427
251111.4470289360053-0.447028936005265
2689.40860163673439-1.40860163673439
2799.57702770843314-0.577027708433137
28911.6336575242935-2.63365752429345
29910.493867050423-1.49386705042302
3099.50925250089076-0.509252500890764
311011.7568378002112-1.75683780021115
321611.78656257954444.21343742045558
33119.177553570830231.82244642916977
34810.0509478301168-2.05094783011685
3598.731933578433420.268066421566578
361612.64966523783793.35033476216209
371112.6518033098243-1.65180330982433
38169.323564668306196.67643533169381
391212.3345724892786-0.334572489278586
401210.40812051127091.59187948872914
411412.55523100999551.44476899000448
42910.513552972001-1.51355297200096
431010.720577052591-0.720577052591046
4498.467233116696030.532766883303966
451010.0998879313339-0.0998879313338746
461210.12238521132491.8776147886751
471411.61859043037722.38140956962284
481412.10241708141731.89758291858266
491012.3199460232452-2.3199460232452
50149.930037175714064.06996282428594
511612.21905574437433.78094425562571
52910.4610692871838-1.46106928718377
531011.5899396475331-1.58993964753306
5469.04003585641423-3.04003585641423
55811.2797735574175-3.27977355741748
561312.42398211448310.576017885516871
571010.8246452755993-0.824645275599272
5888.9091416916669-0.909141691666907
5979.15425950080064-2.15425950080064
60159.82730075734655.1726992426535
6199.8928317189735-0.892831718973492
621010.2300011704603-0.230001170460277
631210.21279600455761.78720399544244
641310.45575712227612.54424287772388
65108.40823995068841.5917600493116
661111.8100631875226-0.810063187522585
67813.6099912716085-5.60999127160853
6899.12149677428637-0.121496774286372
69138.632326738954954.36767326104505
701110.40561970477630.594380295223705
71812.7748897940749-4.77488979407492
72910.7705154168815-1.77051541688151
73912.3432616515329-3.34326165153292
741512.51126332882672.48873667117329
75911.1799243643951-2.1799243643951
761011.5683831232456-1.56838312324565
77148.925492224975635.07450777502437
781210.95106714811911.04893285188092
791211.08607200896430.913927991035744
801111.5603427842052-0.56034278420516
811411.45482861275892.54517138724109
82611.555341171216-5.55534117121603
831211.26666002449910.733339975500888
84810.0611961307754-2.06119613077543
851412.40021087240691.59978912759315
861110.82853569541520.171464304584766
87109.909944005595810.0900559944041918
881410.19657995960673.80342004039329
891212.0383027999683-0.0383027999683422
901011.0020524420421-1.00205244204212
911413.00890757491080.991092425089236
9258.98335267342666-3.98335267342666
931110.49772918968480.50227081031523
941010.2124533208688-0.21245332086875
95911.4401404868287-2.44014048682871
961011.4379445722869-1.43794457228688
971613.7416191351072.25838086489298
981312.82375200191720.17624799808281
99910.8098388947891-1.80983889478915
1001011.378532076788-1.37853207678798
1011010.9689523566192-0.968952356619231
10279.47465402457373-2.47465402457373
10399.8265428213743-0.826542821374303
104810.2188112017114-2.21881120171137
1051412.84726377845961.1527362215404
1061411.64770189192352.3522981080765
107811.0805233342968-3.08052333429676
108911.5401625785906-2.54016257859058
1091411.80641633494812.19358366505185
1101410.74122910547213.25877089452787
11189.86606244753663-1.86606244753663
112813.6926336074711-5.69263360747113
113810.9525118828595-2.95251188285949
11478.55085509620331-1.55085509620331
11567.44027047059842-1.44027047059841
11689.4148100433135-1.4148100433135
11768.31398706901332-2.31398706901332
118119.878542611848731.12145738815127
1191411.84055919747662.15944080252337
1201111.1231055546712-0.123105554671165
1211111.9576290110093-0.95762901100931
122119.20908031081361.7909196891864
1231410.369676129173.63032387082998
124810.3570748050233-2.35707480502331
1252011.48036020640788.51963979359219
1261110.31930752669050.680692473309464
12789.14405571417421-1.14405571417421
1281110.70756723233170.29243276766828
1291010.6161673181472-0.616167318147201
1301413.44859195478560.551408045214407
1311110.5581054305360.441894569463998
132910.5952141906548-1.59521419065478
13399.71061082418663-0.710610824186625
134810.1579861032424-2.15798610324236
1351012.0589843809759-2.05898438097594
1361310.71887836091522.28112163908477
1371310.1115013821012.88849861789897
138129.295575308630782.70442469136922
139810.35973838043-2.35973838042996
1401311.01433939692891.98566060307108
1411412.43100648340811.56899351659187
1421211.66742817500660.332571824993393
1431410.91691389589673.08308610410329
1441511.29481067952253.7051893204775
1451310.51659551539372.4834044846063
1461611.85614356507834.14385643492171
147911.996511861034-2.99651186103404
148910.4782744530865-1.47827445308649
149911.0181531709424-2.01815317094243
150811.2929483065479-3.2929483065479
151710.0317337558054-3.0317337558054
1521611.94923416719554.05076583280446
1531113.3481625806087-2.34816258060873
154910.0171718546235-1.01717185462351
155119.833263436725081.16673656327492
15699.86642518204478-0.866425182044778
1571412.47898283927281.52101716072717
1581311.02203943823141.97796056176859
1591614.46476152485541.53523847514457


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
90.4760910550835970.9521821101671930.523908944916403
100.3201550270949720.6403100541899440.679844972905028
110.3248035770065440.6496071540130890.675196422993456
120.2332662135478380.4665324270956760.766733786452162
130.7935649342439490.4128701315121030.206435065756051
140.7182915930166480.5634168139667040.281708406983352
150.6411679409241770.7176641181516460.358832059075823
160.6876981015960450.6246037968079090.312301898403955
170.6671424506926950.665715098614610.332857549307305
180.6450498443546710.7099003112906570.354950155645329
190.576319759185510.8473604816289810.423680240814491
200.5750993130201880.8498013739596240.424900686979812
210.5854050607462210.8291898785075580.414594939253779
220.5551267227454320.8897465545091370.444873277254568
230.5580177092238270.8839645815523460.441982290776173
240.5100359875155980.9799280249688040.489964012484402
250.439543343723470.879086687446940.56045665627653
260.3772782191390640.7545564382781280.622721780860936
270.3140968973300810.6281937946601620.685903102669919
280.3066929128411290.6133858256822590.693307087158871
290.2602298920831540.5204597841663070.739770107916846
300.210038175247730.4200763504954590.78996182475227
310.1928814458251910.3857628916503820.807118554174809
320.2628840279305760.5257680558611520.737115972069424
330.2353967668760130.4707935337520270.764603233123986
340.2350070384630680.4700140769261350.764992961536932
350.1914058803216810.3828117606433620.808594119678319
360.2123026424518890.4246052849037780.787697357548111
370.209648116699030.419296233398060.79035188330097
380.6065409214176010.7869181571647970.393459078582399
390.5541357040779060.8917285918441880.445864295922094
400.5209909649787220.9580180700425560.479009035021278
410.4812581833942130.9625163667884260.518741816605787
420.4465859091935920.8931718183871840.553414090806408
430.3991132253500870.7982264507001730.600886774649913
440.3504186908920970.7008373817841940.649581309107903
450.301831574820830.6036631496416590.69816842517917
460.285300856623610.5706017132472190.71469914337639
470.2768806420432350.5537612840864690.723119357956765
480.2559988860107930.5119977720215860.744001113989207
490.2566997297984680.5133994595969370.743300270201532
500.3202450943021860.6404901886043720.679754905697814
510.3708248884582020.7416497769164040.629175111541798
520.3408376593679320.6816753187358640.659162340632068
530.3149336797837010.6298673595674030.685066320216299
540.331760994229210.663521988458420.66823900577079
550.3516627269695550.703325453939110.648337273030445
560.3078419809111970.6156839618223940.692158019088803
570.2702389864801310.5404779729602620.729761013519869
580.235665698972970.471331397945940.76433430102703
590.2232941948092930.4465883896185860.776705805190707
600.3579269921742760.7158539843485530.642073007825724
610.3174180963853770.6348361927707540.682581903614623
620.2763943664137770.5527887328275540.723605633586223
630.2565355137038460.5130710274076920.743464486296154
640.2678282665258510.5356565330517010.732171733474149
650.244010307289830.488020614579660.75598969271017
660.2123243296541280.4246486593082570.787675670345872
670.3900405194804410.7800810389608820.609959480519559
680.3452248333952020.6904496667904040.654775166604798
690.4348223328023870.8696446656047750.565177667197613
700.3914104293847130.7828208587694260.608589570615287
710.5189491596785210.9621016806429580.481050840321479
720.4964641348828480.9929282697656970.503535865117152
730.5316413619160290.9367172761679430.468358638083971
740.531792542649690.936414914700620.46820745735031
750.5199119996504830.9601760006990340.480088000349517
760.4924269756511770.9848539513023550.507573024348823
770.6444577932175830.7110844135648330.355542206782417
780.60844560710060.78310878579880.3915543928994
790.5690317708749190.8619364582501630.430968229125081
800.5262010242553730.9475979514892540.473798975744627
810.527674227423090.944651545153820.47232577257691
820.6994931577085780.6010136845828430.300506842291422
830.6612887997968870.6774224004062250.338711200203113
840.6442793134014950.7114413731970110.355720686598505
850.6158431184276750.768313763144650.384156881572325
860.571432471276690.857135057446620.42856752872331
870.5251999182376910.9496001635246180.474800081762309
880.5947034542766060.8105930914467880.405296545723394
890.5501320021921660.8997359956156690.449867997807834
900.5095759725822570.9808480548354870.490424027417743
910.4695217894787760.9390435789575520.530478210521224
920.5280562790193020.9438874419613970.471943720980698
930.48426725764520.9685345152903990.5157327423548
940.4372002147788650.874400429557730.562799785221135
950.4339313969345910.8678627938691820.566068603065409
960.404100875860120.808201751720240.59589912413988
970.3881945294911080.7763890589822150.611805470508892
980.3435949807408430.6871899614816860.656405019259157
990.3201680745847970.6403361491695950.679831925415203
1000.2903850907658410.5807701815316810.709614909234159
1010.2563523177064830.5127046354129670.743647682293517
1020.2485215058385210.4970430116770430.751478494161479
1030.2138548464631030.4277096929262060.786145153536897
1040.2040883099245410.4081766198490820.79591169007546
1050.1751053196910620.3502106393821240.824894680308938
1060.1705582360070890.3411164720141780.829441763992911
1070.1845784174631280.3691568349262560.815421582536872
1080.1892484344544850.378496868908970.810751565545515
1090.1767211157757240.3534422315514490.823278884224276
1100.2020290859471660.4040581718943310.797970914052834
1110.1813187487825350.3626374975650710.818681251217465
1120.4064985654256330.8129971308512660.593501434574367
1130.4654861537006630.9309723074013270.534513846299337
1140.4296490704198640.8592981408397270.570350929580136
1150.4221359960815160.8442719921630310.577864003918484
1160.3797399711744270.7594799423488550.620260028825573
1170.3654728599611790.7309457199223570.634527140038821
1180.3234207292343270.6468414584686540.676579270765673
1190.3023314100445040.6046628200890080.697668589955496
1200.2575413582707120.5150827165414250.742458641729288
1210.2292171408644740.4584342817289480.770782859135526
1220.2159628943072030.4319257886144070.784037105692797
1230.227881162521210.4557623250424210.77211883747879
1240.2414529895261940.4829059790523870.758547010473806
1250.7909565384385380.4180869231229250.209043461561462
1260.7545370211290960.4909259577418090.245462978870904
1270.707232254855740.585535490288520.29276774514426
1280.6506107075469160.6987785849061680.349389292453084
1290.5912115626811270.8175768746377460.408788437318873
1300.5297755104851690.9404489790296620.470224489514831
1310.4735939314960030.9471878629920050.526406068503997
1320.4183883637591670.8367767275183350.581611636240833
1330.3562589083787220.7125178167574430.643741091621278
1340.3167361894820380.6334723789640760.683263810517962
1350.2853675651239480.5707351302478950.714632434876052
1360.2626906262701640.5253812525403270.737309373729836
1370.2989576152246380.5979152304492750.701042384775362
1380.3079749035670510.6159498071341020.69202509643295
1390.3283313735041990.6566627470083970.671668626495801
1400.2653169781260990.5306339562521980.734683021873901
1410.2082087039308980.4164174078617960.791791296069102
1420.1580485502325650.316097100465130.841951449767435
1430.1844470314786920.3688940629573840.815552968521308
1440.1735916470909870.3471832941819750.826408352909013
1450.1562550312980210.3125100625960410.84374496870198
1460.2732007710779950.5464015421559910.726799228922005
1470.2397919065037310.4795838130074620.760208093496269
1480.1592210510123050.3184421020246110.840778948987695
1490.112589417860190.225178835720380.88741058213981
1500.160999460301460.3219989206029210.83900053969854


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/Nov/22/t1290451333vpxaf9q2dkrhty1/10hcj81290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/10hcj81290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/1atme1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/1atme1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/232mz1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/232mz1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/332mz1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/332mz1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/432mz1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/432mz1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/532mz1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/532mz1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/6vu321290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/6vu321290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/76lkn1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/76lkn1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/86lkn1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/86lkn1290451425.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/96lkn1290451425.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/22/t1290451333vpxaf9q2dkrhty1/96lkn1290451425.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; 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