Home » date » 2010 » Dec » 14 »

WS 10 - MR: Doubts about actions

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 14 Dec 2010 15:54:19 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y.htm/, Retrieved Tue, 14 Dec 2010 16:52:58 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y.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 «
0 25 11 7 8 25 23 0 17 6 17 8 30 25 0 18 8 12 9 22 19 0 16 10 12 7 22 29 0 20 10 11 4 25 25 0 16 11 11 11 23 21 0 18 16 12 7 17 22 0 17 11 13 7 21 25 0 30 12 16 10 19 18 0 23 8 11 10 15 22 0 18 12 10 8 16 15 0 21 9 9 9 22 20 0 31 14 17 11 23 20 0 27 15 11 9 23 21 0 21 9 14 13 19 21 0 16 8 15 9 23 24 0 20 9 15 6 25 24 0 17 9 13 6 22 23 0 25 16 18 16 26 24 0 26 11 18 5 29 18 0 25 8 12 7 32 25 0 17 9 17 9 25 21 0 32 12 18 12 28 22 0 22 9 14 9 25 23 0 17 9 16 5 25 23 0 20 14 14 10 18 24 0 29 10 12 8 25 23 0 23 14 17 7 25 21 0 20 10 12 8 20 28 0 11 6 6 4 15 16 0 26 13 12 8 24 29 0 22 10 12 8 26 27 0 14 15 13 8 14 16 0 19 12 14 7 24 28 0 20 11 11 8 25 25 0 28 8 12 7 20 22 0 19 9 9 7 21 23 0 30 9 15 9 27 26 0 29 15 18 11 23 23 0 26 9 15 6 25 25 0 23 10 12 8 20 21 0 21 12 14 9 22 24 0 28 11 13 6 25 22 0 23 14 13 10 25 27 0 18 6 11 8 17 26 0 20 8 16 10 25 24 0 21 10 11 5 26 24 0 28 12 16 14 27 22 0 10 5 8 6 19 24 0 22 10 15 6 22 20 0 31 10 21 12 32 26 0 29 13 18 12 21 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
D[t] = + 7.28981769944956 + 0.881039528223467Gender[t] + 0.247509655175127CM[t] -0.088425700420726PE[t] + 0.151038276304408PC[t] -0.175896134084292PS[t] + 0.0764167144019203O[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.289817699449561.5690544.6467e-064e-06
Gender0.8810395282234670.4282772.05720.0413790.020689
CM0.2475096551751270.0396266.246100
PE-0.0884257004207260.073669-1.20030.2318840.115942
PC0.1510382763044080.0919261.6430.102440.05122
PS-0.1758961340842920.056729-3.10060.0023020.001151
O0.07641671440192030.0583491.30970.1922890.096144


Multiple Linear Regression - Regression Statistics
Multiple R0.510045197445894
R-squared0.260146103437621
Adjusted R-squared0.23094134436279
F-TEST (value)8.90766134283299
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value2.48383622558634e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.45594595312024
Sum Squared Residuals916.81391974645


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11111.4270664654548-0.427066465454784
267.8360849782289-1.83608497822890
389.62543019807488-1.62543019807488
4109.5925014791350.407498520864995
5109.384495711482460.615504288517541
6119.497850435473711.50214956452629
71610.43208445909335.56791554090673
8119.621814710366021.37818528963398
91212.8441532226489-0.844153222648853
10812.5629655324714-4.56296553247144
111210.40095326951001.59904673049001
12910.7096529792644-1.70965297926435
131412.60352434617431.39647565382566
141511.91838008979133.08161991020871
15911.4757826990331-2.47578269903315
1689.07132122438775-1.07132122438775
1799.25645274800645-0.256452748006450
1899.14204687117348-0.142046871173476
191611.56321055157974.43678944842031
20119.163110478741941.83688952125806
2189.75546017726055-1.75546017726055
2298.560937067347080.439062932652920
231212.1869993356155-0.186999335615527
24910.2165958732887-1.21659587328873
2598.198043091354010.801956908645985
261411.18030449223482.81969550776515
271011.9749765840517-1.97497658405167
28149.743918445789024.25608155421097
291011.0089539299066-1.00895392990658
3068.67024822823558-2.67024822823558
311311.86684403902211.13315596097790
321010.3721797213492-0.372179721349167
33159.57384653011785.4261534698822
34129.729970061248432.27002993875157
35119.98864881670011.01135118329991
36812.3794926085917-4.37949260859167
37910.3177033935953-1.31770339359533
38911.9857052893062-2.9857052893062
391512.24932947860912.75067052139088
40910.8179273934591-1.81792739345913
411011.2165658946185-1.21656589461852
421210.57319133476841.42680866523160
431111.2605479614451-0.260547961445076
441411.00923636279672.99076363720333
45610.9772152934261-4.97721529342609
4689.77218015280336-1.77218015280336
47109.530730794475780.469269205524219
481211.85178480244960.148215197550421
4958.45571290370601-3.45571290370601
50109.97349360300190.0265063969981023
511011.2762949004487-1.27629490044874
521312.59932659427830.400673405721733
531011.0795893783874-1.07958937838741
541010.7256769437123-0.725676943712285
5599.77505000674727-0.775050006747274
5689.91633765040715-1.91633765040715
571411.41608419231762.58391580768237
58810.7934851193662-2.79348511936621
59911.3951222496545-2.39512224965451
601411.54763066445122.45236933554876
6189.49297444226475-1.49297444226476
62813.2856068854032-5.28560688540323
6378.69003696248559-1.69003696248559
6467.12801657480809-1.12801657480809
6588.99581178818015-0.995811788180153
6668.37000110057948-2.37000110057948
671111.5606391324515-0.560639132451452
68118.983545551981252.01645444801875
691410.21300556828993.78699443171013
7089.77063316074073-1.77063316074073
7188.6866448238785-0.686644823878504
721110.24096166518630.759038334813698
731010.1593919321312-0.159391932131153
741413.03037819989240.969621800107553
751110.40091068839300.599089311607034
76910.1875828447298-1.1875828447298
7789.6497480014096-1.64974800140960
78139.776420485816443.22357951418356
79129.254400345326922.74559965467308
801310.91395506638532.08604493361467
811412.30284345534471.69715654465532
821211.47928443983430.520715560165656
831411.19894646789242.80105353210758
841310.28126122322692.71873877677309
851611.48595017809694.51404982190309
86911.8732388109950-2.87323881099502
87910.1591115047232-1.15911150472325
88910.7826642103246-1.78266421032460
89811.0178646768088-3.01786467680884
9079.73454081571445-2.73454081571445
911611.62607697567984.37392302432015
921113.0106096506112-2.01060965061122
9399.97827399046014-0.978273990460137
94119.741821456510291.25817854348971
9599.51690184462251-0.516901844622511
961310.73048013702342.26951986297663
971614.23724113136071.76275886863933
981412.71619291932791.28380708067209
991211.36563811069590.634361889304061
1001312.93005340450820.0699465954917786
101119.754682194010751.24531780598925
10247.80921307165918-3.80921307165918
103810.5735802567502-2.57358025675017
104810.6393675539457-2.63936755394575
1051614.49045940767101.50954059232896
1061414.7591597620569-0.75915976205688
1071111.7309095033756-0.730909503375649
108912.0703449656655-3.07034496566547
109911.0966801347550-2.09668013475504
1101012.0401686714644-2.04016867146438
1111613.08741123332252.91258876667753
1121113.2051501649742-2.20515016497421
113169.77349915883236.22650084116771
1141211.01135467893310.98864532106695
1151412.98655932908871.01344067091126
1161011.3444899926022-1.34448999260225
1171010.6293844824562-0.629384482456151
1181210.51162073946941.48837926053062
1191412.65439905744091.34560094255912
1201612.55652292704773.44347707295229
121910.9134111560878-1.91341115608782
122812.2511265540770-4.25112655407697
12389.50645171640571-1.50645171640571
12479.39609934544645-2.39609934544645
125910.3656680893661-1.36566808936615
1261010.7377494663308-0.737749466330787
1271310.89046383182232.10953616817774
128108.844020339960971.15597966003903
1291112.1477185809318-1.14771858093178
130814.0435662397009-6.04356623970091
13199.78786816313071-0.787868163130714
132138.988808090314824.01119190968518
133149.361777341584574.63822265841543
1341211.36806351594540.63193648405458
1351211.76647326055720.233526739442779
1361412.63258981610751.36741018389252
1371111.3270951777102-0.327095177710184
1381410.46645059566563.53354940433436
1391011.4842169280899-1.48421692808995
1401413.42022153298460.579778467015447
1411110.85772194002180.142278059978229
142911.7806732074983-2.78067320749825
1431614.18164026322931.81835973677065
144911.3083207940057-2.30832079400566
14579.99134776291645-2.99134776291645
1461413.09944139108690.900558608913107
1471411.18995160960392.81004839039613
148811.5409767919281-3.54097679192805
1491110.42291461164070.577085388359251
1501412.35584378327171.64415621672835
1511111.7245653771566-0.72456537715656
1522011.79179431921208.20820568078805
1531110.88988524993250.110114750067473
154910.1022535330555-1.10225353305546
1551012.4590040776327-2.45900407763274
1561311.45584524750651.54415475249345
157810.8169397772171-2.81693977721710
1581511.64495379480363.35504620519639
1591412.94924500600691.05075499399306


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.9205602925596030.1588794148807930.0794397074403965
110.8707660571918310.2584678856163380.129233942808169
120.8055347223320770.3889305553358460.194465277667923
130.8496446309161830.3007107381676350.150355369083817
140.880675736751220.2386485264975580.119324263248779
150.830288806096170.339422387807660.16971119390383
160.7673439770269040.4653120459461920.232656022973096
170.7091964123738520.5816071752522960.290803587626148
180.6423968214854370.7152063570291250.357603178514563
190.8413893137333520.3172213725332970.158610686266648
200.794020235184690.4119595296306180.205979764815309
210.7684750544613980.4630498910772040.231524945538602
220.706202242771730.5875955144565410.293797757228270
230.6440661046362990.7118677907274020.355933895363701
240.59285945063320.8142810987335990.407140549366799
250.5226037760118090.9547924479763820.477396223988191
260.5147459064320830.9705081871358340.485254093567917
270.4795602564896320.9591205129792640.520439743510368
280.5461056126961360.9077887746077270.453894387303864
290.4896889722601350.979377944520270.510311027739865
300.4790352406351180.9580704812702370.520964759364882
310.430313892418460.860627784836920.56968610758154
320.3688243535465520.7376487070931040.631175646453448
330.5105257620991010.9789484758017970.489474237900899
340.4863537365342360.9727074730684730.513646263465763
350.4471434214024570.8942868428049150.552856578597543
360.5685523864573430.8628952270853150.431447613542657
370.5167344212470390.9665311575059220.483265578752961
380.5258620759315960.9482758481368080.474137924068404
390.5086062116817890.9827875766364230.491393788318211
400.4812010185410670.9624020370821340.518798981458933
410.4371244331370840.8742488662741680.562875566862916
420.3931667645018180.7863335290036350.606833235498182
430.3436064573386320.6872129146772640.656393542661368
440.3755521563423350.751104312684670.624447843657665
450.5407775783028840.9184448433942310.459222421697116
460.5477087827329240.9045824345341530.452291217267076
470.5049234920571370.9901530158857270.495076507942863
480.4538006297307590.9076012594615180.546199370269241
490.4846101596322740.9692203192645490.515389840367726
500.4357078093699820.8714156187399630.564292190630018
510.4251590771017310.8503181542034620.574840922898269
520.3782338541249270.7564677082498530.621766145875073
530.3432112306811680.6864224613623350.656788769318832
540.3063921298268630.6127842596537260.693607870173137
550.2983081908172820.5966163816345630.701691809182718
560.2935320336458060.5870640672916130.706467966354194
570.3025376160588570.6050752321177150.697462383941143
580.3108102624653210.6216205249306420.689189737534679
590.3110650694117160.6221301388234320.688934930588284
600.3069571667045420.6139143334090840.693042833295458
610.2842103907022370.5684207814044730.715789609297763
620.4533691110983780.9067382221967570.546630888901621
630.4448783085905820.8897566171811640.555121691409418
640.4080617742729040.8161235485458080.591938225727096
650.3724360862985740.7448721725971490.627563913701426
660.3801965657026110.7603931314052230.619803434297388
670.3434325225228030.6868650450456060.656567477477197
680.3262304202879630.6524608405759250.673769579712037
690.3827670242643640.7655340485287270.617232975735636
700.3683298036917180.7366596073834360.631670196308282
710.3316094757262110.6632189514524230.668390524273789
720.2971017831833510.5942035663667010.702898216816649
730.260829431491970.521658862983940.73917056850803
740.2351834723200160.4703669446400320.764816527679984
750.2019764955278280.4039529910556560.798023504472172
760.1845160074440630.3690320148881270.815483992555937
770.1802217662918060.3604435325836110.819778233708194
780.1935283076303990.3870566152607980.806471692369601
790.1938807079230500.3877614158460990.80611929207695
800.1787501468398930.3575002936797870.821249853160107
810.1615967993278690.3231935986557390.83840320067213
820.134880576151160.269761152302320.86511942384884
830.1588863752717340.3177727505434670.841113624728266
840.1627502059619030.3255004119238050.837249794038097
850.2435990385720920.4871980771441840.756400961427908
860.2547973499817710.5095946999635420.745202650018229
870.2269225194040620.4538450388081230.773077480595939
880.2136767457171850.4273534914343710.786323254282815
890.2421093048525230.4842186097050460.757890695147477
900.2739899104574880.5479798209149750.726010089542512
910.334887350748030.669774701496060.66511264925197
920.3355163797177690.6710327594355390.66448362028223
930.3065322290778060.6130644581556110.693467770922194
940.2715423830930730.5430847661861450.728457616906927
950.2621153933028980.5242307866057960.737884606697102
960.2369843633523170.4739687267046330.763015636647683
970.2053905339024470.4107810678048940.794609466097553
980.180148530455130.360297060910260.81985146954487
990.1507466934425470.3014933868850950.849253306557453
1000.1266260585000740.2532521170001480.873373941499926
1010.1096400335445460.2192800670890930.890359966455454
1020.1660192149871340.3320384299742670.833980785012866
1030.1526238388175850.3052476776351710.847376161182415
1040.1561417829226640.3122835658453270.843858217077336
1050.1634753111889260.3269506223778520.836524688811074
1060.1346779895228810.2693559790457630.865322010477119
1070.1148004916265550.2296009832531100.885199508373445
1080.1202922852950070.2405845705900130.879707714704993
1090.1056962624996090.2113925249992190.89430373750039
1100.11132842719490.22265685438980.8886715728051
1110.1263627034644120.2527254069288250.873637296535588
1120.1117090952232640.2234181904465290.888290904776736
1130.2809408111394480.5618816222788970.719059188860552
1140.2498811691661680.4997623383323370.750118830833832
1150.2147242475563290.4294484951126580.785275752443671
1160.1808723636776950.361744727355390.819127636322305
1170.1480457450481860.2960914900963720.851954254951814
1180.1270743537051620.2541487074103240.872925646294838
1190.1140704123240930.2281408246481870.885929587675907
1200.1385587604500070.2771175209000150.861441239549993
1210.1273885694666930.2547771389333860.872611430533307
1220.1284550582540280.2569101165080560.871544941745972
1230.1073593602935240.2147187205870480.892640639706476
1240.1571055395552020.3142110791104040.842894460444798
1250.1355789334784340.2711578669568680.864421066521566
1260.1101420384054050.2202840768108090.889857961594595
1270.1074792844760830.2149585689521660.892520715523917
1280.08709769431398080.1741953886279620.91290230568602
1290.08460982674348060.1692196534869610.91539017325652
1300.2600846169870870.5201692339741740.739915383012913
1310.2123695511793170.4247391023586350.787630448820683
1320.2552910388081770.5105820776163550.744708961191823
1330.3692011457371460.7384022914742930.630798854262854
1340.3125118703973020.6250237407946040.687488129602698
1350.2562844125869730.5125688251739460.743715587413027
1360.2511762366373390.5023524732746770.748823763362661
1370.2004283685626230.4008567371252450.799571631437377
1380.2214225296435320.4428450592870640.778577470356468
1390.1741110076678180.3482220153356370.825888992332181
1400.1343160099155650.2686320198311300.865683990084435
1410.09664952069900350.1932990413980070.903350479300997
1420.08438950941803790.1687790188360760.915610490581962
1430.06212770849460320.1242554169892060.937872291505397
1440.05084769422427180.1016953884485440.949152305775728
1450.04408957964370440.08817915928740880.955910420356296
1460.02741643516182640.05483287032365280.972583564838174
1470.02152127422189390.04304254844378780.978478725778106
1480.01759349240840130.03518698481680260.982406507591599
1490.007448389024958380.01489677804991680.992551610975042


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/35wbo1292342048.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/35wbo1292342048.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/45wbo1292342048.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/45wbo1292342048.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/55wbo1292342048.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/55wbo1292342048.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/78wau1292342048.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/78wau1292342048.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/88wau1292342048.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/88wau1292342048.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/98wau1292342048.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292341978q6gnuu491bj7i0y/98wau1292342048.ps (open in new window)


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