Home » date » 2008 » Dec » 11 »

Multiple Regression (A)

*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: Thu, 11 Dec 2008 07:26:18 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j.htm/, Retrieved Thu, 11 Dec 2008 14:36:39 +0000
 
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/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j.htm/},
    year = {2008},
}
@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 = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
15044,5 1 14944,2 1 16754,8 1 14254 1 15454,9 1 15644,8 1 14568,3 1 12520,2 1 14803 1 15873,2 1 14755,3 1 12875,1 1 14291,1 1 14205,3 1 15859,4 1 15258,9 1 15498,6 1 15106,5 1 15023,6 1 12083 1 15761,3 1 16943 1 15070,3 1 13659,6 1 14768,9 0 14725,1 0 15998,1 0 15370,6 0 14956,9 0 15469,7 0 15101,8 0 11703,7 0 16283,6 0 16726,5 0 14968,9 0 14861 0 14583,3 0 15305,8 0 17903,9 0 16379,4 0 15420,3 0 17870,5 0 15912,8 0 13866,5 0 17823,2 0 17872 0 17420,4 0 16704,4 0 15991,2 0 16583,6 0 19123,5 0 17838,7 0 17209,4 0 18586,5 0 16258,1 0 15141,6 0 19202,1 0 17746,5 0 19090,1 0 18040,3 0 17515,5 0 17751,8 0 21072,4 0 17170 0 19439,5 0 19795,4 0 17574,9 0 16165,4 0 19464,6 0 19932,1 0 19961,2 0 17343,4 0 18924,2 0 18574,1 0 21350,6 0 18594,6 0 19823,1 0 20844,4 0 19640,2 0 17735,4 0 19813,6 0 22160 0 20664,3 0 17877,4 0 21211,2 0 21423,1 0 21688,7 0 23243,2 0 21490,2 0 22925,8 0 23184,8 0 18562,2 0
 
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 time4 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 17966.5617647059 -3122.69093137255X[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)17966.5617647059267.02406667.284400
X-3122.69093137255522.803754-5.97300


Multiple Linear Regression - Regression Statistics
Multiple R0.532799118305665
R-squared0.283874900467294
Adjusted R-squared0.275917954916931
F-TEST (value)35.6763658454757
F-TEST (DF numerator)1
F-TEST (DF denominator)90
p-value4.57455602287382e-08
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2201.93685818789
Sum Squared Residuals436367333.470172


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
115044.514843.8708333333200.629166666710
214944.214843.8708333333100.329166666654
316754.814843.87083333331910.92916666666
41425414843.8708333333-589.870833333335
515454.914843.8708333333611.029166666665
615644.814843.8708333333800.929166666665
714568.314843.8708333333-275.570833333336
812520.214843.8708333333-2323.67083333333
91480314843.8708333333-40.8708333333348
1015873.214843.87083333331029.32916666667
1114755.314843.8708333333-88.5708333333355
1212875.114843.8708333333-1968.77083333333
1314291.114843.8708333333-552.770833333334
1414205.314843.8708333333-638.570833333335
1515859.414843.87083333331015.52916666666
1615258.914843.8708333333415.029166666665
1715498.614843.8708333333654.729166666666
1815106.514843.8708333333262.629166666665
1915023.614843.8708333333179.729166666666
201208314843.8708333333-2760.87083333333
2115761.314843.8708333333917.429166666665
221694314843.87083333332099.12916666667
2315070.314843.8708333333226.429166666665
2413659.614843.8708333333-1184.27083333333
2514768.917966.5617647059-3197.66176470588
2614725.117966.5617647059-3241.46176470588
2715998.117966.5617647059-1968.46176470588
2815370.617966.5617647059-2595.96176470588
2914956.917966.5617647059-3009.66176470588
3015469.717966.5617647059-2496.86176470588
3115101.817966.5617647059-2864.76176470588
3211703.717966.5617647059-6262.86176470588
3316283.617966.5617647059-1682.96176470588
3416726.517966.5617647059-1240.06176470588
3514968.917966.5617647059-2997.66176470588
361486117966.5617647059-3105.56176470588
3714583.317966.5617647059-3383.26176470588
3815305.817966.5617647059-2660.76176470588
3917903.917966.5617647059-62.6617647058813
4016379.417966.5617647059-1587.16176470588
4115420.317966.5617647059-2546.26176470588
4217870.517966.5617647059-96.0617647058827
4315912.817966.5617647059-2053.76176470588
4413866.517966.5617647059-4100.06176470588
4517823.217966.5617647059-143.361764705882
461787217966.5617647059-94.5617647058827
4717420.417966.5617647059-546.161764705881
4816704.417966.5617647059-1262.16176470588
4915991.217966.5617647059-1975.36176470588
5016583.617966.5617647059-1382.96176470588
5119123.517966.56176470591156.93823529412
5217838.717966.5617647059-127.861764705882
5317209.417966.5617647059-757.161764705881
5418586.517966.5617647059619.938235294117
5516258.117966.5617647059-1708.46176470588
5615141.617966.5617647059-2824.96176470588
5719202.117966.56176470591235.53823529412
5817746.517966.5617647059-220.061764705883
5919090.117966.56176470591123.53823529412
6018040.317966.561764705973.7382352941165
6117515.517966.5617647059-451.061764705883
6217751.817966.5617647059-214.761764705883
6321072.417966.56176470593105.83823529412
641717017966.5617647059-796.561764705883
6519439.517966.56176470591472.93823529412
6619795.417966.56176470591828.83823529412
6717574.917966.5617647059-391.661764705881
6816165.417966.5617647059-1801.16176470588
6919464.617966.56176470591498.03823529412
7019932.117966.56176470591965.53823529412
7119961.217966.56176470591994.63823529412
7217343.417966.5617647059-623.161764705881
7318924.217966.5617647059957.638235294118
7418574.117966.5617647059607.538235294116
7521350.617966.56176470593384.03823529412
7618594.617966.5617647059628.038235294116
7719823.117966.56176470591856.53823529412
7820844.417966.56176470592877.83823529412
7919640.217966.56176470591673.63823529412
8017735.417966.5617647059-231.161764705881
8119813.617966.56176470591847.03823529412
822216017966.56176470594193.43823529412
8320664.317966.56176470592697.73823529412
8417877.417966.5617647059-89.1617647058813
8521211.217966.56176470593244.63823529412
8621423.117966.56176470593456.53823529412
8721688.717966.56176470593722.13823529412
8823243.217966.56176470595276.63823529412
8921490.217966.56176470593523.63823529412
9022925.817966.56176470594959.23823529412
9123184.817966.56176470595218.23823529412
9218562.217966.5617647059595.638235294118


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
50.1211326254274790.2422652508549570.878867374572522
60.04790053215427890.09580106430855790.952099467845721
70.02241747299429880.04483494598859760.977582527005701
80.08485218275447060.1697043655089410.91514781724553
90.04229545032687380.08459090065374770.957704549673126
100.02565867945326520.05131735890653040.974341320546735
110.01197316710233160.02394633420466310.988026832897668
120.01752619680923960.03505239361847920.98247380319076
130.00903674219021340.01807348438042680.990963257809787
140.004591251181325750.00918250236265150.995408748818674
150.00303661377834770.00607322755669540.996963386221652
160.001455415778754530.002910831557509050.998544584221245
170.0007360503553324960.001472100710664990.999263949644668
180.0003188924774213810.0006377849548427630.999681107522579
190.000131959755505570.000263919511011140.999868040244494
200.0007108197354712580.001421639470942520.999289180264529
210.0004315821028677420.0008631642057354840.999568417897132
220.0006741315107946070.001348263021589210.999325868489205
230.0003303983027315850.0006607966054631710.999669601697268
240.0002237956401224310.0004475912802448630.999776204359878
250.0001289575184380230.0002579150368760460.999871042481562
267.5537950286437e-050.0001510759005728740.999924462049714
275.07273132767167e-050.0001014546265534330.999949272686723
282.78002713480649e-055.56005426961298e-050.999972199728652
291.65121101992951e-053.30242203985902e-050.9999834878898
309.18558383228257e-061.83711676645651e-050.999990814416168
315.40853541510919e-061.08170708302184e-050.999994591464585
320.0001874877827113610.0003749755654227220.999812512217289
330.0001760014584450730.0003520029168901460.999823998541555
340.0001864543112015590.0003729086224031180.999813545688798
350.00015228991151110.00030457982302220.999847710088489
360.0001356863425431240.0002713726850862490.999864313657457
370.0001468532056923790.0002937064113847580.999853146794308
380.0001306245141031810.0002612490282063620.999869375485897
390.0003350756331199260.0006701512662398510.99966492436688
400.0002987717882853280.0005975435765706550.999701228211715
410.0002874791064864550.000574958212972910.999712520893514
420.0004969367590689010.0009938735181378010.999503063240931
430.0004557517330237670.0009115034660475340.999544248266976
440.001587604264850670.003175208529701340.99841239573515
450.002307267825100600.004614535650201210.9976927321749
460.003049202207962570.006098404415925140.996950797792037
470.003222607892903720.006445215785807450.996777392107096
480.003148024710066280.006296049420132560.996851975289934
490.003639976931498660.007279953862997320.996360023068501
500.003873996856714910.007747993713429830.996126003143285
510.007766044121190250.01553208824238050.99223395587881
520.00814765906382720.01629531812765440.991852340936173
530.008122174815208750.01624434963041750.991877825184791
540.00974624574342220.01949249148684440.990253754256578
550.01226513116588330.02453026233176670.987734868834117
560.03130558166066160.06261116332132310.968694418339338
570.04180366335673370.08360732671346730.958196336643266
580.04350548901721910.08701097803443820.95649451098278
590.05037064813855210.1007412962771040.949629351861448
600.05078985507686290.1015797101537260.949210144923137
610.0545918794683440.1091837589366880.945408120531656
620.05797475564671130.1159495112934230.942025244353289
630.1123940321690910.2247880643381820.887605967830909
640.1324925645630300.2649851291260610.86750743543697
650.1340195552708240.2680391105416480.865980444729176
660.1378917398882160.2757834797764310.862108260111784
670.1515572682798940.3031145365597880.848442731720106
680.2875175009746090.5750350019492190.71248249902539
690.2796640159834220.5593280319668450.720335984016578
700.2732100716095450.546420143219090.726789928390455
710.2614090806325160.5228181612650330.738590919367484
720.3431858146155320.6863716292310630.656814185384468
730.3380405500911220.6760811001822450.661959449908878
740.3555393312764770.7110786625529540.644460668723523
750.3734019516653480.7468039033306960.626598048334652
760.3920204554181960.7840409108363920.607979544581804
770.3599884671956630.7199769343913260.640011532804337
780.3283726229874640.6567452459749280.671627377012536
790.2957558628612210.5915117257224420.704244137138779
800.4459090876008860.8918181752017720.554090912399114
810.4201825659588170.8403651319176330.579817434041183
820.4030957131320830.8061914262641660.596904286867917
830.3332422154589170.6664844309178350.666757784541083
840.6026531147172950.794693770565410.397346885282705
850.506998684435840.986002631128320.49300131556416
860.393830635321970.787661270643940.60616936467803
870.2712247377412980.5424494754825960.728775262258702


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level370.445783132530120NOK
5% type I error level460.554216867469880NOK
10% type I error level520.626506024096386NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/10n1cw1229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/10n1cw1229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/1zpl91229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/1zpl91229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/2qy031229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/2qy031229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/39mpg1229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/39mpg1229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/4qrdu1229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/4qrdu1229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/5nir61229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/5nir61229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/6ss881229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/6ss881229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/7y0dz1229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/7y0dz1229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/8012n1229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/8012n1229005571.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/9ibig1229005571.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/11/t1229006187dxr7jzyh7bw5i2j/9ibig1229005571.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



Error 001_3: History of computation (impact.txt) is not saved due to a technical problem. We are sorry for this inconveniance and will correct it A.S.A.P.