Home » date » 2009 » Nov » 19 »

workshop 7 berekening 4

*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, 19 Nov 2009 11:08:31 -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/19/t1258654179glr90l64ve27vps.htm/, Retrieved Thu, 19 Nov 2009 19:09:52 +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/19/t1258654179glr90l64ve27vps.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 «
5246.24 0 5170.09 4920.10 4926.65 4716.99 5283.61 0 5246.24 5170.09 4920.10 4926.65 4979.05 0 5283.61 5246.24 5170.09 4920.10 4825.20 0 4979.05 5283.61 5246.24 5170.09 4695.12 0 4825.20 4979.05 5283.61 5246.24 4711.54 0 4695.12 4825.20 4979.05 5283.61 4727.22 0 4711.54 4695.12 4825.20 4979.05 4384.96 0 4727.22 4711.54 4695.12 4825.20 4378.75 0 4384.96 4727.22 4711.54 4695.12 4472.93 0 4378.75 4384.96 4727.22 4711.54 4564.07 0 4472.93 4378.75 4384.96 4727.22 4310.54 0 4564.07 4472.93 4378.75 4384.96 4171.38 0 4310.54 4564.07 4472.93 4378.75 4049.38 0 4171.38 4310.54 4564.07 4472.93 3591.37 0 4049.38 4171.38 4310.54 4564.07 3720.46 0 3591.37 4049.38 4171.38 4310.54 4107.23 0 3720.46 3591.37 4049.38 4171.38 4101.71 0 4107.23 3720.46 3591.37 4049.38 4162.34 0 4101.71 4107.23 3720.46 3591.37 4136.22 0 4162.34 4101.71 4107.23 3720.46 4125.88 0 4136.22 4162.34 4101.71 4107.23 4031.48 0 4125.88 4136.22 4162.34 4101.71 3761.36 0 4031.48 4125.88 4136.22 4162.34 3408.56 0 3761.36 4031.48 4125.88 4 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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = -98.9823530336727 -368.123436426008X[t] + 1.01130602561975Y1[t] + 0.163239051318856Y2[t] -0.210238226465953Y3[t] + 0.0225486848879357Y4[t] + 99.0580758997808M1[t] + 32.162636746199M2[t] -87.15409126129M3[t] + 89.5300852830297M4[t] + 212.316131005456M5[t] + 70.6363792115456M6[t] + 87.0167479026612M7[t] + 28.9732274452039M8[t] + 175.445037331277M9[t] + 104.148942223657M10[t] -24.9058248936815M11[t] + 3.29961068075524t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-98.9823530336727128.460069-0.77050.4430970.221549
X-368.123436426008114.42225-3.21720.0018250.000913
Y11.011306025619750.1068379.465900
Y20.1632390513188560.1508921.08180.2823550.141178
Y3-0.2102382264659530.150955-1.39270.1672940.083647
Y40.02254868488793570.1101490.20470.8382820.419141
M199.0580758997808127.6178610.77620.4397550.219878
M232.162636746199129.0215580.24930.8037380.401869
M3-87.15409126129128.571304-0.67790.4996770.249838
M489.5300852830297128.8426940.69490.4890040.244502
M5212.316131005456130.9117521.62180.1085010.054251
M670.6363792115456132.8004810.53190.5961680.298084
M787.0167479026612128.2266430.67860.4992030.249601
M828.9732274452039127.5452170.22720.8208380.410419
M9175.445037331277132.1870261.32720.1879390.09397
M10104.148942223657133.4079510.78070.4371340.218567
M11-24.9058248936815133.701838-0.18630.8526650.426332
t3.299610680755241.5269132.1610.0334780.016739


Multiple Linear Regression - Regression Statistics
Multiple R0.991889576646781
R-squared0.98384493226053
Adjusted R-squared0.980651488637612
F-TEST (value)308.082762194323
F-TEST (DF numerator)17
F-TEST (DF denominator)86
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation261.115658716006
Sum Squared Residuals5863599.30149564


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
15246.245105.66272264824140.577277351759
25283.615165.99059612251117.619403877489
34979.055047.49149061088-68.4414906108815
44825.24915.19946281074-89.999462810743
54695.124829.84008153384-134.720081533839
64711.544599.66772316939111.872276830607
74727.224640.196935358787.023064641299
84384.964627.86936261506-242.909362615056
94378.754427.68552656915-48.9355265691532
104472.934294.61234803367178.317651966329
114564.074335.39797735055228.672022649453
124310.544464.73576444979-154.195764449786
134171.384305.63437799043-134.254377990430
144049.384042.881729494136.49827050587184
153591.373836.12571535685-244.755715356853
163720.463556.54604904229163.913950957711
174107.233760.92727103802346.302728961984
184101.714128.30276113591-26.592761135906
194162.344168.06912330494-5.72912330493626
204136.224095.3365891802340.8834108197734
214125.884238.47154990353-112.591549903529
224031.484142.88314474009-111.403144740094
233761.363926.83135693442-165.471356934416
243408.563668.03793403633-259.477934036331
253228.473389.12605741261-160.656057412614
263090.453140.4743433602-50.024343360197
272741.142923.56024316067-182.420243160672
282980.442757.66109488927222.778905110727
293104.333093.6875375624310.6424624375658
303181.573189.9873503425-8.41735034250093
312863.863249.81780448963-385.957804489627
322898.012865.7299280539632.2800719460411
333112.332984.72952635972127.600473640275
343254.333207.5872102974646.7427897025351
353513.473246.07932486798267.390675132015
363587.613515.2463301015472.3636698984587
373727.453709.8628191673117.5871808326886
383793.343748.5113478296344.8286521703705
393817.583712.21273755908105.367262440915
403845.133899.73844984517-54.608449845174
413931.864046.94311321104-115.083113211036
424197.523997.16033780145200.359662198552
434307.134294.4161158428912.7138841571073
444229.434376.27480079501-146.844800795008
454362.284411.46413578363-49.1841357836284
464217.344448.08205419727-230.742054197267
474361.284216.24158192204145.038418077961
484327.744336.67235752423-8.9323575242332
494417.654462.07499038366-44.4249903836563
504557.684450.4007521879107.279247812100
514650.354500.97068855122149.379311448784
524967.184777.87176769396189.308232306042
535123.425212.08456848621-88.66456848621
545290.855267.104625343523.7453746565051
555535.665417.0918513003118.568148699704
565514.065611.55336334789-97.4933633478846
575493.885747.7659461844-253.885946184393
585694.835608.1422487416986.6877512583095
595850.415692.37616333686158.033836663138
606116.645914.47903355625202.160966443753
6161756268.77105087234-93.7710508723453
626513.586279.47646964196234.103530358036
636383.786462.93037886737-79.150378867368
646673.666560.6497554437113.010244556301
656936.616888.8378562255647.7721437744357
667300.687098.62382627007202.056173729930
677392.937465.54302254721-72.6130225472122
687497.317514.77680617368-17.4668061736802
697584.717714.55489776069-129.844897760686
707160.797740.80027546532-580.010275465315
717196.197180.7348118356715.4551881643284
727245.637159.5189928174486.1110071825638
737347.517408.74925574395-61.2392557439527
747425.757439.25455214388-13.5045521438826
757778.517409.39685833856369.113141661441
767822.337938.59651900495-116.266519004953
778181.228152.4300343717228.7899656282821
788371.478311.7512203595359.7187796404691
798347.718581.15866923071-233.448669230713
808672.118458.97804407412213.131955925881
818802.798901.03325442694-98.243254426944
829138.469027.43413723667111.025862763333
839123.299193.73911622772-70.4491162277178
849023.218873.11491726677150.095082733225
858850.418804.160757058146.2492429418934
868864.588560.23251405402304.347485945982
879163.748451.03647319738712.703526802619
888516.668969.94816155378-453.288161553781
898553.448483.5970210738369.8429789261756
907555.28214.20863729087-659.008637290867
917851.227373.15303810825478.066961891751
9274427432.500822460279.49917753973168
937992.537427.44516301194565.084836988058
948264.047764.65858128783499.38141871217
957517.398096.05966752476-578.669667524761
967200.47288.52467024765-88.1246702476514
977193.696903.75796872334289.932031276658
986193.586944.72769516577-751.14769516577
995104.215866.00541435798-761.795414357984
1004800.464775.3087397161325.1512602838692
1014461.614626.49251649736-164.882516497358
1024398.594302.3235182867996.2664817132106
1034243.634242.253439817371.37656018262728
1044293.824084.9002832998208.919716700202


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.2401845394921710.4803690789843420.759815460507829
220.1186603925821540.2373207851643080.881339607417846
230.07913282300798270.1582656460159650.920867176992017
240.04460354322214740.08920708644429490.955396456777853
250.02155754968887750.0431150993777550.978442450311122
260.00958212291862850.0191642458372570.990417877081371
270.004111834309292890.008223668618585770.995888165690707
280.001630296708249570.003260593416499150.99836970329175
290.001492396666163010.002984793332326020.998507603333837
300.000593868218705680.001187736437411360.999406131781294
310.007202474375315290.01440494875063060.992797525624685
320.005029357717386320.01005871543477260.994970642282614
330.002738170306062610.005476340612125220.997261829693937
340.001535489308259390.003070978616518790.99846451069174
350.001935988317383650.00387197663476730.998064011682616
360.002769089467320090.005538178934640190.99723091053268
370.002601441733824420.005202883467648830.997398558266176
380.001449323995499450.002898647990998890.9985506760045
390.001970197776506340.003940395553012670.998029802223494
400.001374582260511990.002749164521023980.998625417739488
410.0007133655489708880.001426731097941780.99928663445103
420.0006260393625065510.001252078725013100.999373960637493
430.0003524586650906360.0007049173301812720.99964754133491
440.0001941799099164930.0003883598198329860.999805820090083
459.4531137611683e-050.0001890622752233660.999905468862388
468.43522245156038e-050.0001687044490312080.999915647775484
475.88068766096973e-050.0001176137532193950.99994119312339
483.11412180882889e-056.22824361765778e-050.999968858781912
491.61440557484732e-053.22881114969465e-050.999983855944252
507.75850748540692e-061.55170149708138e-050.999992241492515
516.26725837215696e-061.25345167443139e-050.999993732741628
523.1189535070213e-066.2379070140426e-060.999996881046493
531.56955638066552e-063.13911276133104e-060.99999843044362
546.42529010218063e-071.28505802043613e-060.99999935747099
553.60598839384855e-077.2119767876971e-070.99999963940116
561.89305559594072e-073.78611119188143e-070.99999981069444
571.83482921663495e-073.66965843326989e-070.999999816517078
581.02703685548449e-072.05407371096897e-070.999999897296314
594.35301331137472e-088.70602662274943e-080.999999956469867
605.73681277284943e-081.14736255456989e-070.999999942631872
613.29437749995893e-086.58875499991786e-080.999999967056225
622.74254697362237e-085.48509394724474e-080.99999997257453
631.44591816674560e-082.89183633349121e-080.999999985540818
646.0472472556768e-091.20944945113536e-080.999999993952753
652.10631599440343e-094.21263198880686e-090.999999997893684
661.22825959185453e-092.45651918370905e-090.99999999877174
674.97186915874119e-109.94373831748237e-100.999999999502813
681.90063812775519e-103.80127625551038e-100.999999999809936
691.52579864702703e-103.05159729405407e-100.99999999984742
702.49229821744063e-074.98459643488125e-070.999999750770178
712.17724393338283e-074.35448786676567e-070.999999782275607
721.23993445019537e-072.47986890039073e-070.999999876006555
732.66488933722338e-075.32977867444676e-070.999999733511066
742.90483673902845e-075.80967347805689e-070.999999709516326
756.7700106639264e-071.35400213278528e-060.999999322998934
766.20623046116621e-071.24124609223324e-060.999999379376954
772.84614531294319e-075.69229062588639e-070.999999715385469
781.25139566825248e-072.50279133650495e-070.999999874860433
796.77540030295558e-081.35508006059112e-070.999999932245997
804.25570312147019e-088.51140624294038e-080.999999957442969
813.26976979221641e-086.53953958443282e-080.999999967302302
825.09504805328779e-081.01900961065756e-070.99999994904952
831.43850597059107e-082.87701194118214e-080.99999998561494


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level550.873015873015873NOK
5% type I error level590.936507936507937NOK
10% type I error level600.952380952380952NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/10vcul1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/10vcul1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/1a4311258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/1a4311258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/2341h1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/2341h1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/337751258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/337751258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/4zcir1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/4zcir1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/5e69q1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/5e69q1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/6lzpe1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/6lzpe1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/7wzym1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/7wzym1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/8kmnd1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/8kmnd1258654105.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/9a36b1258654105.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258654179glr90l64ve27vps/9a36b1258654105.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