Home » date » 2010 » Dec » 13 »

ws10 Multiple Regression

*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, 13 Dec 2010 08:40:38 +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/13/t1292229736mszftghlqfcz03i.htm/, Retrieved Mon, 13 Dec 2010 09:42:26 +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/13/t1292229736mszftghlqfcz03i.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 10 25 11 7 8 25 23 14 17 6 17 8 30 25 18 18 12 10 8 19 23 15 18 8 12 9 22 19 18 16 10 12 7 22 29 11 20 10 11 4 25 25 17 16 11 11 11 23 21 19 18 16 12 7 17 22 7 17 11 13 7 21 25 12 23 13 14 12 19 24 13 30 12 16 10 19 18 15 23 8 11 10 15 22 14 18 12 10 8 16 15 14 15 11 11 8 23 22 16 12 4 15 4 27 28 16 21 9 9 9 22 20 12 15 8 11 8 14 12 12 20 8 17 7 22 24 13 31 14 17 11 23 20 16 27 15 11 9 23 21 9 21 9 14 13 19 21 11 31 14 10 8 18 23 12 19 11 11 8 20 28 11 16 8 15 9 23 24 14 20 9 15 6 25 24 18 21 9 13 9 19 24 11 22 9 16 9 24 23 14 17 9 13 6 22 23 17 25 16 18 16 26 24 12 26 11 18 5 29 18 14 25 8 12 7 32 25 14 17 9 17 9 25 21 15 32 16 9 6 29 26 11 33 11 9 6 28 22 15 13 16 12 5 17 22 14 32 12 18 12 28 22 11 25 12 12 7 29 23 12 29 14 18 10 26 30 17 22 9 14 9 25 23 15 18 10 15 8 14 17 9 17 9 16 5 25 23 16 20 10 10 8 26 23 13 15 12 11 8 20 25 15 20 14 14 10 18 24 11 33 14 9 6 32 24 10 29 10 12 8 25 23 16 23 14 17 7 25 21 13 26 16 5 4 23 2 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 time12 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135
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
PS[t] = + 6.80689662687928 + 0.337375488932305CM[t] -0.374730059936112D[t] + 0.174440171909908PE[t] + 0.0466548470870721PC[t] + 0.420990395069853O[t] + 0.0111700079917458`H `[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.806896626879283.0737862.21450.0282830.014141
CM0.3373754889323050.0569425.924900
D-0.3747300599361120.115686-3.23920.0014720.000736
PE0.1744401719099080.1013771.72070.087340.04367
PC0.04665484708707210.1281820.3640.7163840.358192
O0.4209903950698530.0732885.744300
`H `0.01117000799174580.1257350.08880.9293280.464664


Multiple Linear Regression - Regression Statistics
Multiple R0.613973533520472
R-squared0.376963499863614
Adjusted R-squared0.352369953805598
F-TEST (value)15.3277408216924
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value1.07580611086178e-13
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.42600565680683
Sum Squared Residuals1784.10224359181


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.19383792993640.806162070063634
22522.55273236944672.44726763055333
33024.35844129887465.64155870112544
41920.3508644107059-1.35086441070588
52220.59486828505301.40513171494695
62223.2090613878984-1.20906138789839
72522.62721709812752.37278290187246
82319.56794744777583.43205255222421
91718.6438192086904-1.64381920869036
102121.6733554165168-0.673355416516813
111922.9460422505056-3.94604225050558
121923.4343690281779-4.43436902817787
131523.3722515581343-8.37225155813432
141616.9717712421553-0.97177124215531
152319.47808778867693.52191221132312
162724.12615541114322.87384458885678
172221.06291452330350.937085476696499
181416.3476939858197-2.34769398581970
192224.0976123636836-2.09761236368359
202324.0965302143664-1.09653021436639
212321.57514781219511.42485218780491
221922.5315551582794-3.53155515827944
231823.9537756229784-5.95377562297838
242023.2976820748665-3.29768207486649
252322.50370976630040.496290233699556
262523.38319715279931.61680284720068
271923.4334667832308-4.4334667832308
282423.90668241679820.0933175832017827
292221.5900299391210.409970060879012
302623.36981311655802.63018688344197
312922.56403323277756.43596676722253
323225.34444935185726.65555064814283
332521.56343436189863.43656563810136
342924.52574230317224.47425769682777
352825.09748654347272.90251345652734
361716.94182212579690.0581778742030896
372826.19059159234891.80940840765113
382922.98120830598956.01879169401047
392627.7706385200149-1.77063852001489
402523.56897208097011.43102791902985
411419.3795629717581-5.37956297175806
422522.05552559977192.94447440022810
432621.75273549245924.24726450754078
442020.3551589059586-0.355158905958583
451821.4435360136149-3.44353601361492
463224.75942711384537.2405728861547
472525.1715052606450-0.171505260645026
482521.59838728565433.40161271434573
492320.84609818164142.15390181835858
502122.2337553214121-1.23375532141214
512024.2400778356035-4.24007783560355
521516.4063035063195-1.40630350631953
533026.95141891835573.04858108164434
542425.5276209604837-1.52762096048366
552624.47149840241481.52850159758519
562421.70703976790542.29296023209459
572221.59527384806390.404726151936134
581415.4647300334008-1.46473003340083
592422.37519508262851.62480491737149
602422.94111219801701.05888780198303
612423.39961768357300.600382316426967
622420.10606925709863.89393074290137
631918.45813626575190.54186373424815
643127.01340286125653.98659713874353
652226.8534365895336-4.85343658953355
662721.44908977306965.55091022693044
671917.67725603835281.32274396164716
682522.41676641055622.58323358944378
692025.115944649428-5.11594464942802
702121.5913350604495-0.591335060449544
712727.7165573575398-0.716557357539801
722324.4732905256934-1.47329052569339
732525.783760449496-0.783760449496019
742022.3164415449032-2.31644154490324
752222.4948867833241-0.49488678332412
762323.1806722460821-0.18067224608207
772524.04134973850030.958650261499702
782523.55536350170321.44463649829677
791724.0589961434255-7.05899614342552
801921.4206409661957-2.42064096619569
812524.09664675701010.903353242989863
821922.4163783827431-3.41637838274309
832023.1586975168811-3.15869751688114
842622.59025703907713.40974296092294
852320.96312003852942.03687996147055
862724.59668899496572.40331100503427
871720.8979447261035-3.89794472610345
881723.4526693089768-6.45266930897682
891719.7140987636228-2.71409876362277
902221.96574646647320.0342535335268337
912123.7753115338017-2.77531153380174
923228.87697836724843.12302163275159
932124.8242218519478-3.82422185194781
942124.4050846865295-3.40508468652949
951821.2391647620643-3.23916476206433
961821.2445053897907-3.24450538979066
972322.91073173882360.0892682611763867
981920.6259781030955-1.62597810309549
992020.8661440442532-0.866144044253178
1002122.4278148330794-1.42781483307940
1012024.0931439799901-4.0931439799901
1021718.5960751594744-1.59607515947442
1031820.3004839077328-2.3004839077328
1041920.7480145734531-1.74801457345309
1052222.1332173240308-0.133217324030847
1061518.6776186614073-3.67761866140732
1071418.8035111382256-4.80351113822563
1081826.877790354651-8.87779035465098
1092421.54212428540552.45787571459450
1103523.606856687025711.3931433129743
1112919.33160955138979.66839044861028
1122121.9570400261406-0.957040026140592
1132018.43650753534621.56349246465378
1142223.2805387990828-1.28053879908277
1151316.6661117736317-3.66611177363171
1162623.29462454175772.70537545824226
1171716.73138524615650.268614753843453
1182520.05998986321734.94001013678267
1192020.8885685919793-0.888568591979345
1201918.12567501139040.874324988609638
1212122.6102566438842-1.61025664388422
1222221.09436920635850.905630793641527
1232422.83775680562611.16224319437393
1242123.0965412425226-2.09654124252263
1252625.67845758686790.321542413132151
1262420.61108949202943.3889105079706
1271620.3072031663297-4.30720316632972
1282322.44629592543190.553704074568088
1291820.7804640883523-2.78046408835229
1301622.4501613332031-6.4501613332031
1312624.05834925645631.94165074354365
1321918.95756380721410.042436192785862
1332116.69976581483244.3002341851676
1342122.3289347474948-1.32893474749477
1352218.51752770921193.48247229078815
1362319.73321127756983.26678872243020
1372924.95506044453914.04493955546088
1382119.09895262034431.90104737965575
1392119.91831597983121.08168402016885
1402321.92831616712741.07168383287259
1412723.05402541403073.94597458596934
1422525.4223704008277-0.422370400827713
1432121.0146197079921-0.0146197079921060
1441016.9635948368745-6.96359483687448
1452022.7162157947920-2.71621579479203
1462622.74405034414523.25594965585483
1472423.71567050279730.284329497202719
1482931.8824036716209-2.88240367162088
1491918.80928320193230.190716798067711
1502422.10388020983971.89611979016025
1511920.6921991090226-1.69219910902255
1522423.54824973115300.451750268847021
1532221.85898645716110.141013542838921
1541723.9180546657576-6.9180546657576
1552423.19383792993650.806162070063483
1562522.55273236944672.44726763055334
1573024.35844129887465.64155870112545
1581920.3508644107059-1.35086441070588
1592220.59486828505301.40513171494695


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.1520815625600960.3041631251201910.847918437439904
110.4523373569917050.904674713983410.547662643008295
120.3882135200768010.7764270401536030.611786479923199
130.727745224959590.544509550080820.27225477504041
140.6394251704595950.721149659080810.360574829540405
150.5469430984595270.9061138030809460.453056901540473
160.4502752858770950.900550571754190.549724714122905
170.4917278303228860.9834556606457710.508272169677114
180.4027364916038660.8054729832077320.597263508396134
190.3195112092665620.6390224185331240.680488790733438
200.263023630295070.526047260590140.73697636970493
210.3280720282252220.6561440564504440.671927971774778
220.2671821302687750.5343642605375490.732817869731225
230.3100980167628440.6201960335256880.689901983237156
240.2971193192902630.5942386385805250.702880680709737
250.2367449352460640.4734898704921290.763255064753936
260.1862335488547650.372467097709530.813766451145235
270.1639662969633110.3279325939266220.83603370303669
280.1331676773605510.2663353547211010.86683232263945
290.1075384253306020.2150768506612030.892461574669398
300.1093538981889910.2187077963779820.89064610181101
310.2627544055958240.5255088111916470.737245594404176
320.5436676334900310.9126647330199380.456332366509969
330.516866542906750.96626691418650.48313345709325
340.5618552107977450.876289578404510.438144789202255
350.5314685752111310.9370628495777370.468531424788869
360.5072834110677220.9854331778645560.492716588932278
370.4801472489134980.9602944978269960.519852751086502
380.5800558289234810.8398883421530380.419944171076519
390.6068669475952570.7862661048094870.393133052404743
400.5576659758779220.8846680482441560.442334024122078
410.5977367034949420.8045265930101170.402263296505058
420.5657127830346670.8685744339306660.434287216965333
430.5952435692315380.8095128615369250.404756430768462
440.5469104051729560.9061791896540890.453089594827044
450.5343081139973820.9313837720052360.465691886002618
460.6551200658295460.6897598683409080.344879934170454
470.623592289197040.752815421605920.37640771080296
480.6092127129334520.7815745741330960.390787287066548
490.5652424772533710.8695150454932580.434757522746629
500.5226650170796550.954669965840690.477334982920345
510.5829392174832580.8341215650334840.417060782516742
520.5452183394113990.9095633211772030.454781660588601
530.5954034378306610.8091931243386770.404596562169339
540.565562978222730.8688740435545410.434437021777271
550.5229850565357320.9540298869285360.477014943464268
560.4903150716545910.9806301433091830.509684928345409
570.4417263260627570.8834526521255150.558273673937243
580.4018857334396740.8037714668793480.598114266560326
590.3672981373420210.7345962746840410.63270186265798
600.3258957289277860.6517914578555710.674104271072214
610.2842621936652790.5685243873305580.71573780633472
620.2997245577710750.5994491155421510.700275442228925
630.2614289016302550.5228578032605110.738571098369745
640.265804401230060.531608802460120.73419559876994
650.3603213772244980.7206427544489970.639678622775502
660.4488957219230450.897791443846090.551104278076955
670.4110076969551010.8220153939102030.588992303044899
680.3898907357668690.7797814715337380.610109264233131
690.4719991918174780.9439983836349560.528000808182522
700.4263563017383420.8527126034766830.573643698261658
710.3874187028015060.7748374056030110.612581297198494
720.3573655328046490.7147310656092970.642634467195351
730.3248193248129480.6496386496258960.675180675187052
740.3046966652795690.6093933305591390.69530333472043
750.2657004963028750.531400992605750.734299503697125
760.2291151170378770.4582302340757550.770884882962123
770.2004360824020650.400872164804130.799563917597935
780.1755483686172130.3510967372344260.824451631382787
790.2876265276365210.5752530552730420.712373472363479
800.2659432735463810.5318865470927630.734056726453619
810.2318779334611320.4637558669222650.768122066538867
820.2305956328408840.4611912656817690.769404367159116
830.2292404372039210.4584808744078420.770759562796079
840.2307803444126590.4615606888253170.769219655587341
850.2099830136352300.4199660272704600.79001698636477
860.1951025684988520.3902051369977040.804897431501148
870.2022171593747130.4044343187494260.797782840625287
880.2997437417164080.5994874834328170.700256258283592
890.2797994671960040.5595989343920090.720200532803996
900.243337748633560.486675497267120.75666225136644
910.2309674559115620.4619349118231240.769032544088438
920.2256494702803270.4512989405606530.774350529719673
930.2327714863076090.4655429726152180.767228513692391
940.2290872135116710.4581744270233420.770912786488329
950.2198686140624280.4397372281248550.780131385937572
960.2127455076827690.4254910153655380.787254492317231
970.1795864399671640.3591728799343290.820413560032836
980.1541992921764110.3083985843528210.84580070782359
990.1278779357196180.2557558714392360.872122064280382
1000.1074065611647540.2148131223295070.892593438835246
1010.1195298315731430.2390596631462850.880470168426857
1020.09937959679379310.1987591935875860.900620403206207
1030.08812409182382030.1762481836476410.91187590817618
1040.0766956892481060.1533913784962120.923304310751894
1050.06079581389543480.1215916277908700.939204186104565
1060.06000192376392850.1200038475278570.939998076236072
1070.07582065502316980.1516413100463400.92417934497683
1080.2711280289565330.5422560579130660.728871971043467
1090.2506847711834850.501369542366970.749315228816515
1100.6978170757585720.6043658484828570.302182924241428
1110.9065478860233990.1869042279532020.093452113976601
1120.8832255745035020.2335488509929960.116774425496498
1130.859986546582640.2800269068347190.140013453417360
1140.8334168780704430.3331662438591130.166583121929557
1150.8575977352148850.2848045295702290.142402264785115
1160.8399596233865840.3200807532268320.160040376613416
1170.804196695946770.3916066081064590.195803304053229
1180.8469112020718080.3061775958563840.153088797928192
1190.8125251990218550.3749496019562910.187474800978145
1200.7761410836737040.4477178326525930.223858916326296
1210.7364946299086170.5270107401827660.263505370091383
1220.6885848297340650.622830340531870.311415170265935
1230.6396427441955990.7207145116088030.360357255804402
1240.5951796185301440.8096407629397130.404820381469856
1250.5374644087857640.9250711824284720.462535591214236
1260.5345498187563060.9309003624873890.465450181243694
1270.5708297550779690.8583404898440630.429170244922031
1280.5081152286853120.9837695426293750.491884771314688
1290.4681870173045230.9363740346090460.531812982695477
1300.644059237891450.7118815242170990.355940762108550
1310.6151487684366420.7697024631267160.384851231563358
1320.5528443785934970.8943112428130070.447155621406503
1330.563906793292170.872186413415660.43609320670783
1340.5210908314142620.9578183371714770.478909168585738
1350.5053706766942890.9892586466114230.494629323305711
1360.510680011728290.978639976543420.48931998827171
1370.5483404752532410.9033190494935190.451659524746759
1380.8037433221590.3925133556819990.196256677841000
1390.7405440289730540.5189119420538930.259455971026946
1400.6776863893827960.6446272212344080.322313610617204
1410.7202883367623360.5594233264753280.279711663237664
1420.720924584206980.558150831586040.27907541579302
1430.6309047411419850.7381905177160310.369095258858015
1440.7630770860737370.4738458278525260.236922913926263
1450.7488315768028370.5023368463943270.251168423197163
1460.6435136873014720.7129726253970570.356486312698528
1470.6397449928162210.7205100143675590.360255007183779
1480.5912196178871860.8175607642256270.408780382112814
1490.509717023091220.980565953817560.49028297690878


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level00OK
10% type I error level00OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/1079yp1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/1079yp1292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/10q1w1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/10q1w1292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/2th0y1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/2th0y1292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/3th0y1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/3th0y1292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/439i11292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/439i11292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/539i11292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/539i11292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/639i11292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/639i11292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/7w0zm1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/7w0zm1292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/8w0zm1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/8w0zm1292229625.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/979yp1292229625.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/13/t1292229736mszftghlqfcz03i/979yp1292229625.ps (open in new window)


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