Home » date » 2009 » Nov » 18 »

*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: Wed, 18 Nov 2009 05:11:35 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41.htm/, Retrieved Wed, 18 Nov 2009 13:13:24 +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/2009/Nov/18/t1258546390qzn3ifrvav1yr41.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
149657 0 142773 0 133639 0 128332 0 120297 0 118632 0 155276 0 169316 0 167395 0 157939 0 149601 0 146310 0 141579 0 136473 0 129818 0 124226 0 116428 0 116440 0 147747 0 160069 0 163129 0 151108 0 141481 0 139174 0 134066 0 130104 0 123090 0 116598 0 109627 0 105428 0 137272 0 159836 0 155283 0 141514 0 131852 0 130691 0 128461 0 123066 0 117599 0 111599 0 105395 0 102334 0 131305 0 149033 0 144954 0 132404 0 122104 0 118755 0 116222 1 110924 1 103753 1 99983 1 93302 1 91496 1 119321 1 139261 1 133739 1 123913 1 113438 1 109416 1 109406 1 105645 1 101328 1 97686 1 93093 1 91382 1 122257 1 139183 1 139887 1 131822 1 116805 1 113706 1 113012 1 110452 1 107005 1 102841 1 98173 1 98181 1 137277 1 147579 1 146571 1 138920 1 130340 1 128140 1 127059 1 122860 1 117702 1 113537 1 108366 1 111078 1 150739 1 159129 1 157928 1 147768 1 137507 1 136919 1
 
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'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 135682.416666667 -13898.7583333333X[t] -628.084027777662M1[t] -5258.07638888886M2[t] -11287.8187500000M3[t] -16163.6861111111M4[t] -22413.1784722222M5[t] -23611.2958333334M6[t] + 9682.21180555554M7[t] + 24974.3444444445M8[t] + 23174.9770833334M9[t] + 12753.3597222222M10[t] + 2486.49236111111M11[t] -15.6326388888899t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)135682.4166666673993.16078433.978700
X-13898.75833333333857.759822-3.60280.0005380.000269
M1-628.0840277776624675.032978-0.13430.8934560.446728
M2-5258.076388888864663.966549-1.12740.2628690.131434
M3-11287.81875000004653.93139-2.42540.0174860.008743
M4-16163.68611111114644.934187-3.47990.0008060.000403
M5-22413.17847222224636.980981-4.83366e-063e-06
M6-23611.29583333344630.077151-5.09952e-061e-06
M79682.211805555544624.2273992.09380.0393670.019683
M824974.34444444454619.4357285.40641e-060
M923174.97708333344615.7054345.02093e-061e-06
M1012753.35972222224613.0390912.76460.0070370.003518
M112486.492361111114611.4385450.53920.5912090.295605
t-15.632638888889970.152684-0.22280.8242160.412108


Multiple Linear Regression - Regression Statistics
Multiple R0.895559876202289
R-squared0.80202749186346
Adjusted R-squared0.770641606427178
F-TEST (value)25.5537634422238
F-TEST (DF numerator)13
F-TEST (DF denominator)82
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation9221.80981332463
Sum Squared Residuals6973425651.1167


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1149657135038.69999999914618.3000000008
2142773130393.07512379.9250000000
3133639124347.79291.29999999995
4128332119456.2000000008875.79999999988
5120297113191.0757105.92500000001
6118632111977.3256654.67499999994
7155276145255.210020.8000000000
8169316160531.78784.30000000005
9167395158716.78678.30000000001
10157939148279.459659.54999999998
11149601137996.9511604.0500000000
12146310135494.82510815.175
13141579134851.1083333336727.89166666652
14136473130205.4833333336267.51666666664
15129818124160.1083333335657.89166666665
16124226119268.6083333334957.39166666666
17116428113003.4833333333424.51666666664
18116440111789.7333333334650.26666666665
19147747145067.6083333332679.39166666665
20160069160344.108333333-275.108333333362
21163129158529.1083333334599.89166666664
22151108148091.8583333333016.14166666665
23141481137809.3583333333671.64166666665
24139174135307.2333333333866.76666666666
25134066134663.516666667-597.516666666795
26130104130017.89166666786.1083333333254
27123090123972.516666667-882.516666666673
28116598119081.016666667-2483.01666666666
29109627112815.891666667-3188.89166666668
30105428111602.141666667-6174.14166666667
31137272144880.016666667-7608.01666666667
32159836160156.516666667-320.516666666682
33155283158341.516666667-3058.51666666668
34141514147904.266666667-6390.26666666667
35131852137621.766666667-5769.76666666667
36130691135119.641666667-4428.64166666666
37128461134475.925-6014.92500000012
38123066129830.3-6764.29999999999
39117599123784.925-6185.925
40111599118893.425-7294.42499999998
41105395112628.3-7233.3
42102334111414.55-9080.54999999999
43131305144692.425-13387.425
44149033159968.925-10935.925
45144954158153.925-13199.925
46132404147716.675-15312.675
47122104137434.175-15330.175
48118755134932.05-16177.0500000000
49116222120389.575000000-4167.57500000013
50110924115743.95-4819.95000000001
51103753109698.575-5945.575
5299983104807.075-4824.07499999999
539330298541.95-5239.95000000001
549149697328.2-5832.20000000001
55119321130606.075-11285.075
56139261145882.575-6621.57500000002
57133739144067.575-10328.5750000000
58123913133630.325-9717.32500000001
59113438123347.825-9909.82500000001
60109416120845.7-11429.7
61109406120201.983333333-10795.9833333334
62105645115556.358333333-9911.35833333332
63101328109510.983333333-8182.98333333333
6497686104619.483333333-6933.48333333331
659309398354.3583333333-5261.35833333333
669138297140.6083333333-5758.60833333333
67122257130418.483333333-8161.48333333333
68139183145694.983333333-6511.98333333334
69139887143879.983333333-3992.98333333334
70131822133442.733333333-1620.73333333333
71116805123160.233333333-6355.23333333333
72113706120658.108333333-6952.10833333332
73113012120014.391666667-7002.39166666677
74110452115368.766666667-4916.76666666665
75107005109323.391666667-2318.39166666665
76102841104431.891666667-1590.89166666663
779817398166.76666666676.23333333334313
789818196953.01666666661227.98333333335
79137277130230.8916666677046.10833333335
80147579145507.3916666672071.60833333333
81146571143692.3916666672878.60833333334
82138920133255.1416666675664.85833333335
83130340122972.6416666677367.35833333335
84128140120470.5166666677669.48333333335
85127059119826.87232.19999999991
86122860115181.1757678.82500000003
87117702109135.88566.20000000003
88113537104244.39292.70000000004
8910836697979.17510386.8250000000
9011107896765.42514312.5750000000
91150739130043.320695.7000000000
92159129145319.813809.2000000000
93157928143504.814423.2000000000
94147768133067.5514700.4500000000
95137507122785.0514721.9500000000
96136919120282.92516636.0750000000


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.01143745320635580.02287490641271160.988562546793644
180.00478123032222790.00956246064445580.995218769677772
190.001900762035953000.003801524071906010.998099237964047
200.001356097982754820.002712195965509650.998643902017245
210.0004570893061141440.0009141786122282880.999542910693886
220.0001573121973608850.000314624394721770.99984268780264
238.86230267848214e-050.0001772460535696430.999911376973215
244.36422064330728e-058.72844128661456e-050.999956357793567
252.78345214218111e-055.56690428436222e-050.999972165478578
261.07306623397564e-052.14613246795128e-050.99998926933766
274.31099631415487e-068.62199262830974e-060.999995689003686
281.52422585146163e-063.04845170292327e-060.999998475774148
295.3757564382403e-071.07515128764806e-060.999999462424356
304.22177611021321e-078.44355222042642e-070.999999577822389
311.29000709516074e-062.58001419032148e-060.999998709992905
327.88804929085506e-061.57760985817101e-050.999992111950709
335.35945646235033e-061.07189129247007e-050.999994640543538
346.33997704182202e-061.26799540836440e-050.999993660022958
351.15581817076452e-052.31163634152903e-050.999988441818292
361.56168324166436e-053.12336648332871e-050.999984383167583
371.03441869014352e-052.06883738028704e-050.999989655813099
386.55582412887952e-061.31116482577590e-050.999993444175871
396.94131684383077e-061.38826336876615e-050.999993058683156
405.76943268076598e-061.15388653615320e-050.99999423056732
417.9469684321937e-061.58939368643874e-050.999992053031568
425.37487911006237e-061.07497582201247e-050.99999462512089
433.60864935193846e-067.21729870387693e-060.999996391350648
441.94759840748235e-063.8951968149647e-060.999998052401593
452.60559910207784e-065.21119820415568e-060.999997394400898
464.00576148215528e-068.01152296431056e-060.999995994238518
478.78417916030895e-061.75683583206179e-050.99999121582084
482.46502682070830e-054.93005364141661e-050.999975349731793
499.78593663348462e-050.0001957187326696920.999902140633665
500.00039127505006840.00078255010013680.999608724949932
510.001007855117883900.002015710235767810.998992144882116
520.005039292766997680.01007858553399540.994960707233002
530.02045179540286860.04090359080573720.979548204597131
540.05609447379290380.1121889475858080.943905526207096
550.0455082150059280.0910164300118560.954491784994072
560.1285262523636280.2570525047272560.871473747636372
570.1428826486944960.2857652973889910.857117351305504
580.1249687641268500.2499375282536990.87503123587315
590.1330316030025970.2660632060051940.866968396997403
600.123349602752070.246699205504140.87665039724793
610.1245325018581310.2490650037162630.875467498141869
620.1300695362676810.2601390725353620.869930463732319
630.1824307378222840.3648614756445680.817569262177716
640.3331493399766960.6662986799533920.666850660023304
650.6546033235815010.6907933528369980.345396676418499
660.7650113271691560.4699773456616880.234988672830844
670.9372469883862760.1255060232274480.0627530116137239
680.9364148033457770.1271703933084460.0635851966542232
690.9734505404447560.05309891911048730.0265494595552436
700.9980990605046170.003801878990765140.00190093949538257
710.9965157725890260.006968454821948540.00348422741097427
720.9957974659741070.008405068051785780.00420253402589289
730.9967749061966440.006450187606712750.00322509380335638
740.9954754325329070.009049134934186670.00452456746709334
750.9920526875889970.01589462482200520.00794731241100259
760.9849016100318570.03019677993628560.0150983899681428
770.9710743798898580.05785124022028360.0289256201101418
780.9601899607169850.0796200785660310.0398100392830155
790.9685239268607180.06295214627856310.0314760731392816


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level390.619047619047619NOK
5% type I error level440.698412698412698NOK
10% type I error level490.777777777777778NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/105z1v1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/105z1v1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/1p8pr1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/1p8pr1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/2bv751258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/2bv751258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/337pj1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/337pj1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/4nwpi1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/4nwpi1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/5ltab1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/5ltab1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/6xwir1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/6xwir1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/7ch001258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/7ch001258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/8wkyy1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/8wkyy1258546290.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/94rma1258546290.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/18/t1258546390qzn3ifrvav1yr41/94rma1258546290.ps (open in new window)


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