Home » date » 2008 » Jan » 20 » attachments

Goldfeld-Quandt

R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sun, 20 Jan 2008 06:56:54 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb.htm/, Retrieved Sun, 20 Jan 2008 14:56:00 +0100
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
106 87 1 65.3 170 2.2 70 1 65.73 165 62.3 75 1 69.44 168 14.7 79 1 73.74 170 5 64.5 1 74.31 157 74.4 75 0 70.53 146 66.1 70 0 69.42 149 22 67 1 69.77 159 3.4 52 0 65.47 151 0.3 67.2 1 66.2 174 53.2 47 0 70.46 156 0 46.4 0 74.44 151.5 57.2 76 0 69.28 146 9.2 71.6 1 67.67 157 15.9 63.8 1 67.22 171.5 17.6 48.2 1 64.85 150 21 64.5 1 71.35 170 7.6 75.9 1 72.28 164.5 71.6 80 1 71.87 163 12.9 56 1 67.34 162.5 10.5 75.5 0 73.5 161 25.7 77 1 64.91 166.5 26.8 88 0 68.13 160 7.3 48 0 72.5 147 17.1 73 1 72.36 162.5 27.3 72 1 70.59 161 16.5 64 1 74.76 163.5 5.4 76 0 65.63 161 5.6 67.4 1 67.04 172.5 36.5 73.7 1 66.72 169.5 1.1 59.2 0 65.8 158 3.9 53 0 72.44 153.5 34.2 41.9 1 71.83 165.5 40.3 65.5 1 72.67 153.5 15.6 63 1 69.56 157.5 15.5 54 0 67 145.5 52.9 77.7 0 68.86 156 1.6 47.6 0 71.25 163 14.2 53.1 1 69.88 159 7.5 55.5 1 67.18 167 2 64 1 67.47 157.5 71.4 75.6 1 73.2 156 3.2 57 0 69.6 156.5 20 63 0 71.24 148.5 2.8 59.5 1 73.83 162.5 15.3 84.5 1 66.07 164 8 59.9 0 70.68 152 36.6 60 1 74.01 157.5 3.8 64 0 68.53 148 25.5 54 0 66.72 145.5 3.2 53.8 0 72.69 154.5 33.1 84 1 67.46 166.5 42 63.2 0 73.81 157 16.2 54.3 1 72.96 150 0 60 0 71.65 152 22.7 68 1 72.79 171 36.4 74 1 73.83 165.5 69 74 1 66.74 165 11.2 68.5 1 65.62 168.5 12.5 76 0 66.18 154 51.7 83 0 67.78 156.5 3.6 62.5 0 68.84 152 22.2 57 1 65.27 164.5 39.2 85 1 72.84 161 27.9 50 1 75.36 162 58.8 53 1 76.88 169 1 57 0 76.51 150 4.7 46 1 80.63 146 25.6 65.4 1 75.27 165 5.3 71.4 1 81.19 165.5 38.7 41 1 81.3 164 31.6 66 1 77.77 163 19.3 69.5 1 75.51 167.5 26.5 59 1 78.64 166 12.8 80 1 80.68 167.5 18.3 72 1 77.4 162 13.2 73 0 80.71 165 36 66.4 0 83.16 145 34.1 37 0 87.99 139 71.5 70 1 72.21 164 43.3 75 1 70.24 167 47.7 54 1 66.06 163 74.9 76.2 1 68.67 162.5 0.9 74.9 1 68.77 159.5 35.9 98 1 68.07 169 45.8 86.5 0 67.33 152.5 54.2 72.8 1 69.47 165 34 65 1 70.81 166 7.9 50 1 73.17 163 54.5 81 1 71.28 167.5 8.2 52 0 69.47 157.5 49.3 68 1 65.31 160 46.9 58.5 1 70.23 162 16.8 65.5 1 73.23 164.5 2.8 62.5 0 68.67 150 60.9 64 1 72.66 167 5.6 55.7 0 74.79 155 6.6 84 1 73.04 173.5 22.9 63.7 1 69.95 173 51.1 65 0 67.51 156 23.3 87.5 0 67.5 149.5 11.5 79 1 71.32 167 79.1 58.5 0 71.23 146 53.6 75 1 67.49 166 1.5 52.5 0 68.62 151.5 40.4 57.5 1 72.53 164 25.4 70 1 66.67 160 6.7 72 1 66.19 152.5 76 88 1 78.4 160 0.6 58 1 75.67 163 43.4 73 1 76.07 168 13 56 1 82.88 165.5 27.8 49 0 77.14 147 6.5 54.7 0 77.31 158 7.1 67 1 76.58 168 6 47 0 82.86 154.5 6.5 47 0 76.64 147
 
Text written by user:
 
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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 61.5198389564683 + 0.716989169203628weight[t] + 10.0572486368982sex[t] + 0.119109062022990age[t] -0.608987531164764`height `[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)61.519838956468366.9729040.91860.360290.180145
weight0.7169891692036280.1869783.83460.0002080.000104
sex10.05724863689825.8828871.70960.0901130.045057
age0.1191090620229900.4453980.26740.7896370.394818
`height `-0.6089875311647640.380946-1.59860.1127230.056362


Multiple Linear Regression - Regression Statistics
Multiple R0.378964915955848
R-squared0.143614407525423
Adjusted R-squared0.113029207794188
F-TEST (value)4.69555238440237
F-TEST (DF numerator)4
F-TEST (DF denominator)112
p-value0.00153379659481434
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation21.6102713221872
Sum Squared Residuals52304.4285812773


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110638.205086766173567.7949132338265
22.229.1124254422055-26.9124254422055
362.331.312303314834630.9876966851654
414.733.4744538960185-18.7744538960185
5531.0628410130609-26.0628410130609
674.434.782609241166339.6173907588337
766.129.238489742808336.8615102571917
82231.0965837321561-9.09658373215608
93.414.6442288398227-11.2442288398227
100.321.6799492471033-21.3799492471033
1153.28.6086995574754444.5913004425246
12011.3930040130462-11.3930040130462
1357.235.350712082841221.8492879171588
149.235.362579942574-26.162579942574
1515.920.8861461429863-4.98614614298629
1617.622.5120585464576-4.91205854645763
172122.7934402843309-1.79344028433093
187.634.4273196623399-26.8273196623399
1971.638.231621837392533.3683781626075
2012.920.7888114911236-7.88881149112362
2110.526.3600447725049-15.8600447725049
2225.733.1201988990249-7.4201988990249
2326.835.2917812556516-8.49178125565158
247.315.0495589936888-7.74955899368884
2517.133.5755548589407-16.4755548589407
2627.333.5612239467035-6.26122394670354
2716.526.7995265537985-10.2995265537985
285.425.7811510389858-20.3811510389858
295.622.8368799897905-17.2368799897905
3036.529.14275944942027.35724055057975
311.115.5829441304030-14.4829441304030
323.914.6689393434146-10.7689393434146
3334.29.387101300341424.8128986996586
3440.333.71594767962356.58405232037649
3515.629.1170954490639-13.5170954490639
3615.519.6098754645313-4.10987546453131
3752.930.429692552790022.4703074472100
381.64.87007649984242-3.27007649984242
3914.221.1435362770482-6.94353627704817
407.517.6708155663567-10.1708155663567
41229.5851466786395-27.5851466786395
4271.439.498197263540431.9018027364596
433.215.3716636905896-12.1716636905896
442024.7408378168471-4.74083781684715
452.824.0712913958655-21.2712913958655
4615.340.1582530079107-24.8582530079107
47820.3200139585064-12.3200139585064
4836.627.49616326745539.1038367325447
493.825.4395351935509-21.6395351935509
5025.519.57652492716495.92347507283513
513.214.6633204131185-11.4633204131185
5233.138.4428511916089-5.34285119160892
534220.013951925186521.9860480748135
5416.227.8516669716062-11.6516669716062
55020.5072486655890-20.5072486655890
5622.724.8654318946920-2.16543189469197
5736.432.64067175582393.75932824417615
586932.100682271663236.8993177283368
5911.225.8923833325009-14.6923833325009
6012.530.1095737412518-17.6095737412518
6151.733.796603597002117.9033964029979
623.621.9650251243135-18.3650251243135
6322.220.04126983961012.15873016038987
6439.243.1500785359024-3.95007853590244
6527.917.746624918908610.1533750810914
6658.815.815725482641142.9842745173589
67120.1531262617394-19.1531262617394
684.725.2501734975915-20.5501734975915
6925.626.9505757155681-1.35057571556814
705.331.6531426123836-26.3531426123836
7138.710.78325516216327.916744837837
7231.628.89651693447732.70348306552269
7319.328.3963486562766-9.09634865627662
7426.522.15425504051764.34574495948237
7512.836.5405287835736-23.7405287835736
7618.333.7633691279153-15.4633691279153
7713.222.9903980620225-9.79039806202254
783630.72983737053025.27016262946979
7934.113.879577752503220.2204222474968
8071.530.493239695279241.0067603047208
8143.332.016578095617811.2834219043822
8247.718.897879787744628.8021202122554
8374.935.430407761527539.4695922384725
840.936.3371953412594-35.4371953412594
8535.947.0308872603818-11.1308872603818
8645.838.68841673596357.11158326403653
8754.231.565463007941622.6345369920584
883425.52356610009948.47643389990062
897.916.8767885419135-8.97678854191351
9054.536.137892769761118.3621072302389
918.211.1622461353437-2.96224613534367
9249.330.673358953572418.6266410464276
9346.923.230003368961523.6699966310385
9416.827.0837859115440-10.2837859115440
952.823.1627516460991-20.3627516460991
9660.924.417941164473536.4820588355265
975.615.9712350992713-10.3712350992713
986.634.8445670395439-28.2445670395439
9922.920.22613366864152.67386633135845
10051.121.163132870172929.9368671298271
10123.341.2526170392053-17.9526170392053
10211.535.0131725594171-23.5131725594171
10379.123.035664292722556.0643357072775
10453.632.298015706219321.3019842937807
1051.515.0734232042145-13.5734232042145
10640.421.568989980081218.8310100199188
10725.432.2693256163309-6.86932561633093
1086.738.2135380887029-31.5135380887029
1097646.572279959525929.4277200404741
1100.622.9104745506-22.3104745506
11143.430.668018057639812.7319819423602
1121320.8128037214666-7.8128037214666
11327.816.319214210679111.4807857893209
1146.513.7274381728713-7.22743817287133
1157.126.4268286640498-19.3268286640498
116610.9991332233077-4.99913322330766
1176.514.8256813412604-8.32568134126039


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.8622349919992030.2755300160015940.137765008000797
90.7873390110136640.4253219779726730.212660988986336
100.6817775426588840.6364449146822320.318222457341116
110.978632314691060.04273537061788140.0213676853089407
120.9640280322815730.07194393543685480.0359719677184274
130.9615333751342360.07693324973152890.0384666248657645
140.9446293300403980.1107413399192050.0553706699596024
150.9146362582948150.1707274834103710.0853637417051854
160.9545313580883720.0909372838232570.0454686419116285
170.9343328529178230.1313342941643530.0656671470821766
180.9343949656642840.1312100686714330.0656050343357163
190.9578525118714460.08429497625710830.0421474881285542
200.9414408336275180.1171183327449640.0585591663724820
210.9702323273670220.05953534526595690.0297676726329784
220.9648547056503230.07029058869935470.0351452943496773
230.979106900447650.04178619910469920.0208930995523496
240.969770572297730.0604588554045390.0302294277022695
250.9602273303525870.07954533929482690.0397726696474134
260.9441196584500460.1117606830999070.0558803415499537
270.9260818434490170.1478363131019660.0739181565509829
280.9462340761685420.1075318476629150.0537659238314577
290.9337204833667190.1325590332665620.0662795166332812
300.9149595709685710.1700808580628580.0850404290314289
310.9026190721558240.1947618556883510.0973809278441757
320.8769336562317530.2461326875364930.123066343768247
330.9210283839656440.1579432320687130.0789716160343564
340.8987374724686650.2025250550626710.101262527531335
350.8793441977051430.2413116045897140.120655802294857
360.849818247184610.3003635056307780.150181752815389
370.8413530990673470.3172938018653070.158646900932653
380.8042282185279010.3915435629441980.195771781472099
390.765110241687630.4697795166247410.234889758312371
400.7278809042233980.5442381915532040.272119095776602
410.752167370001990.4956652599960210.247832629998011
420.7973610677495870.4052778645008250.202638932250412
430.7697836611456040.4604326777087920.230216338854396
440.7301682443275860.5396635113448290.269831755672414
450.7219708896950190.5560582206099620.278029110304981
460.743155584306750.51368883138650.25684441569325
470.7140284637885510.5719430724228970.285971536211448
480.6770036040210660.6459927919578680.322996395978934
490.6831586486153710.6336827027692570.316841351384629
500.6356069912365870.7287860175268260.364393008763413
510.5988578969098140.8022842061803720.401142103090186
520.5484342085502990.9031315828994020.451565791449701
530.545927871483970.908144257032060.45407212851603
540.5095266902882650.980946619423470.490473309711735
550.5090735690888140.9818528618223730.490926430911187
560.4567116016149610.9134232032299220.543288398385039
570.4042020996565030.8084041993130060.595797900343497
580.5029373059424020.9941253881151970.497062694057598
590.4819014126201350.963802825240270.518098587379865
600.4722317229706520.9444634459413040.527768277029348
610.4525838693614590.9051677387229180.547416130638541
620.4441167291109720.8882334582219440.555883270889028
630.4058343745643160.8116687491286330.594165625435684
640.3572420739630870.7144841479261750.642757926036913
650.3214013230502070.6428026461004140.678598676949793
660.4532365374251050.906473074850210.546763462574895
670.4495309872058680.8990619744117360.550469012794132
680.4671233779575820.9342467559151640.532876622042418
690.4129605554733280.8259211109466550.587039444526672
700.433812858194880.867625716389760.56618714180512
710.4550531139497960.9101062278995930.544946886050204
720.3997222314978420.7994444629956840.600277768502158
730.3558103179986030.7116206359972060.644189682001397
740.3051734627514100.6103469255028190.69482653724859
750.3058760529062130.6117521058124270.694123947093787
760.2855313004612590.5710626009225180.714468699538741
770.2425512212084850.4851024424169710.757448778791515
780.201772071374450.40354414274890.79822792862555
790.1895305745132000.3790611490263990.8104694254868
800.2843346298850410.5686692597700820.715665370114959
810.2450802220366360.4901604440732720.754919777963364
820.2540175961880380.5080351923760770.745982403811962
830.3553865518170940.7107731036341890.644613448182906
840.4611448912979710.9222897825959420.538855108702029
850.4161674151946460.8323348303892920.583832584805354
860.3594706862844520.7189413725689040.640529313715548
870.3508260602021940.7016521204043880.649173939797806
880.2984440143248570.5968880286497140.701555985675143
890.2580746610533810.5161493221067610.74192533894662
900.2434090439762590.4868180879525180.756590956023741
910.1952699191650920.3905398383301840.804730080834908
920.1712074195841050.3424148391682100.828792580415895
930.1690359756560480.3380719513120960.830964024343952
940.1343044171550740.2686088343101490.865695582844926
950.1307790327906590.2615580655813180.86922096720934
960.2140137049962880.4280274099925760.785986295003712
970.1779072736996780.3558145473993570.822092726300322
980.1918221971373840.3836443942747680.808177802862616
990.1443547299406130.2887094598812270.855645270059387
1000.1687678961452010.3375357922904020.831232103854799
1010.2306206924403670.4612413848807340.769379307559633
1020.2828329059374960.5656658118749920.717167094062504
1030.7019220772633870.5961558454732250.298077922736613
1040.7114726470152940.5770547059694130.288527352984706
1050.6086752738429690.7826494523140620.391324726157031
1060.894161389820040.2116772203599190.105838610179960
1070.9024162264764630.1951675470470740.0975837735235371
1080.8976952515945040.2046094968109910.102304748405496
1090.9248997178752190.1502005642495620.0751002821247811


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0196078431372549OK
10% type I error level100.0980392156862745OK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/10blg31200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/10blg31200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/1r58v1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/1r58v1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/2xchl1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/2xchl1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/3vc5l1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/3vc5l1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/484pt1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/484pt1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/5wldi1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/5wldi1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/6f8hu1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/6f8hu1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/7wm4d1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/7wm4d1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/8nq3e1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/8nq3e1200837407.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/9eh0a1200837407.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Jan/20/t1200837348nrvfakk5mq2iczb/9eh0a1200837407.ps (open in new window)


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