Home » date » 2010 » Dec » 14 »

ws10 MP

*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 18:00:14 +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/t12923495139c3ctekecxrc6rp.htm/, Retrieved Tue, 14 Dec 2010 18:58:44 +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/t12923495139c3ctekecxrc6rp.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 time29 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
PC[t] = + 2.18714234745473 + 0.271235107786439G[t] + 0.0434255996311816CM[t] + 0.103582456740996DA[t] + 0.424577505469688PE[t] + 0.00930133630698559PS[t] -0.0953227133970643O[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.187142347454731.5575321.40420.1622890.081144
G0.2712351077864390.3549580.76410.4459730.222986
CM0.04342559963118160.0385831.12550.2621410.13107
DA0.1035824567409960.0698281.48340.1400410.070021
PE0.4245775054696880.0548737.737500
PS0.009301336306985590.0508740.18280.8551750.427587
O-0.09532271339706430.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.751709535158


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1127.637175431760374.36282456823963
285.966813115788072.03318688421193
389.20313234447133-1.20313234447133
486.713105765891521.28689423410848
597.828360920162561.17163907983744
676.995447500411550.00455249958845472
747.1537672559758-3.15376725597579
8117.446335495166353.55366450483365
978.3245457523644-1.32454575236441
1077.93902257953468-0.939022579534683
11128.636803529270113.36319647072989
121010.5295266690556-0.529526669055582
13106.998598810722253.00140118927775
1487.719018571933510.280981428066488
1587.307587182138110.692412817861892
1647.34457716499546-3.34457716499546
1796.421929838204532.57807016179547
1887.86635491912290.133645080877108
1979.2902509720016-2.29025097200160
201111.0512546060723-0.0512546060722585
2198.06711181028690.932888189713102
221111.7946711513035-0.794671151303512
23138.69282575102144.30717424897861
2487.746737246058320.253262753941680
2586.610214183573051.38978581642695
2698.547930006630920.452069993369076
2768.57258242672418-2.57258242672418
2897.982280105360511.01771989463949
2999.44126761633275-0.441267616332747
3067.66056932136737-1.66056932136737
3166.09702378997289-0.0970237899728896
321610.79782147478315.20217852521689
33511.1944101877991-6.19441018779909
3477.6534172002683-0.6534172002683
3599.5774287789612-0.577428778961205
3667.11786170510102-1.11786170510102
3767.01536453830849-1.01536453830849
3857.83618264642206-2.83618264642206
391211.16795405243190.832045947568065
4077.95925333731902-0.95925333731902
411010.1924226794435-0.192422679443459
4298.601413941700360.398586058299643
4389.15425797860542-1.15425797860542
4458.96220584669739-3.96220584669739
4586.929136513607221.07086348639278
4687.097297489766950.902702510233046
47108.872042958597011.12795704140299
4867.44390693475173-1.44390693475173
4988.15982058492025-0.159820584920248
50710.3558946604533-3.35589466045328
5145.56507060217383-1.56507060217383
5287.174793365824810.82520663417519
5386.974634831932931.02536516806707
5444.99061056248646-0.990610562486462
552013.06539985138306.93460014861699
5687.759053539560320.24094646043968
5787.48385187022070.516148129779295
5868.36672486389353-2.36672486389353
5944.21219780992602-0.212197809926016
6089.0158706740298-1.01587067402980
6197.063949061717521.93605093828248
6267.86113413585-1.86113413585000
6378.2959696097375-1.29596960973749
6496.189952287617442.81004771238256
6556.8543486686162-1.85434866861620
6656.1069844415282-1.10698444152820
6787.491702642912910.508297357087091
6887.984572628958790.0154273710412133
6966.50644750694419-0.506447506944187
7086.986114604930361.01388539506964
7177.68681099588277-0.686810995882772
7276.311044270230430.688955729769571
7399.10603077664227-0.106030776642275
741110.93536012104290.0646398789570511
7568.7378133111142-2.73781331111420
7688.04340573239236-0.0434057323923593
7768.07606755123295-2.07606755123295
7898.745508989974140.254491010025857
7986.221800430368251.77819956963175
8068.46864255311038-2.46864255311038
81108.085648358192141.91435164180786
8286.211617718110061.78838228188994
8388.48367290237763-0.483672902377627
84108.893577475452871.10642252454713
8556.17818792078822-1.17818792078822
8679.47247887155855-2.47247887155855
8757.03058179752459-2.03058179752459
8886.101920547642271.89807945235773
891410.13579530666083.86420469333915
9077.84179932494668-0.841799324946676
9189.12329522007711-1.12329522007712
9264.967381155105091.03261884489491
9356.35072703959093-1.35072703959094
9469.38763803518128-3.38763803518128
95106.778908427581553.22109157241845
961211.84701054736750.152989452632491
9799.4894707635459-0.489470763545893
981211.17147306952760.828526930472448
9977.47628309672623-0.476283096726228
10088.32536528462458-0.325365284624586
101109.345042257722380.65495774227762
10267.1047171210265-1.10471712102649
1031011.2582025820310-1.25820258203096
104108.5355888522871.46441114771299
105107.270576346710142.72942365328986
10658.39280641682401-3.39280641682401
10777.26292278968291-0.262922789682914
108108.69922621704121.30077378295880
109119.56568683985531.43431316014469
11068.15067528003433-2.15067528003433
11177.53682223155077-0.536822231550766
112129.447108026139862.55289197386014
113116.608185161863954.39181483813605
1141110.61655038465650.383449615343534
115115.215874088681825.78412591131818
11657.40893721529114-2.40893721529114
117810.2920267095665-2.29202670956647
11866.80334750173133-0.803347501731331
11999.55095380745055-0.55095380745055
12047.01587372138867-3.01587372138867
12146.24513956401685-2.24513956401685
12278.20486735051709-1.20486735051709
123119.50061707899361.49938292100640
12464.560080135454531.43991986454547
12576.81662568950360.183374310496400
12689.9582548271011-1.95825482710111
12746.10108043555788-2.10108043555788
12887.152725663012740.847274336987257
12998.208120514497490.791879485502509
13088.14193121445213-0.141931214452128
131118.580078472604562.41992152739544
13287.327403625218710.672596374781288
13356.80598261433022-1.80598261433022
13445.7780458978885-1.77804589788849
13587.457468653321490.542531346678513
1361011.8415352497112-1.84153524971125
13767.95181137376308-1.95181137376308
13898.95866808888520.0413319111148046
13997.299020417239071.70097958276093
140138.901266455980524.09873354401948
14197.911910135279521.08808986472048
142109.81667167306750.183328326932507
1432014.38270730051205.61729269948796
14456.07491248560233-1.07491248560233
1451110.05153561843890.94846438156112
14668.28001777911344-2.28001777911344
147910.6472677083783-1.64726770837831
14877.21835791320574-0.218357913205743
14998.034177314553310.965822685446687
150108.466057835829191.53394216417081
15197.138289362250991.86171063774901
152810.3315756979097-2.33157569790975
153711.6694649446282-4.66946494462819
15469.59415577122615-3.59415577122615
1551311.54585949262231.45414050737768
15668.09454584702697-2.09454584702698
15788.00152325707931-0.00152325707931311
158109.507739978610140.492260021389862
1591612.05176651265173.94823348734829


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.942504313047070.1149913739058600.0574956869529299
110.9197938034026530.1604123931946940.0802061965973471
120.8704687969571830.2590624060856340.129531203042817
130.8414122342253020.3171755315493960.158587765774698
140.7663374492903040.4673251014193920.233662550709696
150.6791016536247420.6417966927505150.320898346375258
160.7369231281638780.5261537436722440.263076871836122
170.6659717971968640.6680564056062720.334028202803136
180.5823308287953020.8353383424093970.417669171204698
190.5500381279184130.8999237441631740.449961872081587
200.4708667082823230.9417334165646460.529133291717677
210.4557088027810090.9114176055620190.54429119721899
220.3861662379655860.7723324759311720.613833762034414
230.6102685263278070.7794629473443860.389731473672193
240.6274037771574010.7451924456851970.372596222842598
250.5622914852624840.8754170294750320.437708514737516
260.5113450336307840.9773099327384320.488654966369216
270.5135077481905940.9729845036188120.486492251809406
280.4487093281956290.8974186563912580.551290671804371
290.3841079804693230.7682159609386460.615892019530677
300.3570044149837870.7140088299675740.642995585016213
310.3302280782132290.6604561564264590.669771921786771
320.6454615571619760.7090768856760470.354538442838024
330.8639880493819610.2720239012360780.136011950618039
340.8345040336322030.3309919327355940.165495966367797
350.7986762313831040.4026475372337920.201323768616896
360.8024401907689120.3951196184621760.197559809231088
370.7659400251015460.4681199497969090.234059974898454
380.8572475379506570.2855049240986860.142752462049343
390.8401365389840430.3197269220319130.159863461015957
400.8070191247363790.3859617505272420.192980875263621
410.7673519185723280.4652961628553440.232648081427672
420.7273861584436870.5452276831126260.272613841556313
430.6998444436429410.6003111127141170.300155556357059
440.758202530445950.483594939108100.24179746955405
450.7243806703914260.5512386592171480.275619329608574
460.6808471031059150.6383057937881690.319152896894085
470.6388369006740430.7223261986519150.361163099325957
480.6160304809193640.7679390381612710.383969519080636
490.5679661814480810.8640676371038380.432033818551919
500.5983117324706690.8033765350586620.401688267529331
510.624431210871910.751137578256180.37556878912809
520.5806322857570790.8387354284858430.419367714242921
530.5359672469650570.9280655060698860.464032753034943
540.5106864593692640.9786270812614720.489313540630736
550.9216434307228080.1567131385543850.0783565692771924
560.902811221379440.1943775572411190.0971887786205594
570.8811306760197490.2377386479605030.118869323980251
580.8834225356116730.2331549287766550.116577464388327
590.8582124345521630.2835751308956750.141787565447837
600.833507728739670.3329845425206610.166492271260330
610.8292156949141980.3415686101716050.170784305085802
620.8216971477274950.3566057045450100.178302852272505
630.8010596629845350.3978806740309310.198940337015465
640.8333216237334140.3333567525331720.166678376266586
650.8241194421146910.3517611157706190.175880557885309
660.8015070359719570.3969859280560860.198492964028043
670.7750481459455180.4499037081089640.224951854054482
680.7421354352180910.5157291295638180.257864564781909
690.7079610081769950.584077983646010.292038991823005
700.6755761393573160.6488477212853670.324423860642684
710.6470333360355660.7059333279288670.352966663964434
720.6063216068326190.7873567863347620.393678393167381
730.5617124539438310.8765750921123380.438287546056169
740.5156902490813340.9686195018373310.484309750918666
750.5479982606025470.9040034787949060.452001739397453
760.5020246285875450.995950742824910.497975371412455
770.5104242972386070.9791514055227860.489575702761393
780.4636808383180780.9273616766361550.536319161681922
790.4425370184666880.8850740369333770.557462981533312
800.4541877103962450.908375420792490.545812289603755
810.4391525357966280.8783050715932570.560847464203372
820.4266637640393370.8533275280786740.573336235960663
830.3842949619264990.7685899238529970.615705038073501
840.3515516830041310.7031033660082610.648448316995869
850.3256383895204970.6512767790409940.674361610479503
860.3433042335967030.6866084671934070.656695766403297
870.3397989561766090.6795979123532170.660201043823391
880.3230611865341240.6461223730682480.676938813465876
890.4215672713118460.8431345426236930.578432728688154
900.3826459180755440.7652918361510890.617354081924456
910.3524209636806220.7048419273612430.647579036319379
920.3174159917492810.6348319834985630.682584008250719
930.2922318330175990.5844636660351990.7077681669824
940.3536493857397540.7072987714795070.646350614260246
950.4075802642801460.8151605285602920.592419735719854
960.3619096023605020.7238192047210040.638090397639498
970.3214029145719440.6428058291438890.678597085428056
980.2878378531352080.5756757062704160.712162146864792
990.2491323936736050.4982647873472110.750867606326395
1000.2124672483741650.4249344967483310.787532751625835
1010.181937830719570.363875661439140.81806216928043
1020.1591045686879590.3182091373759170.840895431312041
1030.1429269162083010.2858538324166020.857073083791699
1040.1271645694056240.2543291388112480.872835430594376
1050.1532543354685110.3065086709370230.846745664531488
1060.1873169669691620.3746339339383240.812683033030838
1070.1554496118906520.3108992237813040.844550388109348
1080.1393283725313080.2786567450626160.860671627468692
1090.1255691870981320.2511383741962640.874430812901868
1100.1243544254790070.2487088509580140.875645574520993
1110.1022313798773360.2044627597546730.897768620122664
1120.1493241325055080.2986482650110170.850675867494492
1130.2906473958411720.5812947916823430.709352604158828
1140.2576579355025950.515315871005190.742342064497405
1150.539585953228560.920828093542880.46041404677144
1160.539442886570390.921114226859220.46055711342961
1170.5557697894126750.888460421174650.444230210587325
1180.5075471304732450.984905739053510.492452869526755
1190.4530328063525030.9060656127050060.546967193647497
1200.5283261577624090.9433476844751820.471673842237591
1210.5022469789975330.9955060420049340.497753021002467
1220.5201689841843230.9596620316313540.479831015815677
1230.4765072143688560.9530144287377130.523492785631144
1240.4822984361505750.964596872301150.517701563849425
1250.4247340463750150.849468092750030.575265953624985
1260.4235689589125160.8471379178250310.576431041087484
1270.3937313579147090.7874627158294170.606268642085291
1280.3650075356139970.7300150712279940.634992464386003
1290.3293671176190320.6587342352380630.670632882380968
1300.2971226376027090.5942452752054180.702877362397291
1310.3034029924929250.6068059849858490.696597007507075
1320.2532150347780490.5064300695560980.746784965221951
1330.2118958199573150.423791639914630.788104180042685
1340.1759259254977210.3518518509954420.824074074502279
1350.1446529599792440.2893059199584870.855347040020756
1360.1461060065519880.2922120131039760.853893993448012
1370.1583094413930980.3166188827861960.841690558606902
1380.1655878299989910.3311756599979810.83441217000101
1390.1791192390923960.3582384781847930.820880760907604
1400.2203684226067970.4407368452135950.779631577393203
1410.1714199977259840.3428399954519670.828580002274016
1420.1434975797915460.2869951595830920.856502420208454
1430.2028947082596730.4057894165193460.797105291740327
1440.1557022911664030.3114045823328070.844297708833597
1450.1098478891273250.2196957782546510.890152110872675
1460.07241771033218570.1448354206643710.927582289667814
1470.04330852216311970.08661704432623950.95669147783688
1480.02201907291029430.04403814582058850.977980927089706
1490.01003336201861150.02006672403722300.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/t12923495139c3ctekecxrc6rp/10ul6p1292349582.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/10ul6p1292349582.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/1o2rd1292349582.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/1o2rd1292349582.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/6938j1292349582.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/6938j1292349582.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/7938j1292349582.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923495139c3ctekecxrc6rp/7938j1292349582.ps (open in new window)


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


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