Home » date » 2010 » Dec » 12 »

Paper - Multiple Regression Model 3

*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: Sun, 12 Dec 2010 20:06: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/12/t1292184421wqon04xjbehy69j.htm/, Retrieved Sun, 12 Dec 2010 21:07:01 +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/12/t1292184421wqon04xjbehy69j.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 «
25.94 23688100 39.18 3940.35 0,0274 144.7 28.66 13741000 35.78 4696.69 0,0322 140.8 33.95 14143500 42.54 4572.83 0,0376 137.1 31.01 16763800 27.92 3860.66 0,0307 137.7 21.00 16634600 25.05 3400.91 0,0319 144.7 26.19 13693300 32.03 3966.11 0,0373 139.2 25.41 10545800 27.95 3766.99 0,0366 143.0 30.47 9409900 27.95 4206.35 0,0341 140.8 12.88 39182200 24.15 3672.82 0,0345 142.5 9.78 37005800 27.57 3369.63 0,0345 135.8 8.25 15818500 22.97 2597.93 0,0345 132.6 7.44 16952000 17.37 2470.52 0,0339 128.6 10.81 24563400 24.45 2772.73 0,0373 115.7 9.12 14163200 23.62 2151.83 0,0353 109.2 11.03 18184800 21.90 1840.26 0,0292 116.9 12.74 20810300 27.12 2116.24 0,0327 109.9 9.98 12843000 27.70 2110.49 0,0362 116.1 11.62 13866700 29.23 2160.54 0,0325 118.9 9.40 15119200 26.50 2027.13 0,0272 116.3 9.27 8301600 22.84 1805.43 0,0272 114.0 7.76 14039600 20.49 1498.80 0,0265 97.0 8.78 12139700 23.28 1690.20 0,0213 85.3 10.65 9649000 25.71 1930.58 0,019 84.9 10.95 8513600 26.52 1950.40 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
Apple[t] = -135.237765758431 -6.92930786369107e-07Volume[t] + 4.08575435495335Microsoft[t] + 0.0273638855674244NASDAQ[t] + 28.4463862390989Inflatie[t] -0.491355185021774Consumentenvertrouwen[t] + 1.68889394426909t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-135.23776575843119.256258-7.023100
Volume-6.92930786369107e-070-2.58070.0110350.005517
Microsoft4.085754354953350.9182394.44961.9e-051e-05
NASDAQ0.02736388556742440.0065934.15066.1e-053.1e-05
Inflatie28.4463862390989207.3292570.13720.8910940.445547
Consumentenvertrouwen-0.4913551850217740.164581-2.98550.0034170.001708
t1.688893944269090.12781513.213600


Multiple Linear Regression - Regression Statistics
Multiple R0.940901818676937
R-squared0.885296232389568
Adjusted R-squared0.879700926652474
F-TEST (value)158.221243661534
F-TEST (DF numerator)6
F-TEST (DF denominator)123
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation26.5822933572503
Sum Squared Residuals86914.0533761022


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
125.9447.6203922582219-21.6803922582219
228.6665.0596023063397-36.3996023063397
333.9592.6716248524704-58.7216248524703
431.0112.832272027183018.177727972817
521-13.101319390954134.1013193909541
626.1937.4663893988560-11.2763893988560
725.4117.33064615737668.07935384262342
830.4732.8391023862361-2.36910238623609
912.88-17.051392596163929.9313925961639
109.78-4.8855009200421214.6655009200421
118.25-26.85411845883235.104118458832
127.44-50.36896570045357.808965700453
1310.81-10.322264853158921.1322648531589
149.12-18.671248877755527.7912488777555
1511.03-39.279266581436950.3092665814369
1612.74-6.9910908980362919.7310908980363
179.98-0.51585411096651310.4958541109665
1811.626.603407075879115.01659292412089
199.4-6.2535625183624615.6535625183625
209.27-19.730861088820529.0008610888205
217.76-31.676989287414339.4369892874143
228.78-6.4339593378862215.2139593378862
2310.6513.6180465968853-2.96804659688531
2410.9515.0797997489084-4.12979974890839
2512.365.817491442498876.54250855750113
2610.85-5.6608756257300216.51087562573
2711.84-1.1579893685493112.9979893685493
2812.14-16.664696391140228.8046963911402
2911.65-19.773910202616931.4239102026169
308.86-18.089492964816426.9494929648164
317.63-24.972823174038932.6028231740389
327.38-16.862410580395124.2424105803951
337.25-28.343099406179935.5930994061799
348.030.08131568327010457.9486843167299
357.7511.8036589582432-4.05365895824315
367.162.131475064891395.02852493510861
377.18-4.4801316097712611.6601316097713
387.516.727650337935770.782349662064226
397.0712.4367820767873-5.36678207678731
407.117.43757418992007-0.327574189920074
418.984.769303240825954.21069675917405
429.5316.3744418612400-6.84444186123995
4310.5428.0772063495220-17.5372063495220
4411.3130.725446620261-19.415446620261
4510.3637.0825160155296-26.7225160155296
4611.4434.2420336358629-22.8020336358629
4710.4531.1169909500695-20.6669909500695
4810.6940.1315113696156-29.4415113696156
4911.2838.4751533232602-27.1951533232602
5011.9642.2826132927211-30.3226132927211
5113.5231.8326786360434-18.3126786360434
5212.8935.259629669038-22.369629669038
5314.0343.5944494302591-29.5644494302591
5416.2746.5402216760989-30.2702216760989
5516.1740.5111138273433-24.3411138273433
5617.2542.8363813486232-25.5863813486232
5719.3848.1198247068595-28.7398247068595
5826.244.6840143182479-18.4840143182479
5933.5354.4380034285798-20.9080034285798
6032.256.4250522720303-24.2250522720303
6138.4536.48779634773071.96220365226932
6244.8639.50377884189865.35622115810142
6341.6748.3685744697666-6.6985744697666
6436.0648.5475104570991-12.4875104570991
6539.7661.4135448736617-21.6535448736617
6636.8160.0564435648387-23.2464435648387
6742.6569.5905745002651-26.9405745002651
6846.8979.0849905910029-32.1949905910029
6953.6179.1482637161787-25.5382637161787
7057.5972.9876114102866-15.3976114102866
7167.8285.266221488155-17.4462214881551
7271.8978.1972981016392-6.30729810163916
7375.5176.7302789767895-1.22027897678947
7468.4977.316888337418-8.82688833741798
7562.7279.699332293952-16.9793322939520
7670.3967.0359040801953.35409591980497
7759.7770.3599421976234-10.5899421976234
7857.2771.8560952064922-14.5860952064922
7967.9671.7868382480608-3.82683824806083
8067.8588.6540848664657-20.8040848664657
8176.9892.7301803877898-15.7501803877898
8281.08108.391300703363-27.3113007033626
8391.66114.188458660763-22.5284586607625
8484.84110.296851449950-25.4568514499504
8585.73104.350734924320-18.6207349243204
8684.61110.188713489727-25.578713489727
8792.91112.949089868605-20.0390898686052
8899.8127.392729892974-27.5927298929741
89121.19129.860861072444-8.67086107244447
90122.04120.6470730354361.39292696456383
91131.76113.99500680873317.7649931912669
92138.48122.65271571462815.8272842853720
93153.47132.35380516911821.1161948308820
94189.95170.91947617157919.0305238284211
95182.22152.87604846865429.3439515313457
96198.08170.81053163044427.2694683695564
97135.36134.1590858283341.20091417166599
98125.02128.555635844006-3.53563584400596
99143.5143.1760777692430.323922230757482
100173.95153.21761132340520.7323886765953
101188.75164.40937828547624.3406217145242
102167.44159.1174375154508.3225624845495
103158.95155.0416583042023.90834169579771
104169.53167.8323788531011.69762114689925
105113.66143.950282105205-30.2902821052049
106107.59113.235329365615-5.64532936561481
10792.67113.642695383806-20.9726953838057
10885.35123.989944613498-38.6399446134984
10990.13130.974377181877-40.8443771818768
11089.31120.472177510882-31.1621775108823
111105.12135.059086054011-29.9390860540109
112125.83145.887785291799-20.0577852917987
113135.81147.379933953111-11.5699339531111
114142.43162.308990108187-19.8789901081872
115163.39169.648983012293-6.2589830122933
116168.21176.682207970864-8.47220797086446
117185.35183.8980511466861.45194885331349
118188.5191.131141299836-2.63114129983579
119199.91206.809169694330-6.89916969433031
120210.73212.746708030587-2.01670803058705
121192.06192.292042209460-0.232042209459598
122204.62210.468276881728-5.84827688172815
123235217.32424956580617.6757504341937
124261.09221.42329022178839.6667097782118
125256.88188.25988764432368.6201123556772
126251.53182.31322622377869.2167737762222
127257.25201.54082370585155.7091762941487
128243.1197.05147071949046.0485292805096
129283.75208.59108258555675.1589174144439
130300.98222.18998118795378.7900188120467


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.005428209202962720.01085641840592540.994571790797037
110.001738268385343560.003476536770687120.998261731614656
120.0003109665136718610.0006219330273437210.999689033486328
135.4898665114721e-050.0001097973302294420.999945101334885
148.24731423065337e-061.64946284613067e-050.99999175268577
153.48021178413945e-066.9604235682789e-060.999996519788216
166.5098218503746e-071.30196437007492e-060.999999349017815
179.44775734450921e-081.88955146890184e-070.999999905522427
181.33959871420700e-082.67919742841401e-080.999999986604013
192.68598861490292e-095.37197722980584e-090.999999997314011
204.52707659987368e-109.05415319974736e-100.999999999547292
217.29223845531052e-111.45844769106210e-100.999999999927078
221.52945456502641e-113.05890913005282e-110.999999999984705
232.5994690514974e-125.1989381029948e-120.9999999999974
243.58468810580145e-137.16937621160289e-130.999999999999642
255.6868540859591e-141.13737081719182e-130.999999999999943
268.89300753640398e-151.77860150728080e-140.999999999999991
271.13982823153340e-152.27965646306679e-150.999999999999999
283.41838829187996e-166.83677658375993e-161
297.05618858216625e-171.41123771643325e-161
301.23281426045513e-172.46562852091026e-171
313.20614197983149e-186.41228395966298e-181
326.34801118139012e-191.26960223627802e-181
333.12590861838408e-196.25181723676815e-191
346.79359058775805e-201.35871811755161e-191
359.6644946698919e-211.93289893397838e-201
361.96741108510884e-213.93482217021768e-211
379.0852630009779e-221.81705260019558e-211
382.45209175571813e-224.90418351143626e-221
395.38007641860861e-231.07601528372172e-221
402.13677250264975e-234.27354500529951e-231
411.62113508714327e-233.24227017428654e-231
426.17574174941764e-241.23514834988353e-231
431.31780886717577e-242.63561773435153e-241
442.5077538906245e-255.015507781249e-251
454.50475081311511e-269.00950162623021e-261
466.33173149410331e-271.26634629882066e-261
471.52929662834931e-273.05859325669862e-271
482.91803770836957e-285.83607541673915e-281
493.58681374337469e-297.17362748674938e-291
504.45968245142462e-308.91936490284924e-301
512.65650716930689e-305.31301433861377e-301
521.15346424331286e-302.30692848662572e-301
532.67399041750040e-315.34798083500081e-311
542.22885435623873e-314.45770871247746e-311
552.56583727019362e-315.13167454038723e-311
562.51295391454472e-315.02590782908944e-311
573.7759965148776e-317.5519930297552e-311
587.3825146432475e-271.4765029286495e-261
592.59571621585752e-235.19143243171505e-231
601.18582991443131e-222.37165982886261e-221
611.27393107947317e-202.54786215894634e-201
629.48216155809739e-181.89643231161948e-171
636.38675315362945e-161.27735063072589e-151
644.63613489168704e-159.27226978337409e-150.999999999999995
651.88246492116587e-143.76492984233173e-140.999999999999981
662.97865426943172e-145.95730853886344e-140.99999999999997
674.53733488998584e-149.07466977997167e-140.999999999999955
681.09555451892583e-132.19110903785166e-130.99999999999989
691.40551626500403e-122.81103253000805e-120.999999999998594
703.76502071308424e-117.53004142616848e-110.99999999996235
718.08448944751627e-091.61689788950325e-080.99999999191551
721.96126509668405e-063.9225301933681e-060.999998038734903
733.33798002086457e-056.67596004172915e-050.999966620199791
740.0001141601830339200.0002283203660678400.999885839816966
759.3454411533818e-050.0001869088230676360.999906545588466
760.0001305361119808810.0002610722239617620.99986946388802
770.0001058726133123960.0002117452266247920.999894127386688
787.16496974121193e-050.0001432993948242390.999928350302588
790.0004244390118074410.0008488780236148810.999575560988193
800.001025022188403980.002050044376807960.998974977811596
810.004942543957747010.009885087915494020.995057456042253
820.01110371092321750.02220742184643490.988896289076783
830.02697910586627390.05395821173254780.973020894133726
840.02489733129856340.04979466259712670.975102668701437
850.02041647402300140.04083294804600280.979583525976999
860.01670110644208080.03340221288416170.98329889355792
870.01812710046108450.03625420092216910.981872899538915
880.02514050524539910.05028101049079820.9748594947546
890.06521375651295390.1304275130259080.934786243487046
900.1558047841481020.3116095682962040.844195215851898
910.2472781728089530.4945563456179060.752721827191047
920.424571399544460.849142799088920.57542860045554
930.7997868020983550.4004263958032890.200213197901645
940.9424037434280670.1151925131438670.0575962565719334
950.9726544236069450.05469115278610960.0273455763930548
960.9995605505469580.0008788989060842940.000439449453042147
970.99918791284190.001624174316201990.000812087158100996
980.9991065703195840.001786859360832320.000893429680416161
990.9986736601232860.002652679753427770.00132633987671389
1000.9991671053085050.001665789382990720.00083289469149536
1010.999466065894130.001067868211741160.000533934105870582
1020.999890014703330.0002199705933417990.000109985296670900
1030.999787182644330.0004256347113398540.000212817355669927
1040.9999831694406373.3661118726436e-051.6830559363218e-05
1050.9999665956559986.68086880032113e-053.34043440016057e-05
1060.9999288884718020.0001422230563967427.1111528198371e-05
1070.9998834785106130.0002330429787737380.000116521489386869
1080.9997865285811030.0004269428377945880.000213471418897294
1090.999477388100390.001045223799220080.000522611899610041
1100.998885196250760.002229607498479680.00111480374923984
1110.997945483748880.004109032502238140.00205451625111907
1120.9974293439447860.005141312110427530.00257065605521377
1130.9954747685179760.009050462964047860.00452523148202393
1140.9901940224462310.01961195510753710.00980597755376856
1150.98151618206340.03696763587320040.0184838179366002
1160.9658840460204870.06823190795902590.0341159539795130
1170.9854206626840920.02915867463181680.0145793373159084
1180.9963886498345450.007222700330910910.00361135016545546
1190.9883829426192110.02323411476157780.0116170573807889
1200.9966707912841250.006658417431750160.00332920871587508


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level910.81981981981982NOK
5% type I error level1010.90990990990991NOK
10% type I error level1050.945945945945946NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/10z1v31292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/10z1v31292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/1a0yr1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/1a0yr1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/2layc1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/2layc1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/3layc1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/3layc1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/4layc1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/4layc1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/5djff1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/5djff1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/6djff1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/6djff1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/7oaei1292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/7oaei1292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/8z1v31292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/8z1v31292184357.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/9z1v31292184357.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/12/t1292184421wqon04xjbehy69j/9z1v31292184357.ps (open in new window)


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