Home » date » 2010 » Dec » 14 »

Ws 10 - 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: Tue, 14 Dec 2010 22:21: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/14/t1292365452uxmsdu44lkp2av4.htm/, Retrieved Tue, 14 Dec 2010 23:24:12 +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/14/t1292365452uxmsdu44lkp2av4.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 «
2 24 14 11 12 24 26 2 25 11 7 8 25 23 2 17 6 17 8 30 25 1 18 12 10 8 19 23 2 18 8 12 9 22 19 2 16 10 12 7 22 29 2 20 10 11 4 25 25 2 16 11 11 11 23 21 2 18 16 12 7 17 22 2 17 11 13 7 21 25 1 23 13 14 12 19 24 2 30 12 16 10 19 18 1 23 8 11 10 15 22 2 18 12 10 8 16 15 2 15 11 11 8 23 22 1 12 4 15 4 27 28 1 21 9 9 9 22 20 2 15 8 11 8 14 12 1 20 8 17 7 22 24 2 31 14 17 11 23 20 1 27 15 11 9 23 21 2 34 16 18 11 21 20 2 21 9 14 13 19 21 2 31 14 10 8 18 23 1 19 11 11 8 20 28 2 16 8 15 9 23 24 1 20 9 15 6 25 24 2 21 9 13 9 19 24 2 22 9 16 9 24 23 1 17 9 13 6 22 23 2 24 10 9 6 25 29 1 25 16 18 16 26 24 2 26 11 18 5 29 18 2 25 8 12 7 32 25 1 17 9 17 9 25 21 1 32 16 9 6 29 26 1 33 11 9 6 28 22 1 13 16 12 5 17 22 2 32 12 18 12 28 22 1 25 12 12 7 29 23 1 29 14 18 10 26 30 2 22 9 14 9 25 23 1 18 10 15 8 14 17 1 17 9 16 5 25 23 2 20 10 10 8 26 23 2 15 12 11 8 20 25 2 20 14 14 10 18 24 2 33 14 9 6 32 24 2 29 10 12 8 25 23 1 23 14 17 7 25 21 2 26 16 5 4 23 24 1 18 9 12 8 21 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 time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
PC[t] = + 2.18714234745475 + 0.271235107786437G[t] + 0.0434255996311821CM[t] + 0.103582456740995DA[t] + 0.424577505469688PE[t] + 0.00930133630698519PS[t] -0.0953227133970645O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)2.187142347454751.5575321.40420.1622890.081144
G0.2712351077864370.3549580.76410.4459730.222986
CM0.04342559963118210.0385831.12550.2621410.13107
DA0.1035824567409950.0698281.48340.1400410.070021
PE0.4245775054696880.0548737.737500
PS0.009301336306985190.0508740.18280.8551750.427587
O-0.09532271339706450.048963-1.94680.0533980.026699


Multiple Linear Regression - Regression Statistics
Multiple R0.629003287475925
R-squared0.395645135655521
Adjusted R-squared0.371789022589291
F-TEST (value)16.5846437161464
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value1.16573417585641e-14
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.14560706281333
Sum Squared Residuals699.751709535157


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1127.637175431760454.36282456823955
285.966813115788082.03318688421192
389.20313234447132-1.20313234447132
486.713105765891521.28689423410849
597.828360920162561.17163907983744
676.995447500411540.00455249958845706
747.1537672559758-3.15376725597579
8117.446335495166353.55366450483365
978.3245457523644-1.32454575236440
1077.93902257953468-0.93902257953468
11128.63680352927013.36319647072989
121010.5295266690556-0.529526669055586
13106.998598810722263.00140118927774
1487.719018571933510.280981428066488
1587.30758718213810.692412817861896
1647.34457716499546-3.34457716499546
1796.421929838204542.57807016179546
1887.86635491912290.133645080877104
1979.2902509720016-2.29025097200160
201111.0512546060723-0.0512546060722577
2198.06711181028690.932888189713104
221111.7946711513035-0.794671151303512
23138.69282575102144.30717424897861
2487.746737246058320.253262753941677
2586.610214183573051.38978581642695
2698.547930006630920.452069993369077
2768.57258242672418-2.57258242672418
2897.982280105360511.01771989463949
2999.44126761633275-0.441267616332748
3067.66056932136737-1.66056932136737
3166.09702378997289-0.0970237899728906
321610.79782147478315.2021785252169
33511.1944101877991-6.19441018779909
3477.6534172002683-0.6534172002683
3599.5774287789612-0.577428778961202
3667.11786170510101-1.11786170510101
3767.0153645383085-1.01536453830849
3857.83618264642205-2.83618264642205
391211.16795405243190.832045947568065
4077.95925333731902-0.959253337319017
411010.1924226794435-0.192422679443455
4298.601413941700360.398586058299643
4389.15425797860542-1.15425797860542
4458.96220584669739-3.96220584669739
4586.929136513607221.07086348639278
4687.097297489766950.90270251023305
47108.8720429585971.12795704140299
4867.44390693475173-1.44390693475173
4988.15982058492025-0.159820584920251
50710.3558946604533-3.35589466045327
5145.56507060217383-1.56507060217383
5287.174793365824810.825206634175189
5386.974634831932931.02536516806707
5444.99061056248646-0.990610562486465
552013.06539985138306.93460014861699
5687.759053539560320.240946460439682
5787.48385187022070.516148129779296
5868.36672486389353-2.36672486389353
5944.21219780992602-0.212197809926016
6089.0158706740298-1.01587067402980
6197.063949061717521.93605093828248
6267.86113413585-1.86113413585000
6378.29596960973749-1.29596960973749
6496.189952287617432.81004771238257
6556.85434866861619-1.85434866861619
6656.1069844415282-1.10698444152821
6787.491702642912920.508297357087083
6887.984572628958790.0154273710412143
6966.50644750694418-0.506447506944179
7086.986114604930351.01388539506965
7177.68681099588278-0.686810995882781
7276.311044270230430.688955729769569
7399.10603077664228-0.106030776642279
741110.93536012104290.0646398789570543
7568.7378133111142-2.73781331111421
7688.04340573239236-0.0434057323923618
7768.07606755123294-2.07606755123294
7898.745508989974140.254491010025860
7986.221800430368251.77819956963175
8068.46864255311038-2.46864255311038
81108.085648358192131.91435164180787
8286.211617718110071.78838228188993
8388.48367290237763-0.483672902377626
84108.893577475452871.10642252454713
8556.17818792078822-1.17818792078822
8679.47247887155855-2.47247887155855
8757.03058179752459-2.03058179752459
8886.101920547642261.89807945235774
891410.13579530666083.86420469333916
9077.84179932494668-0.841799324946678
9189.12329522007711-1.12329522007711
9264.967381155105091.03261884489491
9356.35072703959093-1.35072703959093
9469.38763803518128-3.38763803518128
95106.778908427581553.22109157241845
961211.84701054736750.152989452632491
9799.4894707635459-0.489470763545892
981211.17147306952760.828526930472448
9977.47628309672623-0.476283096726231
10088.32536528462459-0.325365284624589
101109.345042257722380.65495774227762
10267.1047171210265-1.10471712102650
1031011.2582025820310-1.25820258203096
104108.5355888522871.46441114771299
105107.270576346710142.72942365328986
10658.39280641682401-3.39280641682401
10777.26292278968292-0.262922789682919
108108.69922621704121.3007737829588
109119.56568683985531.43431316014470
11068.15067528003432-2.15067528003432
11177.53682223155077-0.536822231550769
112129.447108026139872.55289197386013
113116.608185161863954.39181483813605
1141110.61655038465650.383449615343534
115115.215874088681825.78412591131818
11657.40893721529114-2.40893721529114
117810.2920267095665-2.29202670956647
11866.80334750173133-0.80334750173133
11999.55095380745055-0.550953807450546
12047.01587372138868-3.01587372138868
12146.24513956401686-2.24513956401686
12278.20486735051709-1.20486735051709
123119.500617078993591.49938292100641
12464.560080135454531.43991986454547
12576.816625689503590.18337431049641
12689.9582548271011-1.95825482710111
12746.10108043555788-2.10108043555788
12887.152725663012740.847274336987259
12998.208120514497490.79187948550251
13088.14193121445213-0.141931214452128
131118.580078472604562.41992152739544
13287.327403625218710.672596374781286
13356.80598261433022-1.80598261433022
13445.7780458978885-1.77804589788850
13587.457468653321490.542531346678509
1361011.8415352497112-1.84153524971124
13767.95181137376308-1.95181137376308
13898.95866808888520.0413319111148067
13997.299020417239071.70097958276093
140138.901266455980524.09873354401948
14197.911910135279521.08808986472048
142109.81667167306750.183328326932508
1432014.38270730051205.61729269948797
14456.07491248560233-1.07491248560233
1451110.05153561843890.948464381561124
14668.28001777911344-2.28001777911344
147910.6472677083783-1.64726770837832
14877.21835791320574-0.218357913205745
14998.034177314553320.965822685446681
150108.46605783582921.53394216417081
15197.138289362250991.86171063774901
152810.3315756979097-2.33157569790974
153711.6694649446282-4.66946494462819
15469.59415577122616-3.59415577122616
1551311.54585949262231.45414050737768
15668.09454584702698-2.09454584702698
15788.00152325707931-0.00152325707931182
158109.507739978610130.492260021389866
1591612.05176651265173.94823348734829


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.942504313047070.1149913739058590.0574956869529295
110.9197938034026530.1604123931946950.0802061965973474
120.8704687969571820.2590624060856350.129531203042818
130.8414122342253020.3171755315493960.158587765774698
140.7663374492903040.4673251014193930.233662550709696
150.6791016536247420.6417966927505170.320898346375258
160.7369231281638780.5261537436722430.263076871836122
170.6659717971968650.668056405606270.334028202803135
180.5823308287953020.8353383424093960.417669171204698
190.5500381279184130.8999237441631730.449961872081587
200.470866708282320.941733416564640.52913329171768
210.4557088027810060.9114176055620120.544291197218994
220.3861662379655860.7723324759311720.613833762034414
230.6102685263278070.7794629473443870.389731473672193
240.6274037771574030.7451924456851940.372596222842597
250.5622914852624850.875417029475030.437708514737515
260.5113450336307850.9773099327384310.488654966369216
270.5135077481905950.972984503618810.486492251809405
280.4487093281956280.8974186563912560.551290671804372
290.3841079804693220.7682159609386450.615892019530678
300.3570044149837880.7140088299675770.642995585016212
310.3302280782132310.6604561564264620.669771921786769
320.6454615571619760.7090768856760490.354538442838024
330.8639880493819610.2720239012360780.136011950618039
340.8345040336322020.3309919327355950.165495966367798
350.7986762313831030.4026475372337940.201323768616897
360.8024401907689120.3951196184621760.197559809231088
370.7659400251015450.4681199497969100.234059974898455
380.8572475379506560.2855049240986880.142752462049344
390.8401365389840430.3197269220319150.159863461015957
400.8070191247363790.3859617505272420.192980875263621
410.7673519185723270.4652961628553460.232648081427673
420.7273861584436870.5452276831126260.272613841556313
430.699844443642940.600311112714120.30015555635706
440.7582025304459510.4835949391080980.241797469554049
450.7243806703914280.5512386592171450.275619329608572
460.6808471031059170.6383057937881660.319152896894083
470.6388369006740420.7223261986519160.361163099325958
480.6160304809193630.7679390381612750.383969519080637
490.5679661814480810.8640676371038380.432033818551919
500.5983117324706710.8033765350586590.401688267529329
510.6244312108719070.7511375782561850.375568789128093
520.5806322857570790.8387354284858430.419367714242921
530.5359672469650580.9280655060698840.464032753034942
540.5106864593692640.9786270812614710.489313540630736
550.9216434307228070.1567131385543860.0783565692771929
560.902811221379440.1943775572411200.0971887786205599
570.881130676019750.2377386479605010.118869323980251
580.8834225356116720.2331549287766550.116577464388327
590.8582124345521630.2835751308956730.141787565447837
600.8335077287396690.3329845425206630.166492271260331
610.8292156949141950.341568610171610.170784305085805
620.8216971477274930.3566057045450140.178302852272507
630.8010596629845350.397880674030930.198940337015465
640.8333216237334130.3333567525331730.166678376266587
650.8241194421146910.3517611157706180.175880557885309
660.8015070359719560.3969859280560890.198492964028044
670.7750481459455180.4499037081089640.224951854054482
680.742135435218090.515729129563820.25786456478191
690.7079610081769960.5840779836460080.292038991823004
700.6755761393573150.648847721285370.324423860642685
710.6470333360355690.7059333279288630.352966663964431
720.6063216068326180.7873567863347630.393678393167382
730.5617124539438290.8765750921123420.438287546056171
740.5156902490813360.9686195018373290.484309750918664
750.5479982606025490.9040034787949020.452001739397451
760.5020246285875430.9959507428249130.497975371412457
770.5104242972386020.9791514055227970.489575702761398
780.4636808383180770.9273616766361540.536319161681923
790.4425370184666890.8850740369333780.557462981533311
800.4541877103962430.9083754207924860.545812289603757
810.4391525357966310.8783050715932630.560847464203369
820.4266637640393380.8533275280786770.573336235960662
830.3842949619264960.7685899238529920.615705038073504
840.3515516830041330.7031033660082670.648448316995867
850.3256383895204980.6512767790409960.674361610479502
860.3433042335967020.6866084671934050.656695766403298
870.3397989561766060.6795979123532120.660201043823394
880.3230611865341210.6461223730682410.67693881346588
890.421567271311850.84313454262370.57843272868815
900.3826459180755450.765291836151090.617354081924455
910.3524209636806250.7048419273612510.647579036319375
920.3174159917492830.6348319834985660.682584008250717
930.2922318330176040.5844636660352090.707768166982396
940.3536493857397530.7072987714795060.646350614260247
950.4075802642801460.8151605285602930.592419735719854
960.3619096023605080.7238192047210160.638090397639492
970.3214029145719420.6428058291438840.678597085428058
980.2878378531352050.575675706270410.712162146864795
990.2491323936736070.4982647873472140.750867606326393
1000.2124672483741690.4249344967483380.787532751625831
1010.1819378307195700.3638756614391410.81806216928043
1020.1591045686879570.3182091373759140.840895431312043
1030.1429269162083030.2858538324166050.857073083791697
1040.1271645694056270.2543291388112540.872835430594373
1050.1532543354685140.3065086709370280.846745664531486
1060.1873169669691620.3746339339383250.812683033030838
1070.1554496118906540.3108992237813090.844550388109346
1080.1393283725313090.2786567450626180.860671627468691
1090.1255691870981320.2511383741962630.874430812901869
1100.1243544254790070.2487088509580150.875645574520993
1110.1022313798773370.2044627597546740.897768620122663
1120.1493241325055080.2986482650110160.850675867494492
1130.2906473958411720.5812947916823440.709352604158828
1140.2576579355025970.5153158710051940.742342064497403
1150.5395859532285610.9208280935428780.460414046771439
1160.5394428865703890.9211142268592210.460557113429611
1170.5557697894126740.8884604211746520.444230210587326
1180.5075471304732430.9849057390535140.492452869526757
1190.4530328063525040.9060656127050080.546967193647496
1200.528326157762410.943347684475180.47167384223759
1210.5022469789975320.9955060420049370.497753021002468
1220.5201689841843230.9596620316313540.479831015815677
1230.4765072143688580.9530144287377160.523492785631142
1240.4822984361505730.9645968723011450.517701563849427
1250.4247340463750150.849468092750030.575265953624985
1260.4235689589125160.8471379178250330.576431041087484
1270.3937313579147120.7874627158294240.606268642085288
1280.3650075356139970.7300150712279950.634992464386003
1290.3293671176190330.6587342352380670.670632882380967
1300.2971226376027070.5942452752054150.702877362397293
1310.3034029924929240.6068059849858480.696597007507076
1320.2532150347780460.5064300695560930.746784965221954
1330.2118958199573150.423791639914630.788104180042685
1340.1759259254977210.3518518509954420.824074074502279
1350.1446529599792430.2893059199584860.855347040020757
1360.1461060065519880.2922120131039750.853893993448013
1370.1583094413930980.3166188827861960.841690558606902
1380.1655878299989900.3311756599979810.83441217000101
1390.1791192390923960.3582384781847930.820880760907604
1400.2203684226067970.4407368452135950.779631577393203
1410.1714199977259830.3428399954519660.828580002274017
1420.1434975797915470.2869951595830940.856502420208453
1430.2028947082596730.4057894165193450.797105291740327
1440.1557022911664030.3114045823328070.844297708833597
1450.1098478891273260.2196957782546510.890152110872674
1460.07241771033218610.1448354206643720.927582289667814
1470.043308522163120.086617044326240.95669147783688
1480.02201907291029430.04403814582058870.977980927089706
1490.01003336201861140.02006672403722280.989966637981389


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0142857142857143OK
10% type I error level30.0214285714285714OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/10pu1q1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/10pu1q1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/11b4e1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/11b4e1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/2u24z1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/2u24z1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/3u24z1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/3u24z1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/4u24z1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/4u24z1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/5mblk1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/5mblk1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/6mblk1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/6mblk1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/7x32n1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/7x32n1292365286.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/8x32n1292365286.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292365452uxmsdu44lkp2av4/8x32n1292365286.ps (open in new window)


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