Home » date » 2010 » Dec » 03 »

*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: Fri, 03 Dec 2010 17:49:16 +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/03/t1291398427gylhmifidujvwor.htm/, Retrieved Fri, 03 Dec 2010 18:47:17 +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/03/t1291398427gylhmifidujvwor.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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132
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.578264633807969 + 0.925535412411281B[t] + 0.0132183880731054CM[t] + 0.0160035232163488CM_B[t] -1.31048736184262D[t] + 1.32524772719413D_B[t] + 0.406327339245114PE[t] -0.394585656390907PE_B[t] -0.341990685460128PC[t] + 0.363464570658177PC_B[t] + 0.942105175460255PS[t] + 0.0146495184249106PS_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.5782646338079691.018728-0.56760.571150.285575
B0.9255354124112810.02645834.981300
CM0.01321838807310540.081170.16280.8708620.435431
CM_B0.01600352321634880.0790440.20250.8398340.419917
D-1.310487361842620.218181-6.006400
D_B1.325247727194130.2210445.995400
PE0.4063273392451140.1435492.83060.0052970.002649
PE_B-0.3945856563909070.151846-2.59860.0103140.005157
PC-0.3419906854601280.108022-3.16590.001880.00094
PC_B0.3634645706581770.1092793.3260.0011130.000556
PS0.9421051754602550.04818519.551900
PS_B0.01464951842491060.0305660.47930.6324590.316229


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


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12624.60419955148811.39580044851188
22325.4130327883993-2.41303278839934
32524.21831833967270.781681660327342
42319.51793665997623.48206334002384
52022.3741165311321-2.37411653113210
62922.23870162968136.76129837031869
72020.2205856699302-0.220585669930168
81616.6015594595828-0.601559459582765
91818.4816387188737-0.481638718873727
101717.4960001377340-0.496000137733962
112323.0502803334575-0.0502803334575189
123029.56444174774130.435558252258726
132322.70656221918040.293437780819597
141818.2815495853943-0.281549585394319
151515.7286961091583-0.728696109158334
161212.7283106162804-0.728310616280424
172120.94981953320170.0501804667983168
181515.3891673348079-0.389167334807897
192020.2068579140039-0.206857914003871
203130.64616905330450.353830946695543
212726.84655423870640.153445761293572
223433.45303170807260.546968291927387
232121.1673111384559-0.167311138455917
243130.50279865026540.497201349734577
251919.3078180295097-0.307818029509666
261616.5787508582618-0.578750858261846
272020.3178371410299-0.317837141029892
282121.1055840416876-0.105584041687579
292222.1827699761436-0.18276997614362
301717.5205361096234-0.520536109623447
312423.96063850985540.0393614901445721
322525.2453422813576-0.245342281357642
332626.0625779104939-0.0625779104938919
342524.99012151970810.00987848029186378
351717.6352757199115-0.63527571991151
363231.59684978082480.403150219175241
373332.35480175159070.645198248409278
381312.84442456037390.155575439626085
3902.18794968435403-2.18794968435403
402525.174433175096-0.174433175095998
412928.89183760342320.108162396576839
422222.0868260200892-0.0868260200891923
431818.2686093376018-0.268609337601756
441717.5296000678684-0.52960006786844
452020.3328639948932-0.332863994893188
461515.634898291154-0.634898291154002
472020.3458358671561-0.345835867156142
483332.54301254467620.456987455323814
492928.61213147840000.387868521599974
502323.2818153482682-0.281815348268217
512625.86156820490420.138431795095830
521818.4186711187687-0.418671118768676
532020.1016957485837-0.101695748583713
541111.4706891159079-0.470689115907915
552828.1707423952679-0.170742395267933
562625.98961420038600.0103857996140364
572222.1695069951440-0.169506995144029
581717.5343728156567-0.534372815656687
591212.5319259276468-0.53192592764685
601414.7123555505507-0.712355550550716
611717.5107009711061-0.510700971106108
622120.33809274706900.661907252931049
630-5.251085665582265.25108566558226
641818.4794330488443-0.479433048844267
651010.9799755833075-0.979975583307487
662928.73463911153540.265360888464638
673130.3255764596980.674423540301971
681919.4438616524450-0.443861652445022
6999.12373445468246-0.123734454682457
700-0.372268938781060.37226893878106
712827.53834017141520.461659828584786
721919.2588847154214-0.258884715421409
733029.63671456567650.3632854343235
742928.89767857882250.102321421177502
752625.82710106022280.172898939777162
762323.0101476516417-0.010147651641749
771313.869782539103-0.869782539102994
782121.3603289070511-0.360328907051055
791919.3574021941919-0.357402194191938
802827.79499208747080.205007912529245
812322.34519279681440.65480720318562
8200.446493779711891-0.446493779711891
832121.1961576111266-0.196157611126642
842019.45218570632330.547814293676748
8507.23771568007521-7.23771568007521
862121.2209489982355-0.220948998235549
872121.296532797793-0.296532797792993
881515.6989440017742-0.698944001774219
892826.97537404203481.02462595796523
900-0.2626129198223290.262612919822329
912625.85409109071740.145908909282642
92109.756674809225280.243325190774718
9300.0342085643549297-0.0342085643549297
942222.1776567768225-0.17765677682249
951919.3236304946870-0.323630494687044
963130.85192759288900.148072407111044
973130.59390064372430.406099356275668
982928.74943059500210.250569404997940
991919.1361975269074-0.136197526907408
1002221.99782676048620.00217323951376444
1012323.0837356952992-0.0837356952991858
1021515.3413957017525-0.341395701752491
1032020.2871768710127-0.287176871012683
1041818.4718631876671-0.471863187667068
1052322.04715793744710.95284206255289
10605.73875916131579-5.73875916131579
1072120.86992763603790.130072363962140
1082423.86463292492580.135367075074194
1092524.09985678747550.900143212524538
1100-1.856403752801881.85640375280188
1111313.5411151924826-0.541115192482635
1122827.56919372142140.430806278578554
1132120.11817117468100.881828825318958
1140-7.157152280356467.15715228035646
115910.0905632682401-1.09056326824014
1161616.3128204414968-0.312820441496799
1171919.2843924990371-0.284392499037124
1181717.4037431082757-0.403743108275679
1192524.9012824498280.0987175501719826
1202019.96248938121340.0375106187865630
1212928.46881112458860.531188875411384
1221413.60338522677160.396614773228388
1230-1.150074462256981.15007446225698
1241515.4353749719552-0.435374971955153
1251919.4786690485831-0.47866904858306
1262019.40128434376780.598715656232225
1270-4.269853030114584.26985303011458
1282020.3485480195630-0.348548019562961
1291818.4452068883406-0.445206888340618
1303332.39392573777480.60607426222523
1312222.1911170315266-0.191117031526603
1321616.4309318311061-0.430931831106054
1331717.4128504707148-0.412850470714811
1341616.3094613074666-0.309461307466617
1352121.0292327307523-0.0292327307522631
1362626.0715816303282-0.0715816303281492
1371818.2493848514483-0.249384851448318
1381818.4742408271431-0.474240827143107
1391717.2852117383983-0.285211738398313
1402222.1127894550919-0.112789455091947
1413028.65161169533741.34838830466263
14202.92325184158514-2.92325184158514
1432424.3774196544525-0.377419654452548
1442121.1736848378696-0.173684837869621
1452121.4055415731769-0.405541573176937
1462928.76286794862310.2371320513769
1473129.56276920765971.43723079234029
14800.431084021843937-0.431084021843937
1491616.2259330922225-0.225933092222508
1502222.0352239577883-0.0352239577882592
1512020.2570507908056-0.257050790805632
1522828.0166912573327-0.0166912573327274
1533837.04632358166830.953676418331654
1542221.9667062156130.0332937843869896
1552020.466852129873-0.466852129873005
1561717.3828668619047-0.382866861904748
1572827.78189897902190.218101020978084
1582222.2097426131333-0.209742613133305
1593130.73724630179370.262753698206324


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
150.9318903247751480.1362193504497050.0681096752248525
160.9968050819216950.00638983615661040.0031949180783052
170.9928763114391920.01424737712161590.00712368856080793
180.9853843675442310.02923126491153730.0146156324557687
190.9830952896631750.03380942067365010.0169047103368250
200.970856332054660.05828733589067960.0291436679453398
210.9632075221269370.07358495574612590.0367924778730630
220.9421496017731350.1157007964537310.0578503982268655
230.9127322853819010.1745354292361980.087267714618099
240.9650100132423330.06997997351533450.0349899867576673
250.947600648535720.1047987029285610.0523993514642806
260.9247262686917850.1505474626164290.0752737313082147
270.8952002199361030.2095995601277930.104799780063897
280.8580809797363570.2838380405272870.141919020263643
290.8133118387392020.3733763225215970.186688161260798
300.76977837469880.4604432506023990.230221625301199
310.7621131474026950.4757737051946090.237886852597305
320.7226346498817680.5547307002364630.277365350118232
330.6638504872041650.672299025591670.336149512795835
340.6207090854084140.7585818291831720.379290914591586
350.5605564879901520.8788870240196960.439443512009848
360.5138125757638910.9723748484722180.486187424236109
370.4703941428274840.940788285654970.529605857172516
380.4136575781733730.8273151563467470.586342421826627
390.5989743697082820.8020512605834350.401025630291718
400.5544929200017260.8910141599965480.445507079998274
410.4956622767746610.9913245535493210.504337723225339
420.439305588742770.878611177485540.56069441125723
430.3854785274070060.7709570548140120.614521472592994
440.3360576254323610.6721152508647230.663942374567638
450.287567283519690.575134567039380.71243271648031
460.2422175044405540.4844350088811090.757782495559446
470.2011319766039720.4022639532079440.798868023396028
480.1671707873424600.3343415746849200.83282921265754
490.1360074515731690.2720149031463380.863992548426831
500.1100517112446250.2201034224892510.889948288755375
510.08633583343720930.1726716668744190.91366416656279
520.06765830747216790.1353166149443360.932341692527832
530.05291754103911010.1058350820782200.94708245896089
540.03980308500496780.07960617000993570.960196914995032
550.03047492367887830.06094984735775670.969525076321122
560.02248201920744350.0449640384148870.977517980792556
570.01616870357703750.03233740715407490.983831296422963
580.01170990679544430.02341981359088860.988290093204556
590.008294450049296890.01658890009859380.991705549950703
600.005993237545797790.01198647509159560.994006762454202
610.004111996227776450.00822399245555290.995888003772224
620.004409942937015850.00881988587403170.995590057062984
630.01138282136996380.02276564273992760.988617178630036
640.00806512535221240.01613025070442480.991934874647788
650.005984439018534860.01196887803706970.994015560981465
660.004203602593084080.008407205186168160.995796397406916
670.003076827440668310.006153654881336620.996923172559332
680.00210039581852770.00420079163705540.997899604181472
690.001843086301977660.003686172603955320.998156913698022
700.08573419243754820.1714683848750960.914265807562452
710.07045936205422140.1409187241084430.929540637945779
720.0555877519990730.1111755039981460.944412248000927
730.04347856092208260.08695712184416520.956521439077917
740.03321796963960980.06643593927921950.96678203036039
750.02516763575563510.05033527151127020.974832364244365
760.01884149364322110.03768298728644220.98115850635678
770.01538034887802890.03076069775605780.98461965112197
780.01155659907173140.02311319814346290.988443400928269
790.008360040055651550.01672008011130310.991639959944348
800.00600073094336620.01200146188673240.993999269056634
810.005696938941719760.01139387788343950.99430306105828
820.01930950688784160.03861901377568320.980690493112159
830.01432014855753540.02864029711507080.985679851442465
840.01334727978265820.02669455956531630.986652720217342
850.9695889427609930.0608221144780130.0304110572390065
860.9605088840680980.07898223186380420.0394911159319021
870.95120000269860.09759999460280140.0487999973014007
880.9398053505464360.1203892989071280.0601946494535639
890.9270992476348870.1458015047302260.0729007523651132
900.9356620442592160.1286759114815690.0643379557407845
910.9186522603595590.1626954792808830.0813477396404414
920.9039739508304750.1920520983390490.0960260491695246
930.925192040220130.1496159195597410.0748079597798703
940.9093440251176690.1813119497646620.090655974882331
950.888459864581470.2230802708370580.111540135418529
960.8625002887995380.2749994224009240.137499711200462
970.8339358747198910.3321282505602170.166064125280109
980.80146329640560.3970734071887980.198536703594399
990.7641360607240230.4717278785519540.235863939275977
1000.7225615711659640.5548768576680720.277438428834036
1010.6778705345918280.6442589308163450.322129465408172
1020.6331065565270790.7337868869458430.366893443472921
1030.5846249278468560.8307501443062870.415375072153143
1040.5497089087106890.9005821825786220.450291091289311
1050.5093418522958220.9813162954083560.490658147704178
1060.9995336153260940.0009327693478126650.000466384673906333
1070.9993365405526180.001326918894763250.000663459447381625
1080.9989210751268820.0021578497462360.001078924873118
1090.9983174234904550.003365153019089460.00168257650954473
1100.9996767310327040.0006465379345928250.000323268967296413
1110.9994556260540860.001088747891828880.000544373945914438
1120.9991427143280520.001714571343896760.00085728567194838
1130.9987752998681770.002449400263645060.00122470013182253
114100
115100
116100
117100
118100
119100
120100
121100
122100
123100
12412.29027722876273e-3141.14513861438137e-314
12512.19100778923149e-2981.09550389461574e-298
12612.86460374522558e-2941.43230187261279e-294
12711.57053833308214e-2717.85269166541068e-272
12815.08887628966546e-2532.54443814483273e-253
12911.92395357690118e-2479.61976788450588e-248
13013.04916765780649e-2311.52458382890324e-231
13115.81868681185882e-2212.90934340592941e-221
13215.49809410317547e-2032.74904705158774e-203
13312.46216708404559e-1921.23108354202280e-192
13419.46371938403483e-1754.73185969201742e-175
13511.01279277441768e-1635.06396387208839e-164
13612.02976563452989e-1511.01488281726494e-151
13717.76901729438546e-1373.88450864719273e-137
13811.17106859273505e-1245.85534296367523e-125
13913.26959676519298e-1111.63479838259649e-111
14013.38936234798622e-951.69468117399311e-95
14114.7380306538587e-822.36901532692935e-82
14213.33581610477523e-721.66790805238761e-72
14315.27979005315606e-572.63989502657803e-57
14416.40295872702784e-433.20147936351392e-43


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/Dec/03/t1291398427gylhmifidujvwor/10i0nt1291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/10i0nt1291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/1thqz1291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/1thqz1291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/2thqz1291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/2thqz1291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/348721291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/348721291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/448721291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/448721291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/548721291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/548721291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/6f0p51291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/6f0p51291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/7796q1291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/7796q1291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/8796q1291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/8796q1291398544.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/9796q1291398544.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/03/t1291398427gylhmifidujvwor/9796q1291398544.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