Home » date » 2010 » Dec » 11 »

Paper - Multiple Regression Model 1

*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 16:09:46 +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/t1292084100k9c0exbdndi8buy.htm/, Retrieved Sat, 11 Dec 2010 17:17:13 +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/t1292084100k9c0exbdndi8buy.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 5,45 28.66 13741000 35.78 4696.69 0,0322 140.8 5,73 33.95 14143500 42.54 4572.83 0,0376 137.1 5,85 31.01 16763800 27.92 3860.66 0,0307 137.7 6,02 21.00 16634600 25.05 3400.91 0,0319 144.7 6,27 26.19 13693300 32.03 3966.11 0,0373 139.2 6,53 25.41 10545800 27.95 3766.99 0,0366 143.0 6,54 30.47 9409900 27.95 4206.35 0,0341 140.8 6,5 12.88 39182200 24.15 3672.82 0,0345 142.5 6,52 9.78 37005800 27.57 3369.63 0,0345 135.8 6,51 8.25 15818500 22.97 2597.93 0,0345 132.6 6,51 7.44 16952000 17.37 2470.52 0,0339 128.6 6,4 10.81 24563400 24.45 2772.73 0,0373 115.7 5,98 9.12 14163200 23.62 2151.83 0,0353 109.2 5,49 11.03 18184800 21.90 1840.26 0,0292 116.9 5,31 12.74 20810300 27.12 2116.24 0,0327 109.9 4,8 9.98 12843000 27.70 2110.49 0,0362 116.1 4,21 11.62 13866700 29.23 2160.54 0,0325 118.9 3,97 9.40 15119200 26.50 2027.13 0,0272 116.3 3,77 9.27 8301600 22.84 1805.43 0,0272 114.0 3,65 7.76 14039600 20.49 1498.80 0,0265 97.0 3,07 8.78 1213 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 time9 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Apple[t] = + 23.0147069811754 + 1.24781152025288e-06Volume[t] + 6.92603621715411Microsoft[t] + 0.0288863890196798NASDAQ[t] -605.881541364844Inflatie[t] -2.26245296320921Consumentenvertrouwen[t] + 3.36290179952850Federal_funds_rate[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)23.014706981175429.4011980.78280.435260.21763
Volume1.24781152025288e-0603.2880.0013160.000658
Microsoft6.926036217154111.3982254.95352e-061e-06
NASDAQ0.02888638901967980.0107812.67930.0083880.004194
Inflatie-605.881541364844320.051667-1.89310.0606980.030349
Consumentenvertrouwen-2.262452963209210.264611-8.550100
Federal_funds_rate3.362901799528504.0164630.83730.4040590.20203


Multiple Linear Regression - Regression Statistics
Multiple R0.85090925788459
R-squared0.724046565153704
Adjusted R-squared0.71058542199047
F-TEST (value)53.787895751029
F-TEST (DF numerator)6
F-TEST (DF denominator)123
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation41.230775839512
Sum Squared Residuals209097.155788354


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
125.94112.107289813531-86.167289813531
228.66104.851539835078-76.191539835078
333.95154.098784512411-120.148784512411
431.0138.9325600394035-7.92256003940354
521-10.110401646263731.1104016462637
626.1960.935815641033-34.7458156410331
725.4114.858668170205610.5513318297944
830.4732.4903872445281-2.02038724452809
912.8823.8886487920865-11.0086487920865
109.7851.2266972107048-41.4466972107048
118.25-22.122603335475430.3726033354754
127.44-54.131005038621561.5710050386215
1310.8138.8459068386761-28.0359068386761
149.1216.4541339250055-7.33413392500552
1511.03-13.770914523812724.8009145238127
1612.7445.6326947477349-32.8926947477349
179.9821.4101044631145-11.4301044631144
1811.6229.8298852732554-18.2098852732554
199.417.0519266840979-7.65192668409787
209.27-18.408464537387527.6784645373875
217.760.5531938001923267.20680619980767
228.7850.705773238009-41.925773238009
2310.6572.3251752953616-61.6751752953616
2410.9556.3578358273064-45.4078358273064
2512.3652.2727176696082-39.9127176696082
2610.8538.2892794234369-27.4392794234369
2711.842.07387610056119.7661238994389
2812.14-19.273714027218331.4137140272183
2911.65-27.126985424663338.7769854246633
308.86-4.1300614066896512.9900614066896
317.63-11.883917496801419.5139174968014
327.38-10.9361262623418.31612626234
337.25-24.788377788058532.0383777880585
348.0336.5906476378518-28.5606476378518
357.7535.1653652103447-27.4153652103447
367.1622.1719225461455-15.0119225461455
377.1816.4556029585752-9.27560295857524
387.5143.2052415736729-35.6952415736729
397.0752.5524889793364-45.4824889793364
407.1132.5745960284295-25.4645960284295
418.9832.4132598271319-23.4332598271319
429.5328.4163724064607-18.8863724064607
4310.5447.6190898599333-37.0790898599333
4411.3138.0705951634602-26.7605951634602
4510.3656.3762006163700-46.01620061637
4611.4445.3650111959884-33.9250111959884
4710.4518.7004367711592-8.25043677115923
4810.6929.8586312706496-19.1686312706496
4911.2829.0726853240445-17.7926853240445
5011.9635.6482024961838-23.6882024961838
5113.5235.9881554657129-22.4681554657129
5212.8923.7105218869591-10.8205218869591
5314.0313.56012935300610.469870646993944
5416.2711.27378455318284.99621544681723
5516.174.9749414258126711.1950585741873
5617.2511.75475614793365.49524385206644
5719.3821.3824388850511-2.00243888505107
5826.249.2918057854151-23.0918057854151
5933.5366.1151775542645-32.5851775542645
6032.241.0096266626957-8.80962666269573
6138.4559.8638894332298-21.4138894332298
6244.8645.9330704932263-1.07307049322628
6341.6720.119783784942021.5502162150580
6436.0647.3383881719415-11.2783881719415
6539.7633.11416354465816.6458364553419
6636.8117.168051103904119.6419488960959
6742.6528.406637292985914.2433627070141
6846.8928.008384453744618.8816155462554
6953.6160.7097258028333-7.09972580283328
7057.5981.6255742932287-24.0355742932287
7167.8262.65083448167645.16916551832363
7271.8939.725162261162932.1648377388371
7375.5167.23631043867348.27368956132659
7468.4967.48224517806281.00775482193724
7562.7261.78647072898080.933529271019213
7670.3938.671848450555931.7181515494441
7759.7719.044182169692740.7258178303073
7857.2723.619562885450933.6504371145491
7967.9628.174804771240139.7851952287599
8067.8554.174002039049813.6759979609502
8176.9869.24586888797077.73413111202934
8281.0877.22351043858213.85648956141791
8391.6680.476181186360911.1838188136391
8484.8477.9632038546146.876796145386
8585.73110.610419358969-24.880419358969
8684.6160.124243941014524.4857560589855
8792.9162.069519170257230.8404808297428
8899.881.865252040329917.9347479596701
89121.1990.364895701761430.8251042982386
90122.04103.68534773284018.3546522671601
91131.7688.917786179344542.8422138206555
92138.4899.325035219819739.1549647801803
93153.47117.51809546874735.9519045312526
94189.95170.30383904635519.6461609536450
95182.22167.03726409239615.1827359076045
96198.08155.57988788639242.5001121136085
97135.36170.210572672005-34.8505726720047
98125.02137.309333586984-12.2893335869840
99143.5162.695137803889-19.1951378038885
100173.95170.4034055028993.5465944971014
101188.75174.30334456779614.4466554322042
102167.44174.733135116124-7.29313511612399
103158.95155.6162683624223.33373163757773
104169.53141.94297242611327.5870275738871
105113.66150.923166132943-37.263166132943
106107.59196.551523085261-88.9615230852614
10792.67150.733153409489-58.0631534094887
10885.35152.302181993855-66.9521819938553
10990.13212.101808696183-121.971808696183
11089.31146.813987310572-57.5039873105722
111105.12164.206110512103-59.0861105121028
112125.83146.642303239864-20.8123032398636
113135.81121.05825360141114.7517463985887
114142.43160.054954981629-17.6249549816289
115163.39167.191619488664-3.80161948866433
116168.21151.7406075031716.4693924968301
117185.35167.87775143381717.4722485661826
118188.5188.3815412439850.118458756015183
119199.91179.06469157632520.8453084236754
120210.73181.82393306845628.9060669315444
121192.06171.37974587549720.6802541245032
122204.62192.0810274053212.5389725946801
123235184.56088084608850.4391191539116
124261.09186.25924724348774.8307527565126
125256.88153.55716533577103.322834664230
126251.53148.082028962810103.447971037190
127257.25176.76591864290580.4840813570952
128243.1139.224251011955103.875748988045
129283.75170.344051583193113.405948416807
130300.98186.482473148243114.497526851757


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
100.002657875141482790.005315750282965590.997342124858517
110.0007859504652557260.001571900930511450.999214049534744
129.45105180145493e-050.0001890210360290990.999905489481985
131.65499756536042e-053.30999513072084e-050.999983450024346
141.86935219100851e-063.73870438201703e-060.99999813064781
153.60583871968644e-077.21167743937287e-070.999999639416128
164.51245599911661e-089.02491199823323e-080.99999995487544
176.0142966730951e-091.20285933461902e-080.999999993985703
186.65214944748358e-101.33042988949672e-090.999999999334785
191.11340835863573e-102.22681671727147e-100.99999999988866
201.38933705726805e-112.77867411453610e-110.999999999986107
211.46353595036417e-122.92707190072834e-120.999999999998537
222.55232757362905e-135.1046551472581e-130.999999999999745
235.67539247561588e-141.13507849512318e-130.999999999999943
241.12154246086377e-142.24308492172753e-140.999999999999989
251.49975328372772e-152.99950656745545e-150.999999999999998
261.66673847794097e-163.33347695588194e-161
271.54821804800823e-173.09643609601646e-171
282.36151854034228e-184.72303708068457e-181
292.72597295534779e-195.45194591069557e-191
302.90652269543322e-205.81304539086644e-201
314.43332188901885e-218.86664377803771e-211
326.41793414546555e-221.28358682909311e-211
332.61909393137559e-225.23818786275119e-221
343.34591276978108e-236.69182553956215e-231
353.26179967193763e-246.52359934387525e-241
364.48720590291242e-258.97441180582483e-251
371.18226771299603e-252.36453542599206e-251
381.69337869303771e-263.38675738607542e-261
392.01653258482605e-274.03306516965210e-271
403.05942245766981e-286.11884491533963e-281
415.34545332063736e-291.06909066412747e-281
425.83822448945639e-301.16764489789128e-291
435.32259377760811e-311.06451875552162e-301
445.05011635935353e-321.01002327187071e-311
455.14853638251029e-331.02970727650206e-321
468.3454270485772e-341.66908540971544e-331
471.92184844952564e-343.84369689905129e-341
486.70367926551195e-351.34073585310239e-341
491.87011578771349e-353.74023157542698e-351
501.17086367664616e-352.34172735329232e-351
512.42784048076936e-354.85568096153871e-351
521.00715687718142e-352.01431375436284e-351
534.62677177348697e-369.25354354697393e-361
545.29022967865568e-361.05804593573114e-351
552.62044385831133e-365.24088771662265e-361
562.51212896350387e-365.02425792700773e-361
571.40648584224928e-352.81297168449856e-351
587.9365911398017e-311.58731822796034e-301
592.26827449967408e-264.53654899934817e-261
605.94742554854412e-241.18948510970882e-231
613.24116233171389e-226.48232466342778e-221
629.25530905943946e-201.85106181188789e-191
631.29065878887416e-172.58131757774832e-171
641.30666398916899e-172.61332797833798e-171
657.02459226681049e-161.40491845336210e-151
661.9353374864287e-143.8706749728574e-140.99999999999998
673.45197915025787e-126.90395830051573e-120.999999999996548
681.54218957709823e-103.08437915419646e-100.999999999845781
691.88504878956779e-093.77009757913558e-090.999999998114951
707.5323736796553e-091.50647473593106e-080.999999992467626
718.85397858636577e-071.77079571727315e-060.999999114602141
723.43206090658253e-056.86412181316506e-050.999965679390934
730.0001048718345372490.0002097436690744980.999895128165463
740.0002103437443258370.0004206874886516750.999789656255674
750.0006321732608463020.001264346521692600.999367826739154
760.001709531474521440.003419062949042880.998290468525479
770.001754291918333090.003508583836666170.998245708081667
780.001386375286355950.002772750572711900.998613624713644
790.002949281412684020.005898562825368040.997050718587316
800.005190320020526010.01038064004105200.994809679979474
810.01288188659842620.02576377319685240.987118113401574
820.02729541547244960.05459083094489910.97270458452755
830.04751136450007730.09502272900015470.952488635499923
840.04684056942232270.09368113884464550.953159430577677
850.04278531358583190.08557062717166380.957214686414168
860.04837484807494660.09674969614989310.951625151925053
870.06382269053728580.1276453810745720.936177309462714
880.08232921017130350.1646584203426070.917670789828697
890.1336010971953620.2672021943907240.866398902804638
900.1455352903153990.2910705806307970.854464709684601
910.1650179667430530.3300359334861060.834982033256947
920.1949021075425460.3898042150850920.805097892457454
930.2806722255734130.5613444511468260.719327774426587
940.4253612438155840.8507224876311680.574638756184416
950.4792452823016440.9584905646032890.520754717698356
960.9139367172063970.1721265655872060.086063282793603
970.9774610769132310.04507784617353790.0225389230867690
980.97080420522440.05839158955120160.0291957947756008
990.9849020997103350.03019580057933010.0150979002896650
1000.987810916790960.02437816641807960.0121890832090398
1010.9890667687924050.02186646241519100.0109332312075955
1020.9912652879034310.01746942419313710.00873471209656855
1030.9890085639000150.02198287219996970.0109914360999849
1040.9862042919384160.02759141612316840.0137957080615842
1050.9843856038369560.03122879232608750.0156143961630438
1060.9888594467059860.02228110658802700.0111405532940135
1070.9865827636822810.02683447263543730.0134172363177186
1080.9919899463096480.01602010738070350.00801005369035176
1090.9884001817758450.02319963644830950.0115998182241548
1100.9792738543483040.04145229130339240.0207261456516962
1110.9647858094482220.07042838110355670.0352141905517784
1120.9690313559891440.06193728802171290.0309686440108564
1130.9769854491996510.04602910160069720.0230145508003486
1140.9790086634600440.04198267307991180.0209913365399559
1150.9880080173345690.02398396533086220.0119919826654311
1160.98568487152580.02863025694840030.0143151284742001
1170.997777066120660.004445867758678530.00222293387933927
1180.99941332315240.001173353695198480.000586676847599239
1190.9975078917169750.004984216566049460.00249210828302473
1200.99951715744550.0009656851090013740.000482842554500687


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level740.666666666666667NOK
5% type I error level930.837837837837838NOK
10% type I error level1010.90990990990991NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/102ypv1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/102ypv1292083775.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/2569m1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/2569m1292083775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/3569m1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/3569m1292083775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/4569m1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/4569m1292083775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/5yxr71292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/5yxr71292083775.ps (open in new window)


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


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/796qa1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/796qa1292083775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/896qa1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/896qa1292083775.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/92ypv1292083775.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/11/t1292084100k9c0exbdndi8buy/92ypv1292083775.ps (open in new window)


 
Parameters (Session):
 
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