Home » date » 2010 » Nov » 24 »

ws 7 6

*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: Wed, 24 Nov 2010 13:52:28 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx.htm/, Retrieved Wed, 24 Nov 2010 14:51:32 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx.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 «
1 26 24 24 14 14 11 11 12 12 24 24 1 23 25 25 11 11 7 7 8 8 25 25 0 25 17 0 6 0 17 0 8 0 30 0 1 23 18 18 12 12 10 10 8 8 19 19 1 20 18 18 8 8 12 12 9 9 22 22 0 29 16 10 0 12 0 7 0 22 1 25 20 20 10 10 11 11 4 4 25 25 1 21 16 16 11 11 11 11 11 11 23 23 1 22 18 18 16 16 12 12 7 7 17 17 1 25 17 17 11 11 13 13 7 7 21 21 1 24 23 23 13 13 14 14 12 12 19 19 1 18 30 30 12 12 16 16 10 10 19 19 1 22 23 23 8 8 11 11 10 10 15 15 1 15 18 18 12 12 10 10 8 8 16 16 1 22 15 15 11 11 11 11 8 8 23 23 1 28 12 12 4 4 15 15 4 4 27 27 1 20 21 21 9 9 9 9 9 9 22 22 1 12 15 15 8 8 11 11 8 8 14 14 1 24 20 20 8 8 17 17 7 7 22 22 1 20 31 31 14 14 17 17 11 11 23 23 1 21 27 27 15 15 11 11 9 9 23 23 1 20 34 34 16 16 18 18 11 11 21 21 1 21 21 21 9 9 14 14 13 13 19 19 1 23 31 31 14 14 10 10 8 8 18 18 1 28 19 19 11 11 11 11 8 8 20 20 1 24 16 16 8 8 15 15 9 9 23 23 1 24 20 20 9 9 15 15 6 6 25 25 1 24 21 21 9 9 13 13 9 9 19 19 1 23 22 22 9 9 16 16 9 9 24 24 1 23 17 17 9 9 13 13 6 6 22 22 1 29 24 24 10 10 9 9 6 6 25 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24
R Framework
error message
Warning: there are blank lines in the 'Data X' field.
Please, use NA for missing data - blank lines are simply
 deleted and are NOT treated as missing values.


Multiple Linear Regression - Estimated Regression Equation
O[t] = -0.578264633807956 + 0.92553541241128B[t] + 0.0132183880731032CM[t] + 0.0160035232163502CM_B[t] -1.31048736184262D[t] + 1.32524772719412D_B[t] + 0.406327339245112PE[t] -0.394585656390905PE_B[t] -0.341990685460131PC[t] + 0.363464570658179PC_B[t] + 0.942105175460257PS[t] + 0.0146495184249108PS_B[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-0.5782646338079561.018728-0.56760.571150.285575
B0.925535412411280.02645834.981300
CM0.01321838807310320.081170.16280.8708620.435431
CM_B0.01600352321635020.0790440.20250.8398340.419917
D-1.310487361842620.218181-6.006400
D_B1.325247727194120.2210445.995400
PE0.4063273392451120.1435492.83060.0052970.002649
PE_B-0.3945856563909050.151846-2.59860.0103140.005157
PC-0.3419906854601310.108022-3.16590.001880.00094
PC_B0.3634645706581790.1092793.3260.0011130.000556
PS0.9421051754602570.04818519.551900
PS_B0.01464951842491080.0305660.47930.6324590.316229


Multiple Linear Regression - Regression Statistics
Multiple R0.986054290328691
R-squared0.972303063475619
Adjusted R-squared0.970230503599645
F-TEST (value)469.131471059977
F-TEST (DF numerator)11
F-TEST (DF denominator)147
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation1.43270045551944
Sum Squared Residuals301.736697501106


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12624.60419955148811.39580044851185
22325.4130327883993-2.41303278839925
32524.21831833967270.78168166032734
42319.51793665997623.48206334002381
52022.3741165311321-2.37411653113214
62922.23870162968136.76129837031869
72020.2205856699302-0.220585669930177
81616.6015594595828-0.601559459582769
91818.4816387188737-0.481638718873717
101717.4960001377340-0.49600013773396
112323.0502803334575-0.0502803334575275
123029.56444174774130.435558252258724
132322.70656221918040.293437780819601
141818.2815495853943-0.281549585394317
151515.7286961091583-0.728696109158332
161212.7283106162804-0.728310616280428
172120.94981953320170.0501804667983207
181515.3891673348079-0.389167334807894
192020.2068579140039-0.206857914003871
203130.64616905330450.353830946695542
212726.84655423870640.153445761293572
223433.45303170807260.546968291927387
232121.1673111384559-0.167311138455912
243130.50279865026540.497201349734574
251919.3078180295097-0.307818029509666
261616.5787508582618-0.578750858261844
272020.3178371410299-0.317837141029893
282121.1055840416876-0.105584041687578
292222.1827699761436-0.182769976143621
301717.5205361096234-0.52053610962345
312423.96063850985540.0393614901445705
322525.2453422813576-0.245342281357636
332626.0625779104939-0.0625779104938981
342524.99012151970810.00987848029186374
351717.6352757199115-0.635275719911508
363231.59684978082480.403150219175239
373332.35480175159070.645198248409274
381312.84442456037390.155575439626082
3902.18794968435404-2.18794968435404
402525.174433175096-0.174433175096001
412928.89183760342320.108162396576836
422222.0868260200892-0.0868260200891926
431818.2686093376018-0.268609337601757
441717.5296000678684-0.529600067868443
452020.3328639948932-0.332863994893188
461515.634898291154-0.634898291154
472020.3458358671561-0.345835867156141
483332.54301254467620.456987455323809
492928.61213147840000.38786852159997
502323.2818153482682-0.281815348268219
512625.86156820490420.138431795095829
521818.4186711187687-0.418671118768677
532020.1016957485837-0.101695748583711
541111.4706891159079-0.470689115907916
552828.1707423952679-0.170742395267928
562625.98961420038600.0103857996140351
572222.1695069951440-0.169506995144028
581717.5343728156567-0.53437281565669
591212.5319259276469-0.531925927646852
601414.7123555505507-0.712355550550712
611717.5107009711061-0.510700971106106
622120.33809274706900.661907252931047
630-5.251085665582265.25108566558226
641818.4794330488443-0.479433048844261
651010.9799755833075-0.979975583307488
662928.73463911153540.265360888464633
673130.32557645969800.67442354030197
681919.4438616524450-0.443861652445022
6999.12373445468246-0.123734454682459
700-0.3722689387810720.372268938781072
712827.53834017141520.461659828584786
721919.2588847154214-0.258884715421411
733029.63671456567650.363285434323499
742928.89767857882250.102321421177499
752625.82710106022280.172898939777158
762323.0101476516417-0.0101476516417497
771313.869782539103-0.869782539102996
782121.3603289070511-0.360328907051057
791919.3574021941919-0.357402194191937
802827.79499208747080.205007912529240
812322.34519279681440.654807203185622
8200.446493779711898-0.446493779711898
832121.1961576111266-0.196157611126643
842019.45218570632320.54781429367675
8507.2377156800752-7.2377156800752
862121.2209489982356-0.220948998235552
872121.296532797793-0.296532797792997
881515.6989440017742-0.698944001774215
892826.97537404203481.02462595796524
900-0.2626129198223200.262612919822320
912625.85409109071740.145908909282640
92109.756674809225280.243325190774723
9300.0342085643549303-0.0342085643549303
942222.1776567768225-0.177656776822495
951919.3236304946870-0.323630494687042
963130.85192759288900.148072407111043
973130.59390064372430.406099356275664
982928.74943059500210.250569404997940
991919.1361975269074-0.136197526907407
1002221.99782676048620.0021732395137644
1012323.0837356952992-0.083735695299185
1021515.3413957017525-0.341395701752489
1032020.2871768710127-0.287176871012682
1041818.4718631876671-0.471863187667068
1052322.04715793744710.952842062552895
10605.73875916131579-5.73875916131579
1072120.86992763603790.130072363962143
1082423.86463292492580.135367075074196
1092524.09985678747550.90014321252454
1100-1.856403752801871.85640375280187
1111313.5411151924826-0.541115192482634
1122827.56919372142140.430806278578555
1132120.11817117468100.881828825318965
1140-7.157152280356477.15715228035647
115910.0905632682401-1.09056326824013
1161616.3128204414968-0.312820441496799
1171919.2843924990371-0.284392499037124
1181717.4037431082757-0.40374310827568
1192524.9012824498280.0987175501719828
1202019.96248938121340.0375106187865633
1212928.46881112458860.531188875411382
1221413.60338522677160.396614773228392
1230-1.150074462256981.15007446225698
1241515.4353749719551-0.435374971955149
1251919.4786690485831-0.47866904858306
1262019.40128434376780.598715656232224
1270-4.269853030114584.26985303011458
1282020.3485480195630-0.348548019562960
1291818.4452068883406-0.445206888340618
1303332.39392573777480.606074262225229
1312222.1911170315266-0.191117031526600
1321616.4309318311061-0.430931831106053
1331717.4128504707148-0.412850470714814
1341616.3094613074666-0.309461307466619
1352121.0292327307523-0.029232730752263
1362626.0715816303282-0.0715816303281501
1371818.2493848514483-0.249384851448318
1381818.4742408271431-0.474240827143106
1391717.2852117383983-0.285211738398310
1402222.1127894550919-0.11278945509194
1413028.65161169533741.34838830466263
14202.92325184158514-2.92325184158514
1432424.3774196544525-0.377419654452538
1442121.1736848378696-0.173684837869617
1452121.4055415731769-0.405541573176936
1462928.76286794862310.237132051376895
1473129.56276920765971.43723079234029
14800.431084021843932-0.431084021843932
1491616.2259330922225-0.225933092222503
1502222.0352239577883-0.0352239577882566
1512020.2570507908056-0.25705079080563
1522828.0166912573327-0.0166912573327332
1533837.04632358166840.953676418331649
1542221.9667062156130.0332937843869862
1552020.466852129873-0.466852129872996
1561717.3828668619047-0.38286686190475
1572827.78189897902190.218101020978083
1582222.2097426131333-0.209742613133305
1593130.73724630179370.262753698206326


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9318903247751490.1362193504497030.0681096752248514
160.9968050819216950.00638983615661050.00319491807830525
170.9928763114391920.01424737712161610.00712368856080807
180.985384367544230.02923126491153830.0146156324557692
190.9830952896631740.03380942067365160.0169047103368258
200.970856332054660.05828733589067940.0291436679453397
210.9632075221269360.07358495574612870.0367924778730644
220.942149601773130.1157007964537390.0578503982268694
230.91273228538190.1745354292361990.0872677146180996
240.9650100132423320.06997997351533690.0349899867576685
250.947600648535720.1047987029285590.0523993514642797
260.9247262686917880.1505474626164250.0752737313082124
270.8952002199360970.2095995601278060.104799780063903
280.8580809797363610.2838380405272770.141919020263639
290.8133118387392060.3733763225215890.186688161260794
300.76977837469880.4604432506023990.230221625301199
310.7621131474026870.4757737051946270.237886852597313
320.7226346498817690.5547307002364630.277365350118231
330.6638504872041680.6722990255916640.336149512795832
340.6207090854084030.7585818291831940.379290914591597
350.5605564879901360.8788870240197280.439443512009864
360.5138125757638770.9723748484722450.486187424236123
370.4703941428274720.9407882856549450.529605857172528
380.4136575781733380.8273151563466760.586342421826662
390.5989743697082970.8020512605834050.401025630291703
400.5544929200017280.8910141599965440.445507079998272
410.4956622767746560.9913245535493120.504337723225344
420.4393055887427550.878611177485510.560694411257245
430.3854785274069980.7709570548139960.614521472593002
440.3360576254323690.6721152508647380.663942374567631
450.2875672835197010.5751345670394030.712432716480299
460.2422175044405640.4844350088811280.757782495559436
470.2011319766039760.4022639532079520.798868023396024
480.1671707873424520.3343415746849050.832829212657548
490.1360074515731750.2720149031463510.863992548426824
500.1100517112446260.2201034224892510.889948288755374
510.08633583343720960.1726716668744190.91366416656279
520.06765830747217390.1353166149443480.932341692527826
530.05291754103910860.1058350820782170.947082458960891
540.03980308500496550.0796061700099310.960196914995035
550.03047492367887720.06094984735775440.969525076321123
560.02248201920744220.04496403841488450.977517980792558
570.01616870357703830.03233740715407650.983831296422962
580.01170990679544470.02341981359088940.988290093204555
590.008294450049298920.01658890009859780.991705549950701
600.00599323754579840.01198647509159680.994006762454202
610.004111996227775750.00822399245555150.995888003772224
620.004409942937015090.008819885874030180.995590057062985
630.01138282136996620.02276564273993240.988617178630034
640.008065125352211930.01613025070442390.991934874647788
650.005984439018535020.01196887803707000.994015560981465
660.004203602593084690.008407205186169380.995796397406915
670.003076827440668010.006153654881336030.996923172559332
680.002100395818528080.004200791637056170.997899604181472
690.001843086301977760.003686172603955520.998156913698022
700.08573419243754130.1714683848750830.914265807562459
710.07045936205421710.1409187241084340.929540637945783
720.0555877519990650.111175503998130.944412248000935
730.04347856092208660.08695712184417310.956521439077913
740.03321796963960980.06643593927921950.96678203036039
750.02516763575563530.05033527151127060.974832364244365
760.01884149364322320.03768298728644630.981158506356777
770.01538034887803060.03076069775606120.98461965112197
780.01155659907173130.02311319814346260.988443400928269
790.008360040055652880.01672008011130580.991639959944347
800.006000730943367130.01200146188673430.993999269056633
810.005696938941721140.01139387788344230.994303061058279
820.0193095068878420.0386190137756840.980690493112158
830.01432014855753490.02864029711506980.985679851442465
840.01334727978265770.02669455956531530.986652720217342
850.9695889427609940.06082211447801170.0304110572390058
860.96050888406810.07898223186380160.0394911159319008
870.9512000026986010.0975999946027970.0487999973013985
880.9398053505464370.1203892989071260.060194649453563
890.9270992476348850.145801504730230.072900752365115
900.9356620442592170.1286759114815660.064337955740783
910.918652260359560.1626954792808800.0813477396404401
920.9039739508304750.1920520983390490.0960260491695245
930.9251920402201290.1496159195597420.0748079597798712
940.9093440251176690.1813119497646630.0906559748823313
950.888459864581470.2230802708370610.111540135418531
960.8625002887995370.2749994224009260.137499711200463
970.8339358747198880.3321282505602230.166064125280112
980.8014632964055970.3970734071888070.198536703594403
990.7641360607240270.4717278785519470.235863939275974
1000.7225615711659650.554876857668070.277438428834035
1010.6778705345918290.6442589308163420.322129465408171
1020.6331065565270830.7337868869458340.366893443472917
1030.5846249278468480.8307501443063030.415375072153152
1040.5497089087106820.9005821825786360.450291091289318
1050.5093418522958230.9813162954083550.490658147704177
1060.9995336153260940.0009327693478126840.000466384673906342
1070.9993365405526180.001326918894763350.000663459447381676
1080.9989210751268820.002157849746236070.00107892487311803
1090.9983174234904550.00336515301908930.00168257650954465
1100.9996767310327040.0006465379345928520.000323268967296426
1110.9994556260540850.00108874789182910.00054437394591455
1120.9991427143280520.001714571343896470.000857285671948233
1130.9987752998681780.002449400263644210.00122470013182210
114100
115100
116100
117100
118100
119100
120100
121100
122100
123100
124100
12514.25610936260445e-3042.12805468130223e-304
12614.84385149583064e-2942.42192574791532e-294
12718.7512927611759e-2784.37564638058795e-278
12815.65416621894546e-2632.82708310947273e-263
12912.30484563619042e-2451.15242281809521e-245
13013.05972870069150e-2301.52986435034575e-230
13111.32410842359731e-2236.62054211798654e-224
13213.79293484597089e-2091.89646742298545e-209
13318.4189297430175e-1954.20946487150875e-195
13411.01646719401544e-1825.08233597007721e-183
13515.71862489918074e-1682.85931244959037e-168
13612.35328575929728e-1541.17664287964864e-154
13714.30226771089198e-1422.15113385544599e-142
13819.92764614521413e-1264.96382307260707e-126
13911.06614260278708e-1125.33071301393539e-113
14011.9543900810254e-979.771950405127e-98
14117.62792043350856e-823.81396021675428e-82
14212.03877361448461e-731.01938680724230e-73
14315.91295474588529e-592.95647737294264e-59
14412.51294829863939e-451.25647414931970e-45


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level460.353846153846154NOK
5% type I error level660.507692307692308NOK
10% type I error level770.592307692307692NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/10vdhz1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/10vdhz1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/16uko1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/16uko1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/26uko1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/26uko1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/36uko1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/36uko1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/4zl1r1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/4zl1r1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/5zl1r1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/5zl1r1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/6suit1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/6suit1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/7340e1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/7340e1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/8340e1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/8340e1290606735.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/9vdhz1290606735.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/24/t1290606692byuh4r21bk445rx/9vdhz1290606735.ps (open in new window)


 
Parameters (Session):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by