Home » date » 2010 » Dec » 27 »

Multiple Regression - NWWZ

*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, 27 Dec 2010 14:46:53 +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/27/t1293461163n6mtrcko4y55n8g.htm/, Retrieved Mon, 27 Dec 2010 15:46:15 +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/27/t1293461163n6mtrcko4y55n8g.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 «
206010 198112 194519 185705 180173 176142 203401 221902 197378 185001 176356 180449 180144 173666 165688 161570 156145 153730 182698 200765 176512 166618 158644 159585 163095 159044 155511 153745 150569 150605 179612 194690 189917 184128 175335 179566 181140 177876 175041 169292 166070 166972 206348 215706 202108 195411 193111 195198 198770 194163 190420 189733 186029 191531 232571 243477 227247 217859 208679 213188 216234 213586 209465 204045 200237 203666 241476 260307 243324 244460 233575 237217 235243 230354 227184 221678 217142 219452 256446 265845 248624 241114 229245 231805 219277 219313 212610 214771 211142 211457 240048 240636 230580 208795 197922 194596 194581 185686 178106 172608 167302 168053 202300 202388 182516 173476 166444 171297 169701 164182 161914 159612 151001 158114 186530 187069 174330 169362 166827 178037 186413 189226 191563 188906 186005 195309 223532 226899 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 time8 seconds
R Server'George Udny Yule' @ 72.249.76.132
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
NWWZ [t] = + 186373.429232739 + 147.663133228274t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)186373.4292327394318.35128443.158500
t147.66313322827452.0321052.83790.0052110.002606


Multiple Linear Regression - Regression Statistics
Multiple R0.232449780503641
R-squared0.0540329004561911
Adjusted R-squared0.0473239139346038
F-TEST (value)8.05380965997339
F-TEST (DF numerator)1
F-TEST (DF denominator)141
p-value0.00521133953200614
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation25684.6831505770
Sum Squared Residuals93018115744.9204


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1206010186521.09236596719488.9076340333
2198112186668.75549919611443.2445008044
3194519186816.4186324247702.58136757607
4185705186964.081765652-1259.08176565221
5180173187111.744898880-6938.74489888048
6176142187259.408032109-11117.4080321088
7203401187407.07116533715993.9288346630
8221902187554.73429856534347.2657014347
9197378187702.3974317949675.60256820642
10185001187850.060565022-2849.06056502185
11176356187997.72369825-11641.7236982501
12180449188145.386831478-7696.3868314784
13180144188293.049964707-8149.04996470667
14173666188440.713097935-14774.7130979349
15165688188588.376231163-22900.3762311632
16161570188736.039364392-27166.0393643915
17156145188883.70249762-32738.7024976198
18153730189031.365630848-35301.3656308480
19182698189179.028764076-6481.02876407631
20200765189326.69189730511438.3081026954
21176512189474.355030533-12962.3550305329
22166618189622.018163761-23004.0181637611
23158644189769.681296989-31125.6812969894
24159585189917.344430218-30332.3444302177
25163095190065.007563446-26970.0075634460
26159044190212.670696674-31168.6706966742
27155511190360.333829903-34849.3338299025
28153745190507.996963131-36762.9969631308
29150569190655.660096359-40086.6600963591
30150605190803.323229587-40198.3232295873
31179612190950.986362816-11338.9863628156
32194690191098.6494960443591.35050395612
33189917191246.312629272-1329.31262927215
34184128191393.975762500-7265.97576250042
35175335191541.638895729-16206.6388957287
36179566191689.302028957-12123.3020289570
37181140191836.965162185-10696.9651621852
38177876191984.628295414-14108.6282954135
39175041192132.291428642-17091.2914286418
40169292192279.95456187-22987.9545618701
41166070192427.617695098-26357.6176950983
42166972192575.280828327-25603.2808283266
43206348192722.94396155513625.0560384451
44215706192870.60709478322835.3929052168
45202108193018.2702280119089.72977198856
46195411193165.9333612402245.06663876029
47193111193313.596494468-202.596494467984
48195198193461.2596276961736.74037230374
49198770193608.9227609255161.07723907547
50194163193756.585894153406.414105847194
51190420193904.249027381-3484.24902738108
52189733194051.912160609-4318.91216060935
53186029194199.575293838-8170.57529383763
54191531194347.238427066-2816.2384270659
55232571194494.90156029438076.0984397058
56243477194642.56469352248834.4353064775
57227247194790.22782675132456.7721732493
58217859194937.89095997922921.109040021
59208679195085.55409320713593.4459067927
60213188195233.21722643617954.7827735645
61216234195380.88035966420853.1196403362
62213586195528.54349289218057.4565071079
63209465195676.20662612013788.7933738796
64204045195823.8697593498221.13024065136
65200237195971.5328925774265.46710742309
66203666196119.1960258057546.80397419481
67241476196266.85915903345209.1408409665
68260307196414.52229226263892.4777077383
69243324196562.1854254946761.81457451
70244460196709.84855871847750.1514412817
71233575196857.51169194736717.4883080534
72237217197005.17482517540211.8251748252
73235243197152.83795840338090.1620415969
74230354197300.50109163133053.4989083686
75227184197448.16422486029735.8357751403
76221678197595.82735808824082.1726419121
77217142197743.49049131619398.5095086838
78219452197891.15362454421560.8463754555
79256446198038.81675777358407.1832422272
80265845198186.47989100167658.520108999
81248624198334.14302422950289.8569757707
82241114198481.80615745842632.1938425424
83229245198629.46929068630615.5307093142
84231805198777.13242391433027.8675760859
85219277198924.79555714220352.2044428576
86219313199072.45869037120240.5413096293
87212610199220.12182359913389.8781764011
88214771199367.78495682715403.2150431728
89211142199515.44809005511626.5519099445
90211457199663.11122328411793.8887767162
91240048199810.77435651240237.225643488
92240636199958.43748974040677.5625102597
93230580200106.10062296930473.8993770314
94208795200253.7637561978541.23624380314
95197922200401.426889425-2479.42688942513
96194596200549.090022653-5953.0900226534
97194581200696.753155882-6115.75315588168
98185686200844.41628911-15158.4162891100
99178106200992.079422338-22886.0794223382
100172608201139.742555567-28531.7425555665
101167302201287.405688795-33985.4056887948
102168053201435.068822023-33382.0688220231
103202300201582.731955251717.26804474868
104202388201730.395088480657.604911520405
105182516201878.058221708-19362.0582217079
106173476202025.721354936-28549.7213549361
107166444202173.384488164-35729.3844881644
108171297202321.047621393-31024.0476213927
109169701202468.710754621-32767.710754621
110164182202616.373887849-38434.3738878492
111161914202764.037021078-40850.0370210775
112159612202911.700154306-43299.7001543058
113151001203059.363287534-52058.3632875341
114158114203207.026420762-45093.0264207623
115186530203354.689553991-16824.6895539906
116187069203502.352687219-16433.3526872189
117174330203650.015820447-29320.0158204472
118169362203797.678953675-34435.6789536754
119166827203945.342086904-37118.3420869037
120178037204093.005220132-26056.005220132
121186413204240.668353360-17827.6683533603
122189226204388.331486589-15162.3314865885
123191563204535.994619817-12972.9946198168
124188906204683.657753045-15777.6577530451
125186005204831.320886273-18826.3208862733
126195309204978.984019502-9669.98401950162
127223532205126.6471527318405.3528472701
128226899205274.31028595821624.6897140418
129214126205421.9734191868704.02658081356
130206903205569.6365524151333.36344758528
131204442205717.299685643-1275.29968564299
132220375205864.96281887114510.0371811287
133214320206012.6259521008307.37404790046
134212588206160.2890853286427.71091467219
135205816206307.952218556-491.952218556083
136202196206455.615351784-4259.61535178436
137195722206603.278485013-10881.2784850126
138198563206750.941618241-8187.9416182409
139229139206898.60475146922240.3952485308
140229527207046.26788469722480.7321153025
141211868207193.9310179264674.06898207427
142203555207341.594151154-3786.594151154
143195770207489.257284382-11719.2572843823


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.0001568251041764650.0003136502083529310.999843174895824
61.58451001642136e-053.16902003284273e-050.999984154899836
70.03324345889805040.06648691779610070.96675654110195
80.10819947248140.21639894496280.8918005275186
90.05758968740577420.1151793748115480.942410312594226
100.03740187375551020.07480374751102030.96259812624449
110.0283394087015170.0566788174030340.971660591298483
120.0152149699400760.0304299398801520.984785030059924
130.007528350028765130.01505670005753030.992471649971235
140.003960627092174560.007921254184349120.996039372907825
150.002468530385395250.004937060770790490.997531469614605
160.001515234580850450.003030469161700910.99848476541915
170.0009893925209200720.001978785041840140.99901060747908
180.0005914722013568690.001182944402713740.999408527798643
190.0008079105302947420.001615821060589480.999192089469705
200.004087647838987850.00817529567797570.995912352161012
210.002489409561292750.00497881912258550.997510590438707
220.001381225968413540.002762451936827080.998618774031586
230.0008513065164115840.001702613032823170.999148693483588
240.0004945387685300130.0009890775370600250.99950546123147
250.000277800653838730.000555601307677460.99972219934616
260.0001600444828336180.0003200889656672360.999839955517166
279.74894948378204e-050.0001949789896756410.999902510505162
286.19737939443299e-050.0001239475878886600.999938026206056
294.32402884095745e-058.6480576819149e-050.99995675971159
303.11349484509474e-056.22698969018948e-050.99996886505155
318.97113314477987e-050.0001794226628955970.999910288668552
320.0007095087124418440.001419017424883690.999290491287558
330.001600677831454240.003201355662908480.998399322168546
340.001984135925594820.003968271851189640.998015864074405
350.001725256081032210.003450512162064410.998274743918968
360.001645351783398090.003290703566796190.998354648216602
370.001593311840880860.003186623681761710.998406688159119
380.001403666071674280.002807332143348560.998596333928326
390.001198170562333400.002396341124666810.998801829437667
400.001044872081432640.002089744162865290.998955127918567
410.0009929759764231080.001985951952846220.999007024023577
420.0009931977030394550.001986395406078910.99900680229696
430.00348305600272570.00696611200545140.996516943997274
440.01273417447222120.02546834894444240.987265825527779
450.01652913266351650.0330582653270330.983470867336484
460.01681475527772370.03362951055544740.983185244722276
470.01608722877998840.03217445755997680.983912771220012
480.01548944182987130.03097888365974260.98451055817013
490.01528132993680630.03056265987361260.984718670063194
500.01405035105607740.02810070211215480.985949648943923
510.01281052913045030.02562105826090070.98718947086955
520.01185594529027640.02371189058055270.988144054709724
530.0115612225531730.0231224451063460.988438777446827
540.01110050550970510.02220101101941030.988899494490295
550.02819490190900860.05638980381801710.971805098090991
560.07768765699748150.1553753139949630.922312343002519
570.09223009825806560.1844601965161310.907769901741934
580.08756857567957250.1751371513591450.912431424320427
590.07594691375988460.1518938275197690.924053086240115
600.06618783094187920.1323756618837580.93381216905812
610.05779078237152170.1155815647430430.942209217628478
620.0486304837763520.0972609675527040.951369516223648
630.04001395668025160.08002791336050320.959986043319748
640.03345755033649630.06691510067299260.966542449663504
650.02919829649008470.05839659298016940.970801703509915
660.02467007550680330.04934015101360660.975329924493197
670.03220092292737650.0644018458547530.967799077072623
680.07549042558460830.1509808511692170.924509574415392
690.08532889766887940.1706577953377590.91467110233112
700.09548877377091040.1909775475418210.90451122622909
710.08572683304180350.1714536660836070.914273166958196
720.08046949821954020.1609389964390800.91953050178046
730.07271980978291530.1454396195658310.927280190217085
740.06143332535071520.1228666507014300.938566674649285
750.05012180346104690.1002436069220940.949878196538953
760.03944050231932610.07888100463865220.960559497680674
770.0307246852838260.0614493705676520.969275314716174
780.02372125546109440.04744251092218870.976278744538906
790.04015571662893280.08031143325786550.959844283371067
800.0993252905870890.1986505811741780.90067470941291
810.1341647805656490.2683295611312970.865835219434351
820.1595060147956370.3190120295912730.840493985204363
830.1638335912953950.327667182590790.836166408704605
840.1812791041313230.3625582082626460.818720895868677
850.1827013586698210.3654027173396430.817298641330178
860.1887111848595280.3774223697190550.811288815140472
870.1926324850345690.3852649700691370.807367514965431
880.2017712744399370.4035425488798750.798228725560063
890.2117849825387850.4235699650775700.788215017461215
900.2263121133475330.4526242266950670.773687886652467
910.3913346953939130.7826693907878260.608665304606087
920.6624408971499970.6751182057000060.337559102850003
930.8640149022140240.2719701955719530.135985097785976
940.9281479261944830.1437041476110350.0718520738055173
950.9584374178539860.08312516429202880.0415625821460144
960.976753168175650.04649366364870140.0232468318243507
970.988434320694220.0231313586115610.0115656793057805
980.9932759568753970.01344808624920500.00672404312460252
990.9955685055068980.008862988986203540.00443149449310177
1000.9968267482557460.006346503488507640.00317325174425382
1010.9976354607583080.004729078483384460.00236453924169223
1020.9980225637994060.003954872401186920.00197743620059346
1030.9994363914221680.001127217155664130.000563608577832067
1040.999921770409710.0001564591805777787.82295902888888e-05
1050.9999558488935358.8302212930286e-054.4151106465143e-05
1060.999961121017677.77579646611738e-053.88789823305869e-05
1070.9999585511556268.28976887484403e-054.14488443742201e-05
1080.999953354725279.32905494604138e-054.66452747302069e-05
1090.9999423283246070.0001153433507862655.76716753931327e-05
1100.9999265643735880.0001468712528242677.34356264121333e-05
1110.9999094600033440.0001810799933119929.05399966559961e-05
1120.9999008981654180.0001982036691634639.91018345817316e-05
1130.9999526787125749.46425748528749e-054.73212874264374e-05
1140.9999682734878716.345302425709e-053.1726512128545e-05
1150.9999415560025150.0001168879949706175.84439974853086e-05
1160.9998928511386770.0002142977226467310.000107148861323366
1170.999827403731570.0003451925368600370.000172596268430018
1180.9998153280979290.0003693438041423920.000184671902071196
1190.999890150662280.0002196986754414860.000109849337720743
1200.9998770607321270.0002458785357453640.000122939267872682
1210.999803143387860.000393713224279010.000196856612139505
1220.9996813743226490.0006372513547021040.000318625677351052
1230.9994925141995330.001014971600934670.000507485800467336
1240.9994546853315680.001090629336864970.000545314668432486
1250.9997579481673080.0004841036653841730.000242051832692086
1260.9998402691855050.0003194616289910110.000159730814495505
1270.9996646936193230.0006706127613547410.000335306380677370
1280.9995528856691450.0008942286617098430.000447114330854922
1290.9989131051032810.002173789793437420.00108689489671871
1300.997476420415380.005047159169239810.00252357958461990
1310.9950197053818250.009960589236350440.00498029461817522
1320.9906117187217320.01877656255653620.00938828127826809
1330.980405454442140.03918909111572080.0195945455578604
1340.960830486547130.07833902690573940.0391695134528697
1350.9207011588421770.1585976823156470.0792988411578235
1360.8571185340867780.2857629318264440.142881465913222
1370.8450000654702580.3099998690594850.154999934529742
1380.9936499002976820.01270019940463530.00635009970231765


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level650.485074626865672NOK
5% type I error level860.641791044776119NOK
10% type I error level1000.746268656716418NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/1026mk1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/1026mk1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/16eou1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/16eou1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/26eou1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/26eou1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/36eou1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/36eou1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/4y5ne1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/4y5ne1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/5y5ne1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/5y5ne1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/6y5ne1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/6y5ne1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/79wnh1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/79wnh1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/826mk1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/826mk1293461203.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/926mk1293461203.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/27/t1293461163n6mtrcko4y55n8g/926mk1293461203.ps (open in new window)


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