Home » date » 2010 » Dec » 14 »

Apple Inc - Multiple regression model 2

*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 10:39:25 +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/t1292323266cmebnfvizy21qjl.htm/, Retrieved Tue, 14 Dec 2010 11:41:26 +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/t1292323266cmebnfvizy21qjl.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 24563400 -0,2643 24.45 2772.73 0,0373 115.7 9.12 14163200 -0,2643 23.62 2151.83 0,0353 109.2 11.03 18184800 -0,2643 21.90 1840.26 0,0292 116.9 12.74 20810300 -0,1918 27.12 2116.24 0,0327 109.9 9.98 12843000 -0,1918 27.70 2110.49 0,0362 116.1 11.62 13866700 -0,1918 29.23 2160.54 0,0325 118.9 9.40 15119200 -0,2246 26.50 2027.13 0,0272 116.3 9.27 8301600 -0,2246 22.84 1805.43 0,0272 114.0 7.76 14039600 -0,2246 20.49 1498.80 0,0265 97.0 8.78 12139700 0,3654 23.28 1690.20 0,0213 85.3 10.65 9649000 0,3654 25.71 1930.58 0,019 84.9 10.95 8513600 0,3654 26.52 1950.40 0,0155 94.6 12.36 15278600 0,0447 25.51 1934.03 0,0114 97.8 10.85 15590900 0,0447 23.36 1731.49 0,0114 95.0 11.84 9691100 0,0447 24.15 1845.35 0,0148 110.7 12.14 10882700 -0,0312 20.92 1688.23 0,0164 108.5 11.65 10294800 -0,0312 20.38 1615.73 0,0118 110.3 8.86 16031900 -0,0312 21.90 1463.21 0,0107 106.3 7.63 13683600 -0,0048 19.21 1328.26 0,0146 97.4 7.38 8677200 -0,0048 19.65 1314.85 0,018 94.5 7.25 9874100 - 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 time10 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
APPLE[t] = -89.980306402187 + 4.83923660683464e-07VOLUME[t] + 25.9301820373231REV.GROWTH[t] + 6.43325933193156MICROSOFT[t] + 0.0903195954538196NASDAQ[t] -939.517745569975INFLATION[t] -1.93823831639427CONS.CONF[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-89.98030640218722.176341-4.05759.3e-054.7e-05
VOLUME4.83923660683464e-0701.60510.1113380.055669
REV.GROWTH25.930182037323113.526971.91690.0578420.028921
MICROSOFT6.433259331931561.5134544.25074.5e-052.2e-05
NASDAQ0.09031959545381960.0165135.469600
INFLATION-939.517745569975254.495487-3.69170.0003480.000174
CONS.CONF-1.938238316394270.146652-13.216600


Multiple Linear Regression - Regression Statistics
Multiple R0.913237166920447
R-squared0.834002123044885
Adjusted R-squared0.824947693392788
F-TEST (value)92.1098462399246
F-TEST (DF numerator)6
F-TEST (DF denominator)110
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation31.7878356811424
Sum Squared Residuals111151.314702044


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
110.8163.4800143839998-52.6700143839998
29.1211.5056540130827-2.38565401308266
311.03-34.947657787840745.9776577878407
412.7436.9901937522829-24.2501937522829
59.9821.0411918380409-11.0611918380409
611.6233.9491153925063-22.3291153925063
79.414.1112482751667-4.71124827516666
89.27-28.299585013183237.5695850131832
97.76-34.727974231623942.4879742316239
108.7842.4502712921912-33.6702712921912
1110.6581.5249933036784-70.8749933036784
1210.9572.4640212605682-61.5140212605682
1312.3657.0954918872676-44.7354918872676
1410.8530.5488501055335-19.6988501055335
1511.849.435159400503142.40484059949686
1612.14-24.165844558746936.3058445587469
1711.65-33.639521328395545.2895213283955
188.86-26.073770623065034.9337706230650
197.63-42.433506950865450.0635069508654
207.38-40.810243252091548.1902432520915
217.25-62.619752912535569.8697529125355
228.031.520678785422046.50932121457796
237.7512.7687055953806-5.01870559538057
247.16-9.2436453920332116.4036453920332
257.18-20.695903441128227.8759034411282
267.513.290207258183114.21979274181689
277.0712.0783801337905-5.00838013379053
287.115.441801355231651.66819864476835
298.9811.2748084026594-2.29480840265939
309.5314.7683661434446-5.23836614344457
3110.5443.3313394064382-32.7913394064382
3211.3140.5690983092261-29.2590983092261
3310.3653.552593126796-43.1925931267960
3411.4457.7479522065992-46.3079522065992
3510.4538.7731323125545-28.3231323125545
3610.6951.6322218871421-40.9422218871421
3711.2850.0132250120638-38.7332250120638
3811.9656.3373762179714-44.3773762179714
3913.5248.4795103016563-34.9595103016563
4012.8933.0876916181363-20.1976916181363
4114.0329.2587301418427-15.2287301418427
4216.2728.3678374591685-12.0978374591685
4316.1713.3334038344772.83659616552300
4417.2518.3298860569358-1.07988605693577
4519.3830.4221067355482-11.0421067355482
4626.257.2402589849444-31.0402589849445
4733.5376.9824084082835-43.4524084082835
4832.263.9848012919705-31.7848012919705
4938.4559.1329257978746-20.6829257978746
5044.8649.5359912730844-4.67599127308441
5141.6732.32902804489339.34097195510665
5236.0644.9666776093238-8.90667760932377
5339.7651.7828038305373-12.0228038305373
5436.8140.0092481477978-3.1992481477978
5542.6550.3321754750179-7.68217547501791
5646.8948.2428363319817-1.35283633198171
5753.6166.8130248777108-13.2030248777108
5857.5979.0867975329776-21.4967975329776
5967.8279.7618761867402-11.9418761867402
6071.8957.687713820982814.2022861790172
6175.5167.93574740271657.57425259728351
6268.4968.8500772439185-0.360077243918469
6362.7268.8917828512036-6.1717828512036
6470.3941.373117593575629.0168824064244
6559.7718.367820554353941.4021794456461
6657.2719.670514958712437.5994850412876
6767.9619.082842020586348.8771579794137
6867.8551.987782769153815.8622172308462
6976.9875.79049204498151.18950795501854
7081.0896.332104612129-15.252104612129
7191.66100.464309674999-8.80430967499932
7284.8490.958360075194-6.11836007519393
7385.73113.248966120043-27.5189661200432
7484.6177.42667451105077.1833254889493
7592.9178.212307792036114.6976922079639
7699.8106.377959999548-6.57795999954765
77121.19115.7395788752155.45042112478458
78122.04119.9262182424452.11378175755469
79131.76105.7206299021926.0393700978099
80138.48122.90152479081515.5784752091853
81153.47141.87046972220811.5995302777921
82189.95202.450532300888-12.5005323008877
83182.22177.4161354478144.80386455218604
84198.08178.30700770289219.7729922971080
85135.36155.673040274325-20.3130402743250
86125.02130.099143705891-5.07914370589138
87143.5156.717388194759-13.2173881947587
88173.95171.4031148832232.54688511677712
89188.75185.3806401713933.36935982860716
90167.44165.7596799965081.68032000349192
91158.95158.8745604347920.0754395652082485
92169.53157.44504976235212.0849502376480
93113.66137.184993901735-23.5249939017346
94107.59128.423202074343-20.8332020743435
9592.67101.475730679276-8.80573067927569
9685.35116.479146965348-31.1291469653484
9790.13160.438728724576-70.3087287245765
9889.31100.118072676435-10.8080726764352
99105.12129.532018657467-24.4120186574667
100125.83136.166858248656-10.3368582486562
101135.81122.44384935945213.3661506405480
102142.43159.677592460384-17.2475924603841
103163.39173.790429882175-10.4004298821750
104168.21162.9251459355865.28485406441429
105185.35181.8905273428723.45947265712799
106188.5195.029606453597-6.52960645359697
107199.91189.6729008287610.2370991712401
108210.73195.14911721371015.5808827862898
109192.06174.9035668783317.1564331216701
110204.62206.550677419071-1.93067741907123
111235211.05932445950623.9406755404943
112261.09219.33275843492641.7572415650737
113256.88169.69464753856287.185352461438
114251.53161.30654155716990.2234584428309
115257.25197.87073382366559.3792661763347
116243.1162.26286356859880.8371364314019
117283.75203.20897095578880.5410290442125


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
107.05349581737511e-050.0001410699163475020.999929465041826
116.63995828475428e-061.32799165695086e-050.999993360041715
122.76088454987290e-075.52176909974579e-070.999999723911545
131.14486101669958e-082.28972203339916e-080.99999998855139
144.13320242669417e-108.26640485338834e-100.99999999958668
151.6726092722201e-113.3452185444402e-110.999999999983274
161.79886977839267e-123.59773955678535e-120.999999999998201
176.65433771979008e-141.33086754395802e-130.999999999999933
184.50794069982022e-149.01588139964043e-140.999999999999955
193.99647490794641e-157.99294981589282e-150.999999999999996
202.36928540484906e-164.73857080969813e-161
212.20091861630273e-174.40183723260546e-171
221.34868451530872e-182.69736903061743e-181
235.74435555674214e-201.14887111134843e-191
243.10886208461637e-216.21772416923273e-211
252.95582226390476e-225.91164452780952e-221
264.59614843187513e-239.19229686375025e-231
272.85599311165209e-245.71198622330418e-241
282.53858941345153e-255.07717882690307e-251
291.57739409768047e-263.15478819536094e-261
301.10673737853708e-272.21347475707415e-271
318.22608419017279e-291.64521683803456e-281
327.3511586312905e-301.4702317262581e-291
333.56766113091449e-317.13532226182898e-311
342.94491678632262e-325.88983357264523e-321
351.771758676625e-333.54351735325e-331
361.18515599584402e-342.37031199168804e-341
377.2185337360531e-361.44370674721062e-351
387.00264021917986e-371.40052804383597e-361
397.00060265889873e-371.40012053177975e-361
402.84106504476170e-375.68213008952339e-371
415.74872660567821e-371.14974532113564e-361
421.65168076224988e-363.30336152449977e-361
433.74809572961926e-377.49619145923852e-371
444.33804458528691e-378.67608917057383e-371
455.1123918592687e-361.02247837185374e-351
465.50004239488702e-361.10000847897740e-351
476.75022643355475e-341.35004528671095e-331
481.44401768367416e-332.88803536734832e-331
492.09299480306535e-344.18598960613069e-341
504.19163535555154e-328.38327071110308e-321
512.21146628356117e-294.42293256712233e-291
522.71893474635203e-305.43786949270405e-301
533.7120659059579e-297.4241318119158e-291
545.61632809586159e-291.12326561917232e-281
554.0739089548457e-268.1478179096914e-261
569.31927035973957e-241.86385407194791e-231
574.51982954021832e-219.03965908043663e-211
584.13006081836404e-198.26012163672809e-191
591.09322897985720e-142.18645795971441e-140.99999999999999
608.90094371179643e-121.78018874235929e-110.999999999991099
615.71949717688745e-101.14389943537749e-090.99999999942805
623.29092525803138e-096.58185051606276e-090.999999996709075
636.2407973495898e-091.24815946991796e-080.999999993759203
641.67824884304046e-083.35649768608092e-080.999999983217511
652.44914226624294e-084.89828453248588e-080.999999975508577
662.98173036990034e-085.96346073980068e-080.999999970182696
672.34438292819046e-074.68876585638091e-070.999999765561707
686.60040604163995e-071.32008120832799e-060.999999339959396
697.59642382415393e-061.51928476483079e-050.999992403576176
700.0001896613466926160.0003793226933852330.999810338653307
710.001271525844737960.002543051689475920.998728474155262
720.001509376533218180.003018753066436370.998490623466782
730.001153118175427320.002306236350854640.998846881824573
740.001672620640540030.003345241281080050.99832737935946
750.003831855485318180.007663710970636360.996168144514682
760.006801523842268750.01360304768453750.99319847615773
770.01375957962613740.02751915925227480.986240420373863
780.01386748675080010.02773497350160010.9861325132492
790.01679016422700280.03358032845400550.983209835772997
800.02145306137494760.04290612274989520.978546938625052
810.02997879226857230.05995758453714460.970021207731428
820.08639283587711640.1727856717542330.913607164122884
830.08922786975727930.1784557395145590.91077213024272
840.1338436474849630.2676872949699260.866156352515037
850.1609389485138260.3218778970276520.839061051486174
860.1657530395576850.3315060791153710.834246960442315
870.1988508443746930.3977016887493850.801149155625307
880.1920324982037920.3840649964075840.807967501796208
890.2035917155541570.4071834311083140.796408284445843
900.1704389272888030.3408778545776070.829561072711197
910.2172448169874850.4344896339749690.782755183012515
920.4063036227061890.8126072454123780.593696377293811
930.994739985216440.01052002956712140.0052600147835607
940.992947914297260.01410417140547860.0070520857027393
950.987693096317140.02461380736571920.0123069036828596
960.9892581057525220.02148378849495650.0107418942474783
970.982293187707670.03541362458465970.0177068122923299
980.9740345978543740.05193080429125240.0259654021456262
990.970323856375260.05935228724948010.0296761436247400
1000.9587634192459230.08247316150815360.0412365807540768
1010.9807247334348980.03855053313020360.0192752665651018
1020.9865579935215580.02688401295688450.0134420064784422
1030.9751012074208880.04979758515822330.0248987925791117
1040.9628983191280950.07420336174380920.0371016808719046
1050.9789847727088790.04203045458224200.0210152272911210
1060.994551980295910.01089603940818030.00544801970409015
1070.9879318745955320.02413625080893680.0120681254044684


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level660.673469387755102NOK
5% type I error level820.836734693877551NOK
10% type I error level870.887755102040816NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/10x2kk1292323154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/10x2kk1292323154.ps (open in new window)


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


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/5u1mw1292323154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/5u1mw1292323154.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/6u1mw1292323154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/6u1mw1292323154.ps (open in new window)


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


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


http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/9x2kk1292323154.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/14/t1292323266cmebnfvizy21qjl/9x2kk1292323154.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by