Home » date » 2010 » Dec » 11 »

W10- MR

*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: Sat, 11 Dec 2010 18:14:08 +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/11/t1292091261h386v94umfj3alf.htm/, Retrieved Sat, 11 Dec 2010 19:14:24 +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/11/t1292091261h386v94umfj3alf.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 24 14 11 12 24 26 0 25 11 7 8 25 23 0 17 6 17 8 30 25 1 18 12 10 8 19 23 1 18 8 12 9 22 19 1 16 10 12 7 22 29 1 20 10 11 4 25 25 1 16 11 11 11 23 21 1 18 16 12 7 17 22 1 17 11 13 7 21 25 0 23 13 14 12 19 24 0 30 12 16 10 19 18 1 23 8 11 10 15 22 1 18 12 10 8 16 15 1 15 11 11 8 23 22 1 12 4 15 4 27 28 0 21 9 9 9 22 20 1 15 8 11 8 14 12 1 20 8 17 7 22 24 0 31 14 17 11 23 20 0 27 15 11 9 23 21 1 34 16 18 11 21 20 1 21 9 14 13 19 21 1 31 14 10 8 18 23 1 19 11 11 8 20 28 0 16 8 15 9 23 24 1 20 9 15 6 25 24 1 21 9 13 9 19 24 1 22 9 16 9 24 23 1 17 9 13 6 22 23 1 24 10 9 6 25 29 0 25 16 18 16 26 24 0 26 11 18 5 29 18 1 25 8 12 7 32 25 1 17 9 17 9 25 21 1 32 16 9 6 29 26 1 33 11 9 6 28 22 1 13 16 12 5 17 22 1 32 12 18 12 28 22 1 25 12 12 7 29 23 1 29 14 18 10 26 30 1 22 9 14 9 25 23 1 18 10 15 8 14 17 1 17 9 16 5 25 23 0 20 10 10 8 26 23 1 15 12 11 8 20 25 1 20 14 14 10 18 24 1 33 14 9 6 32 24 0 29 10 12 8 25 23 1 23 14 17 7 25 21 0 26 16 5 4 23 24 1 18 9 12 8 21 2 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk
R Framework
error message
The field 'Names of X columns' contains a hard return which cannot be interpreted.
Please, resubmit your request without hard returns in the 'Names of X columns'.


Multiple Linear Regression - Estimated Regression Equation
ConcernoverMistakes[t] = + 3.44754667768642 + 0.0228923811027678gender[t] + 0.347538866580637Doubtsaboutactions[t] + 0.0806235164920517ParentalExpectations[t] -0.196292046597524ParentalCriticism[t] + 0.264624519633298PersonalStandards[t] + 0.391705515091531`Organization `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3.447546677686422.4922171.38330.1685940.084297
gender0.02289238110276780.0741630.30870.7579910.378995
Doubtsaboutactions0.3475388665806370.1113813.12030.0021630.001081
ParentalExpectations0.08062351649205170.1162270.69370.4889470.244473
ParentalCriticism-0.1962920465975240.098197-1.9990.0473960.023698
PersonalStandards0.2646245196332980.0802843.29610.001220.00061
`Organization `0.3917055150915310.082324.75835e-062e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.816486891416717
R-squared0.666650843855334
Adjusted R-squared0.653492324533834
F-TEST (value)50.663059236922
F-TEST (DF numerator)6
F-TEST (DF denominator)152
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.9152072013772
Sum Squared Residuals2329.98480931682


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12423.37977679563660.620223204363412
22521.88934229067523.11065770932475
31723.0644167510421-6.06441675104214
41820.913896970035-2.91389697003503
51818.7157479886328-0.715747988632833
61623.7204649659045-7.72046496590446
72023.4557690877388-3.45576908773875
81620.333192528504-4.333192528504
91821.7406369615811-3.74063696158107
101722.3171807689777-5.31718076897773
112321.16757485018251.83242514981746
123019.023634019231910.9763659807681
132317.76157733338485.23842266661524
141816.98637929040291.01362070959711
151521.3137741833881-6.3137741833881
161223.3973955387643-11.3973955387643
172119.19022943972611.80977056027392
181513.97248175603121.0275182439688
192021.4699772397458-1.46997723974579
203121.44495233100399.55504766899608
212722.09303970691884.90696029308117
223421.714296922493412.2857030775066
232118.42890317309062.57109682690936
243121.3443501835639.655649816437
251922.8701337150374-3.87013371503739
261621.1578782520972-5.15787825209717
272022.6464346788397-2.64643467883974
282120.30856438826330.691435611736723
292221.48185202081440.518147979185607
301721.2996085718642-4.29960857186421
312424.4687600219257-0.468760021925722
322523.59988896693561.40011103306436
332622.46504761495593.53495238504406
342524.104810368710.895189631289954
351721.0436890267567-4.04368902675668
363226.43737475466815.56262524533186
373322.868233841765510.1317661582345
381322.1332210547761-9.13322105477612
393222.76363207718959.2363679228105
402523.91768124594961.08231875405036
412926.45568898501152.54431101498853
422221.58522950746360.414770492536412
431816.94858113061831.05141886938166
441722.5316447268378-5.53164472683779
452022.0482984932041-2.04829849320407
461522.0425560363434-7.04255603634344
472021.6659656714277-1.66596567142769
483325.75275955022377.2472404497763
492921.94492100655497.05507899344512
502323.1739674528549-0.173967452854913
512624.11341425280941.88658574719064
521820.9534819576353-2.95348195763535
532022.580325983846-2.58032598384604
5467.78840726553034-1.78840726553034
55813.837370986172-5.83737098617201
561311.82130506828751.17869493171248
571011.1996079265063-1.19960792650633
58810.2967327011067-2.29673270110669
5979.96028842263066-2.96028842263066
601510.80864258746884.19135741253117
61911.029104591413-2.02910459141299
621010.9617179132952-0.961717913295248
631212.4025936126956-0.402593612695594
64139.005511471468393.99448852853161
651010.2593306697743-0.259330669774269
66119.887780770919911.11221922908009
67810.6576896022493-2.65768960224927
6899.69443048538135-0.694430485381348
691310.8904774929412.10952250705896
701110.47332730505110.526672694948916
71810.719262862958-2.71926286295801
7299.53894730632696-0.538947306326961
73911.6533650102401-2.65336501024008
741512.82563088935352.17436911064647
75911.4478845099146-2.4478845099146
761010.8125054693945-0.812505469394451
771411.6320795238992.36792047610102
781211.94371142254710.0562885774529119
791211.55397822909590.446021770904078
801110.39642349515050.603576504849498
811411.92757825377142.07242174622864
82611.8707979201675-5.87079792016751
831211.57517614000040.424823859999625
84812.1076441513051-4.10764415130507
851410.96451861799313.03548138200694
861112.8701262159193-1.87012621591931
87109.793432570446870.206567429553125
881411.11486983810422.88513016189578
891211.69144413363380.308555866366223
901011.2291885682839-1.2291885682839
911412.95901004455651.0409899554435
9259.56196210615771-4.56196210615771
931110.48589683151620.514103168483819
941011.0137740422211-1.01377404222114
95911.9260991825891-2.92609918258911
961013.0219009073152-3.0219009073152
971612.63355179980563.36644820019441
981312.7695894597740.23041054022597
99911.0328965216864-2.03289652168638
1001011.0004870088008-1.00048700880077
1011011.0357874472364-1.03578744723636
102710.2727059190942-3.2727059190942
103912.0147248269682-3.01472482696822
104811.9702396696424-3.9702396696424
1051412.74320979286431.25679020713569
106149.270009837535984.72999016246402
10789.32510547219745-1.32510547219745
10899.9527286788597-0.952728678859693
1091411.7501932876232.249806712377
1101411.49536438278142.50463561721864
111811.1514613821933-3.15146138219327
112813.4343690442025-5.43436904420246
11388.91618195089977-0.916181950899767
11478.79080968797238-1.79080968797238
11568.10634783699819-2.10634783699819
116811.3555086310819-3.35550863108193
11769.62479840746586-3.62479840746586
118118.942038510785232.05796148921476
1191412.38281981353881.6171801864612
120118.288226962911682.71177303708832
121117.976543597187823.02345640281218
122119.791604064603571.20839593539643
1231410.21585209867493.78414790132511
12489.04967875154605-1.04967875154605
1252010.50494708729959.4950529127005
1261112.4227741365669-1.42277413656687
127810.0130840871477-2.01308408714768
1281110.93424387128190.0657561287180931
1291012.6005753651029-2.6005753651029
1301410.57463621278953.42536378721046
131119.799980759058491.20001924094152
132911.4374269880652-2.43742698806517
133910.819988225095-1.81998822509497
13489.81727575333507-1.81727575333508
1351011.6894324177541-1.68943241775408
1361312.90961281838010.090387181619895
1371310.46846405786072.53153594213926
138128.812917743289393.18708225671061
139811.3533562115723-3.35335621157227
140139.21239945975713.7876005402429
141147.177805761546786.82219423845322
1421210.67461187009541.32538812990458
1431412.86618468480571.13381531519433
144159.384737337111955.61526266288805
1451312.4220339694090.57796603059102
146169.860903089163556.13909691083645
147911.3032530953576-2.30325309535761
14899.4630438616911-0.463043861691107
149910.1871011119845-1.18710111198445
150811.3813133348038-3.38131333480376
15179.56378521604572-2.56378521604572
1521612.32582821374063.67417178625936
1531114.1617796912668-3.16177969126679
15499.1381151583667-0.138115158366692
1551112.4857586200766-1.48575862007657
156911.0577350629719-2.0577350629719
1571410.58813388083753.41186611916255
1581311.47381163236441.52618836763558
1591614.00595082128521.99404917871479


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.129271962368730.2585439247374610.87072803763127
110.08140020054265610.1628004010853120.918599799457344
120.24509837911570.49019675823140.7549016208843
130.1774907347995990.3549814695991980.822509265200401
140.2737796491308060.5475592982616120.726220350869194
150.2058930209442050.4117860418884090.794106979055795
160.2068280589593210.4136561179186410.79317194104068
170.2755131531253380.5510263062506760.724486846874662
180.3431352846712480.6862705693424970.656864715328752
190.3533239025117360.7066478050234720.646676097488264
200.4926888408113060.9853776816226130.507311159188694
210.433629236145260.867258472290520.56637076385474
220.8243122728216430.3513754543567150.175687727178357
230.7782205770909090.4435588458181820.221779422909091
240.9703977083959170.05920458320816650.0296022916040833
250.9606064832566590.07878703348668260.0393935167433413
260.9737009953929420.05259800921411520.0262990046070576
270.9676287066586170.06474258668276510.0323712933413825
280.959726167728770.08054766454245840.0402738322712292
290.94826671544480.1034665691104010.0517332845552005
300.9406081163833840.1187837672332310.0593918836166157
310.9688708090955040.06225838180899140.0311291909044957
320.9777252446994140.0445495106011720.022274755300586
330.9720127622479530.05597447550409490.0279872377520474
340.9828215297156520.03435694056869520.0171784702843476
350.9845775341466750.03084493170664970.0154224658533248
360.9886188323137380.02276233537252350.0113811676862618
370.99883657291160.002326854176800370.00116342708840019
380.9999307902488830.0001384195022345486.92097511172742e-05
390.999984492057643.10158847181172e-051.55079423590586e-05
400.9999752012271564.95975456878245e-052.47987728439122e-05
410.9999724349104725.51301790567708e-052.75650895283854e-05
420.9999527443435279.45113129462913e-054.72556564731457e-05
430.9999259230938920.0001481538122164467.40769061082231e-05
440.9999468277322080.0001063445355849695.31722677924845e-05
450.999930292739290.0001394145214196776.97072607098385e-05
460.9999854174653522.91650692960059e-051.4582534648003e-05
470.9999814129025223.71741949551242e-051.85870974775621e-05
480.9999929760340931.40479318149904e-057.02396590749522e-06
490.9999989749425192.05011496243531e-061.02505748121766e-06
500.9999986606415872.67871682669231e-061.33935841334615e-06
510.9999992476139491.50477210222477e-067.52386051112385e-07
520.9999986995931042.60081379282364e-061.30040689641182e-06
530.999999403758251.19248349909207e-065.96241749546037e-07
540.9999994293118881.14137622380804e-065.7068811190402e-07
550.9999994744694421.05106111506088e-065.25530557530438e-07
560.9999996802741056.39451790811497e-073.19725895405748e-07
570.999999505439999.89120020594644e-074.94560010297322e-07
580.9999997022826995.95434602790449e-072.97717301395225e-07
590.9999998906583592.18683282314544e-071.09341641157272e-07
600.9999999506812239.86375544283654e-084.93187772141827e-08
610.9999999314575381.37084924298745e-076.85424621493726e-08
620.9999998768591932.46281614077229e-071.23140807038614e-07
630.9999997915298154.16940370349383e-072.08470185174691e-07
640.999999903035691.93928620235086e-079.69643101175429e-08
650.9999999471265911.05746817571595e-075.28734087857977e-08
660.9999999684996456.30007095979228e-083.15003547989614e-08
670.9999999846952873.06094265213831e-081.53047132606915e-08
680.9999999709763615.80472775008957e-082.90236387504479e-08
690.9999999795457984.0908404114361e-082.04542020571805e-08
700.999999960762687.84746419491663e-083.92373209745831e-08
710.9999999623595257.52809508087031e-083.76404754043515e-08
720.9999999281248531.43750293567251e-077.18751467836257e-08
730.999999897864012.04271982207588e-071.02135991103794e-07
740.9999999117303081.76539384792206e-078.82696923961029e-08
750.9999998434823753.13035249796715e-071.56517624898358e-07
760.9999997742101624.51579675135983e-072.25789837567992e-07
770.9999999040946041.91810791722923e-079.59053958614615e-08
780.9999998212662623.57467476750732e-071.78733738375366e-07
790.9999996686785446.62642912602417e-073.31321456301209e-07
800.9999995612540678.77491866762805e-074.38745933381402e-07
810.999999363897921.27220416094658e-066.36102080473292e-07
820.9999997117696395.76460722018273e-072.88230361009137e-07
830.9999994783636841.04327263202991e-065.21636316014955e-07
840.999999545947949.08104120966383e-074.54052060483192e-07
850.999999495665221.00866956123295e-065.04334780616473e-07
860.9999991487806211.70243875747221e-068.51219378736104e-07
870.999998446201053.10759789787932e-061.55379894893966e-06
880.9999986997420772.60051584684946e-061.30025792342473e-06
890.9999978948042094.2103915826634e-062.1051957913317e-06
900.9999964386809977.12263800534313e-063.56131900267157e-06
910.9999943160212051.13679575890747e-055.68397879453735e-06
920.9999943888905661.12222188670841e-055.61110943354206e-06
930.9999903592469471.92815061055781e-059.64075305278905e-06
940.9999832192315773.35615368466483e-051.67807684233241e-05
950.9999820486293273.59027413466131e-051.79513706733065e-05
960.9999736942647145.26114705715509e-052.63057352857754e-05
970.9999702344995615.9531000877729e-052.97655004388645e-05
980.9999501582039759.96835920507854e-054.98417960253927e-05
990.9999304195966360.0001391608067276526.9580403363826e-05
1000.999899690661680.0002006186766409350.000100309338320467
1010.9998336438181540.0003327123636914170.000166356181845709
1020.9997648295093280.0004703409813442960.000235170490672148
1030.999673348650990.0006533026980211570.000326651349010578
1040.999662193663840.0006756126723212330.000337806336160616
1050.9994672774143870.001065445171225140.000532722585612572
1060.9995436730547970.0009126538904063780.000456326945203189
1070.9995416780352670.0009166439294654520.000458321964732726
1080.9995570535198420.0008858929603150920.000442946480157546
1090.9993513743358210.00129725132835740.000648625664178702
1100.9992773891314540.001445221737091730.000722610868545863
1110.9990972206867180.001805558626564530.000902779313282267
1120.9997370970798370.0005258058403256840.000262902920162842
1130.9998225968487370.000354806302526810.000177403151263405
1140.9996972592946440.0006054814107122830.000302740705356142
1150.999597903682820.0008041926343592740.000402096317179637
1160.9994123464878530.001175307024293690.000587653512146845
1170.9992294371594160.001541125681167650.000770562840583827
1180.9988170932483740.002365813503251160.00118290675162558
1190.9981948055607160.003610388878568330.00180519443928417
1200.997412601308210.005174797383582160.00258739869179108
1210.9969425457970380.006114908405923680.00305745420296184
1220.995665324872910.008669350254179030.00433467512708951
1230.9948964836331270.01020703273374690.00510351636687346
1240.9930923636443640.01381527271127260.00690763635563629
1250.9997057064703550.0005885870592901490.000294293529645074
1260.999548692181160.0009026156376814230.000451307818840712
1270.9991917204375990.001616559124802920.000808279562401458
1280.9985261167218890.002947766556222130.00147388327811106
1290.9975124148086360.004975170382728770.00248758519136439
1300.9961524354774510.00769512904509780.0038475645225489
1310.9937847119224990.01243057615500280.00621528807750141
1320.9906621269069480.01867574618610320.0093378730930516
1330.9849038901795310.0301922196409380.015096109820469
1340.9762040649803220.0475918700393560.023795935019678
1350.965433994199420.06913201160116150.0345660058005808
1360.9522681313447940.0954637373104110.0477318686552055
1370.9497463676866820.1005072646266360.0502536323133182
1380.9423827788817680.1152344422364640.0576172211182322
1390.940848569721040.1183028605579180.0591514302789592
1400.9107714377521510.1784571244956970.0892285622478486
1410.8883488876354940.2233022247290130.111651112364506
1420.8359634212343120.3280731575313770.164036578765688
1430.810676726777760.3786465464444790.18932327322224
1440.7694627949687750.461074410062450.230537205031225
1450.7024120676306270.5951758647387450.297587932369373
1460.7609546240953270.4780907518093470.239045375904673
1470.690524433790020.6189511324199590.309475566209979
1480.5464823390098510.9070353219802990.453517660990149
1490.3998907723050370.7997815446100730.600109227694963


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level920.657142857142857NOK
5% type I error level1020.728571428571429NOK
10% type I error level1110.792857142857143NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/102her1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/102her1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/1vyzf1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/1vyzf1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/268yi1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/268yi1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/368yi1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/368yi1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/468yi1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/468yi1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/568yi1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/568yi1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/6ghy31292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/6ghy31292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/7rqfo1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/7rqfo1292091237.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/8rqfo1292091237.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292091261h386v94umfj3alf/8rqfo1292091237.ps (open in new window)


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