Home » date » 2010 » Dec » 14 »

Apple Inc - Multiple regression model 6

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 14 Dec 2010 11:31:30 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik.htm/, Retrieved Tue, 14 Dec 2010 12:32:56 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik.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 «
10.81 -0,2643 0 0 24563400 24.45 115.7 9.12 -0,2643 0 0 14163200 23.62 109.2 11.03 -0,2643 0 0 18184800 21.90 116.9 12.74 -0,1918 0 0 20810300 27.12 109.9 9.98 -0,1918 0 0 12843000 27.70 116.1 11.62 -0,1918 0 0 13866700 29.23 118.9 9.40 -0,2246 0 0 15119200 26.50 116.3 9.27 -0,2246 0 0 8301600 22.84 114.0 7.76 -0,2246 0 0 14039600 20.49 97.0 8.78 0,3654 0 0 12139700 23.28 85.3 10.65 0,3654 0 0 9649000 25.71 84.9 10.95 0,3654 0 0 8513600 26.52 94.6 12.36 0,0447 0 0 15278600 25.51 97.8 10.85 0,0447 0 0 15590900 23.36 95.0 11.84 0,0447 0 0 9691100 24.15 110.7 12.14 -0,0312 0 0 10882700 20.92 108.5 11.65 -0,0312 0 0 10294800 20.38 110.3 8.86 -0,0312 0 0 16031900 21.90 106.3 7.63 -0,0048 0 0 13683600 19.21 97.4 7.38 -0,0048 0 0 8677200 19.65 94.5 7.25 -0,0048 0 0 9874100 17.51 93.7 8.03 0,0705 0 0 10725500 21.41 79.6 7.75 0,0705 0 0 8348400 23.09 84.9 7.16 0,0705 0 0 8046200 20.70 80.7 7.18 -0,0134 0 0 10862300 19.00 78.8 7.51 -0,0134 0 0 8100300 19.04 64.8 7.07 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 time6 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
APPLE[t] = -127.447605621375 -31.2727304377682REV.GROWTH[t] + 63.5049184403004IPHONE[t] + 105.207064497490IPAD[t] -3.07859516993699e-07VOLUME[t] + 6.18588427968051MICROSOFT[t] -0.254623501864903CONS.CONF[t] + 1.43045995687761t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-127.44760562137511.410672-11.169200
REV.GROWTH-31.27273043776826.348574-4.92593e-062e-06
IPHONE63.504918440300412.184115.21211e-060
IPAD105.20706449749012.2854268.563600
VOLUME-3.07859516993699e-070-2.05780.0419910.020995
MICROSOFT6.185884279680510.5943110.408500
CONS.CONF-0.2546235018649030.101085-2.51890.0132230.006611
t1.430459956877610.08553916.722900


Multiple Linear Regression - Regression Statistics
Multiple R0.982398930477056
R-squared0.965107658602464
Adjusted R-squared0.96286686603565
F-TEST (value)430.699241373587
F-TEST (DF numerator)7
F-TEST (DF denominator)109
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation14.6405651902178
Sum Squared Residuals23363.730250703


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110.81-3.5289079970994514.3389079970995
29.12-2.3758786815968311.4958786815968
311.03-14.783828483671325.8138284836713
412.7417.6437538075877-4.9037538075877
59.9823.5361700648615-13.5561700648615
611.6233.4029313768821-21.7829313768821
79.419.2480998684049-9.8480998684049
89.270.7227204589973818.54727954100262
97.76-9.8215460181807417.5815460181807
108.78-6.0193826111220314.7993826111220
1110.6511.3114112451014-0.661411245101382
1210.9515.6321331960253-4.68213319602528
1312.3617.9465498433878-5.5865498433878
1410.856.69415987701694.1558401229831
1511.8410.83018901392261.00981098607745
1612.14-5.1528307086881617.2928307086882
1711.65-7.3400799561542618.9900799561543
188.862.745197278352776.11480272164722
197.63-10.300875890313317.9308758903133
207.38-3.8689508090908211.2489508090908
217.25-15.841061465127323.0910614651273
228.0310.6875903640670-2.65759036406703
237.7521.8926442087696-14.1426442087696
247.169.7012945910789-2.54129459107890
257.182.856354823965774.32364517603423
267.518.94928716407582-1.43928716407582
277.0714.0319077973756-6.9619077973756
287.1112.1886840265273-5.0786840265273
298.986.64379617133212.3362038286679
309.5315.7779379773051-6.24793797730507
3110.5419.8397332947637-9.2997332947637
3211.3120.9957139825741-9.68571398257413
3310.3629.4382477747903-19.0782477747903
3411.4416.2156299359501-4.7756299359501
3510.4513.2784400100617-2.82844001006168
3610.6923.3112816912528-12.6212816912528
3711.2825.4657791781929-14.1857791781930
3811.9624.6191535860914-12.6591535860914
3913.5215.4448586505344-1.92485865053439
4012.8922.2606125802211-9.37061258022111
4114.0326.0841719071735-12.0541719071735
4216.2735.1675202936904-18.8975202936904
4316.1732.7013162963232-16.5313162963232
4417.2531.4207303475529-14.1707303475529
4519.3835.0443972499164-15.6643972499164
4626.222.88488604548953.31511395451047
4733.5333.16122444479350.368775555206526
4832.233.0845786737927-0.884578673792687
4938.4525.764397100129112.6856028998709
5044.8623.826394133056821.0336058669432
5141.6725.182728753776116.4872712462239
5236.0630.00917055881866.05082944118137
5339.7636.78263576751842.97736423248156
5436.8133.11576518271173.69423481728828
5542.6545.2637148966472-2.61371489664724
5646.8957.7743583255711-10.8843583255711
5753.6152.45255939321981.15744060678020
5857.5948.20196714768439.3880328523157
5967.8260.82281794156626.99718205843374
6071.8952.383021757894819.5069782421052
6175.5168.48869695179077.0213030482093
6268.4965.1606407944583.32935920554197
6362.7267.4001322308557-4.68013223085572
6470.3953.526642616679516.8633573833205
6559.7751.85551838029177.9144816197083
6657.2755.85000044597591.41999955402413
6767.9658.21151040438169.74848959561838
6867.8572.5453326358316-4.69533263583160
6976.9880.7872560193313-3.80725601933125
7081.0895.1196855081471-14.0396855081471
7191.66100.509494642391-8.8494946423906
7284.84101.472422097319-16.6324220973192
7385.73117.321247612044-31.5912476120443
7484.61110.607139940152-25.9971399401515
7592.91111.286586907601-18.3765869076007
7699.8127.600608604569-27.800608604569
77121.19131.769344260362-10.5793442603624
78122.04123.505275038774-1.46527503877421
79131.76122.7455695654149.0144304345864
80138.48126.28573042511412.1942695748859
81153.47133.13512757787820.3348724221221
82189.95182.3388805769937.61111942300712
83182.22164.90825818134517.3117418186554
84198.08181.80610651685616.2738934831442
85135.36158.600532567402-23.2405325674016
86125.02136.913798436335-11.8937984363352
87143.5149.279735341508-5.77973534150823
88173.95148.65198731316925.2980126868310
89188.75152.73037895790136.0196210420988
90167.44150.62709053179316.8129094682072
91158.95153.9859762694734.964023730527
92169.53166.5335375956562.99646240434364
93113.66157.411974154532-43.751974154532
94107.59112.346326078964-4.75632607896362
9592.67107.350128115044-14.6801281150444
9685.35109.241734896144-23.8917348961441
9790.13105.699584728280-15.5695847282803
9889.3198.5717858659368-9.26178586593684
99105.12113.273341476923-8.15334147692337
100125.83128.771285845827-2.94128584582696
101135.81132.2150222159343.59497778406606
102142.43151.202637790153-8.77263779015328
103163.39145.16194375811718.2280562418828
104168.21153.63493509160314.5750649083966
105185.35160.70418612138224.6458138786181
106188.5182.5311079405355.96889205946534
107199.91196.3789356161613.53106438383950
108210.73202.5517972206218.17820277937923
109192.06191.0443739713351.01562602866539
110204.62201.7895643945262.83043560547424
111235206.00446005964128.9955399403592
112261.09281.497277100175-20.4072771001755
113256.88249.8850624866016.99493751339883
114251.53238.08473674070413.4452632592964
115257.25265.108249436415-7.85824943641501
116243.1255.863746085701-12.7637460857006
117283.75263.15828042520220.5917195747977


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.001724217221446130.003448434442892250.998275782778554
120.0001590145500347800.0003180291000695590.999840985449965
132.19781136117100e-054.39562272234199e-050.999978021886388
141.80747137492613e-063.61494274985226e-060.999998192528625
151.48095854095045e-072.96191708190091e-070.999999851904146
161.62403183391325e-083.24806366782649e-080.999999983759682
171.3352375949971e-092.6704751899942e-090.999999998664762
183.13486898889623e-096.26973797779245e-090.99999999686513
199.65149427177646e-101.93029885435529e-090.99999999903485
201.37234468248636e-102.74468936497273e-100.999999999862766
212.50893382217956e-115.01786764435912e-110.99999999997491
222.80766423512544e-125.61532847025089e-120.999999999997192
232.83281012592729e-135.66562025185459e-130.999999999999717
242.69761858333651e-145.39523716667302e-140.999999999999973
253.28126023589668e-156.56252047179336e-150.999999999999997
261.31474501457829e-152.62949002915658e-150.999999999999999
271.9454741347776e-163.8909482695552e-161
283.56554857552281e-177.13109715104562e-171
294.54223351745534e-189.08446703491068e-181
306.63375737407224e-191.32675147481445e-181
311.78327103826010e-193.56654207652019e-191
325.16697198107829e-201.03339439621566e-191
335.53281867035672e-211.10656373407134e-201
346.29894793638778e-221.25978958727756e-211
358.28006689157946e-231.65601337831589e-221
369.13322426216869e-241.82664485243374e-231
379.39441983003671e-251.87888396600734e-241
381.15967496837846e-252.31934993675693e-251
394.01945609348265e-268.0389121869653e-261
404.23126343457939e-278.46252686915878e-271
411.36030972393050e-272.72061944786100e-271
423.3214290653706e-286.6428581307412e-281
433.36045420458172e-296.72090840916343e-291
442.08562635539501e-294.17125271079001e-291
451.44923066830914e-282.89846133661828e-281
465.68034692032284e-271.13606938406457e-261
472.7182989075141e-245.4365978150282e-241
488.20410853305554e-241.64082170661111e-231
491.40402239460520e-242.80804478921041e-241
502.92331202474042e-225.84662404948083e-221
517.24764891310876e-191.44952978262175e-181
521.74916767799813e-193.49833535599627e-191
531.67359343272545e-183.3471868654509e-181
542.12142414982258e-184.24284829964517e-181
551.73938793648101e-163.47877587296201e-161
562.31020939931033e-144.62041879862065e-140.999999999999977
571.05605933130825e-112.1121186626165e-110.99999999998944
581.22265760983376e-102.44531521966752e-100.999999999877734
599.81743092417652e-091.96348618483530e-080.99999999018257
604.13254266885094e-078.26508533770188e-070.999999586745733
614.45090412790688e-078.90180825581376e-070.999999554909587
622.56446266192424e-075.12892532384848e-070.999999743553734
631.23683676775800e-072.47367353551601e-070.999999876316323
641.85246051944528e-073.70492103889057e-070.999999814753948
651.61049310624433e-073.22098621248867e-070.99999983895069
661.00732571483350e-072.01465142966699e-070.999999899267428
671.36442823570598e-072.72885647141197e-070.999999863557176
688.00211787586437e-081.60042357517287e-070.999999919978821
695.78413163239539e-081.15682632647908e-070.999999942158684
703.56849524634906e-087.13699049269812e-080.999999964315048
713.8648562224383e-087.7297124448766e-080.999999961351438
721.73534869044673e-083.47069738089345e-080.999999982646513
732.52776722879697e-085.05553445759394e-080.999999974722328
745.04973047241453e-081.00994609448291e-070.999999949502695
759.67122352617275e-081.93424470523455e-070.999999903287765
761.33861910882730e-062.67723821765460e-060.999998661380891
771.57740988663506e-053.15481977327011e-050.999984225901134
782.46213946203428e-054.92427892406855e-050.99997537860538
792.4582303951525e-054.916460790305e-050.999975417696048
803.40899336086989e-056.81798672173979e-050.999965910066391
810.0001272392287666310.0002544784575332630.999872760771233
820.0004900471267492110.0009800942534984210.99950995287325
830.0005381760187429430.001076352037485890.999461823981257
840.001106380835065560.002212761670131110.998893619164934
850.01027384349991390.02054768699982780.989726156500086
860.01313799238178590.02627598476357180.986862007618214
870.01080924672270360.02161849344540730.989190753277296
880.02268418126748190.04536836253496380.977315818732518
890.1228612667691150.2457225335382290.877138733230885
900.1989692795083040.3979385590166080.801030720491696
910.3352821607196340.6705643214392680.664717839280366
920.919915945013480.1601681099730380.0800840549865192
930.9736292445762310.05274151084753740.0263707554237687
940.972496169390970.05500766121805920.0275038306090296
950.9588668910659040.08226621786819170.0411331089340959
960.9503769403604340.09924611927913260.0496230596395663
970.925864065487650.1482718690246990.0741359345123494
980.8883479909580690.2233040180838620.111652009041931
990.8520411508109860.2959176983780290.147958849189014
1000.7946876097880680.4106247804238640.205312390211932
1010.806404434936080.387191130127840.19359556506392
1020.7659481555278250.468103688944350.234051844472175
1030.7127243145862990.5745513708274010.287275685413701
1040.6047544868649960.7904910262700080.395245513135004
1050.514488961800290.971022076399420.48551103819971
1060.4088217957029610.8176435914059220.591178204297039


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level740.770833333333333NOK
5% type I error level780.8125NOK
10% type I error level820.854166666666667NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/10qys61292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/10qys61292326275.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/3c6vx1292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/3c6vx1292326275.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/4c6vx1292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/4c6vx1292326275.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/54xc01292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/54xc01292326275.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/64xc01292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/64xc01292326275.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/7x7b31292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/7x7b31292326275.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/8x7b31292326275.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t12923263768fzn4v41pviqxik/8x7b31292326275.ps (open in new window)


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