Home » date » 2008 » Dec » 13 »

Dummie

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Sat, 13 Dec 2008 08:08:13 -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/13/t12291809465bzzk7q9b6ct3mo.htm/, Retrieved Sat, 13 Dec 2008 16:09:07 +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/2008/Dec/13/t12291809465bzzk7q9b6ct3mo.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},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3353 0 3480 0 3098 0 2944 0 3389 0 3497 0 4404 0 3849 0 3734 0 3060 0 3507 0 3287 0 3215 0 3764 0 2734 0 2837 0 2766 0 3851 0 3289 0 3848 0 3348 0 3682 0 4058 0 3655 1 3811 1 3341 1 3032 1 3475 1 3353 1 3186 1 3902 1 4164 1 3499 1 4145 1 3796 1 3711 1 3949 1 3740 1 3243 1 4407 1 4814 1 3908 1 5250 1 3937 1 4004 1 5560 1 3922 1 3759 1 4138 1 4634 1 3996 1 4308 1 4142 1 4429 1 5219 1 4929 1 5754 1 5592 1 4163 1 4962 1 5208 1 4755 1 4491 1 5732 1 5730 1 5024 1 6056 1 4901 1 5353 1 5578 1 4618 1 4724 1 5011 1 5298 1 4143 1 4617 1 4727 1 4207 1 5112 1 4190 1 4098 1 5071 1 4177 1 4598 1 3757 1 5591 1 4218 1 3780 1 4336 1 4870 1 4422 1 4727 1 4459 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 time7 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001


Multiple Linear Regression - Estimated Regression Equation
y[t] = + 3094.41801385681 + 305.913106235566d[t] + 65.9727623584073M1[t] + 320.622776448917M2[t] -400.852209460574M3[t] -23.2021953700650M4[t] + 105.947818720444M5[t] + 54.8478328109534M6[t] + 624.622846901462M7[t] + 220.522860991972M8[t] + 168.047875082481M9[t] + 644.937558424062M10[t] -5.82314177114272M11[t] + 15.4749859094908t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)3094.41801385681240.05356312.890500
d305.913106235566202.3378071.51190.1345510.067276
M165.9727623584073287.1022210.22980.818850.409425
M2320.622776448917287.1208221.11670.2675150.133757
M3-400.852209460574287.176313-1.39580.1666730.083337
M4-23.2021953700650287.268672-0.08080.9358310.467915
M5105.947818720444287.3978640.36860.7133780.356689
M654.8478328109534287.5638390.19070.8492240.424612
M7624.622846901462287.7665342.17060.0329650.016483
M8220.522860991972288.005870.76570.4461430.223072
M9168.047875082481288.2817560.58290.5616010.280801
M10644.937558424062297.1526232.17040.0329810.01649
M11-5.82314177114272297.336955-0.01960.9844240.492212
t15.47498590949083.2547634.75469e-064e-06


Multiple Linear Regression - Regression Statistics
Multiple R0.75683865096162
R-squared0.572804743589406
Adjusted R-squared0.502506790002853
F-TEST (value)8.14824208053436
F-TEST (DF numerator)13
F-TEST (DF denominator)79
p-value4.29967950132948e-10
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation554.044938250393
Sum Squared Residuals24250297.6944696


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
133533175.86576212471177.134237875288
234803445.9907621247134.0092378752888
330982739.99076212471358.009237875289
429443133.11576212471-189.115762124711
533893277.74076212471111.259237875288
634973242.11576212471254.884237875289
744043827.36576212471576.634237875289
838493438.74076212471410.259237875289
937343401.74076212471332.259237875289
1030603894.10543137578-834.105431375783
1135073258.81971709007248.180282909931
1232873280.11784477076.8821552292973
1332153361.5655930386-146.565593038601
1437643631.6905930386132.309406961399
1527342925.6905930386-191.690593038601
1628373318.8155930386-481.815593038601
1727663463.4405930386-697.440593038601
1838513427.8155930386423.184406961399
1932894013.0655930386-724.065593038601
2038483624.4405930386223.559406961399
2133483587.4405930386-239.440593038601
2236824079.80526228967-397.805262289673
2340583444.51954800396613.480451996041
2436553771.73078192016-116.730781920158
2538113853.17853018806-42.1785301880565
2633414123.30353018806-782.303530188057
2730323417.30353018806-385.303530188057
2834753810.42853018806-335.428530188057
2933533955.05353018806-602.053530188057
3031863919.42853018806-733.428530188057
3139024504.67853018806-602.678530188057
3241644116.0535301880647.9464698119434
3334994079.05353018806-580.053530188056
3441454571.41819943913-426.418199439129
3537963936.13248515341-140.132485153415
3637113957.43061283405-246.430612834048
3739494038.87836110195-89.8783611019463
3837404309.00336110195-569.003361101946
3932433603.00336110195-360.003361101947
4044073996.12836110195410.871638898054
4148144140.75336110195673.246638898054
4239084105.12836110195-197.128361101946
4352504690.37836110195559.621638898054
4439374301.75336110195-364.753361101946
4540044264.75336110195-260.753361101947
4655604757.11803035302802.881969646981
4739224121.83231606730-199.832316067304
4837594143.13044374794-384.130443747938
4941384224.57819201584-86.578192015836
5046344494.70319201584139.296807984164
5139963788.70319201584207.296807984164
5243084181.82819201584126.171807984164
5341424326.45319201584-184.453192015836
5444294290.82819201584138.171807984164
5552194876.07819201584342.921807984164
5649294487.45319201584441.546807984164
5757544450.453192015841303.54680798416
5855924942.81786126691649.182138733091
5941634307.53214698119-144.532146981194
6049624328.83027466183633.169725338172
6152084410.27802292973797.721977070274
6247554680.4030229297374.596977070274
6344913974.40302292973516.596977070274
6457324367.528022929731364.47197707027
6557304512.153022929731217.84697707027
6650244476.52802292973547.471977070274
6760565061.77802292973994.221977070273
6849014673.15302292973227.846977070274
6953534636.15302292973716.846977070274
7055785128.5176921808449.482307819201
7146184493.23197789508124.768022104916
7247244514.53010557572209.469894424282
7350114595.97785384362415.022146156384
7452984866.10285384362431.897146156384
7541434160.10285384362-17.1028538436159
7646174553.2278538436263.7721461563842
7747274697.8528538436229.1471461563841
7842074662.22785384362-455.227853843616
7951125247.47785384362-135.477853843616
8041904858.85285384362-668.852853843616
8140984821.85285384362-723.852853843616
8250715314.21752309469-243.217523094688
8341774678.93180880897-501.931808808974
8445984700.22993648961-102.229936489608
8537574781.67768475751-1024.67768475751
8655915051.80268475751539.197315242494
8742184345.80268475751-127.802684757506
8837804738.92768475751-958.927684757506
8943364883.55268475751-547.552684757506
9048704847.9276847575122.0723152424942
9144225433.17768475751-1011.17768475751
9247275044.55268475751-317.552684757506
9344595007.55268475751-548.552684757506


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.1163972922522830.2327945845045650.883602707747717
180.09254508997706060.1850901799541210.90745491002294
190.1948565772642660.3897131545285320.805143422735734
200.1174122433492160.2348244866984310.882587756650784
210.06513660894852150.1302732178970430.934863391051479
220.09515539375239660.1903107875047930.904844606247603
230.09020768738411320.1804153747682260.909792312615887
240.05227843373322540.1045568674664510.947721566266775
250.02973819458844490.05947638917688970.970261805411555
260.03309083062479590.06618166124959170.966909169375204
270.01907980969425240.03815961938850490.980920190305748
280.01429507059875720.02859014119751440.985704929401243
290.009249881666344270.01849976333268850.990750118333656
300.01423271209527460.02846542419054920.985767287904725
310.01003797742511190.02007595485022380.989962022574888
320.005759788238955460.01151957647791090.994240211761044
330.004255987627446270.008511975254892530.995744012372554
340.006781782410764860.01356356482152970.993218217589235
350.004007608358607050.008015216717214090.995992391641393
360.002710348491278010.005420696982556020.997289651508722
370.002220036616864210.004440073233728410.997779963383136
380.002278908658455810.004557817316911620.997721091341544
390.001913278313916310.003826556627832620.998086721686084
400.01057036114346860.02114072228693710.989429638856531
410.04791551844827790.09583103689655590.952084481551722
420.03935851474872710.07871702949745420.960641485251273
430.05717615550290410.1143523110058080.942823844497096
440.05924856735624260.1184971347124850.940751432643757
450.06331439916130520.1266287983226100.936685600838695
460.1543585811356390.3087171622712780.84564141886436
470.1368463039657130.2736926079314270.863153696034287
480.1735620316809480.3471240633618970.826437968319052
490.1640651133310610.3281302266621220.835934886668939
500.1822940375897470.3645880751794940.817705962410253
510.1710925798197970.3421851596395940.828907420180203
520.1742852752830660.3485705505661330.825714724716934
530.2714754478663130.5429508957326270.728524552133687
540.2971190233506540.5942380467013080.702880976649346
550.2927020988332690.5854041976665380.707297901166731
560.2549485879800260.5098971759600510.745051412019974
570.3738842567076750.747768513415350.626115743292325
580.3451262002946390.6902524005892790.654873799705361
590.3763009684276690.7526019368553390.62369903157233
600.3305660024093020.6611320048186040.669433997590698
610.2819807997013550.5639615994027110.718019200298645
620.4795738225588430.9591476451176860.520426177441157
630.4284107332420710.8568214664841430.571589266757929
640.5636707937254480.8726584125491050.436329206274552
650.599723550123720.800552899752560.40027644987628
660.5130552265597050.973889546880590.486944773440295
670.5727760054823570.8544479890352860.427223994517643
680.4950492731966190.9900985463932380.504950726803381
690.5244828307129490.9510343385741010.475517169287051
700.4447258291217310.8894516582434610.555274170878269
710.3721516199466150.744303239893230.627848380053385
720.2813361112242110.5626722224484220.718663888775789
730.4845770141031980.9691540282063970.515422985896802
740.3812506097262800.7625012194525590.61874939027372
750.2736816108184810.5473632216369610.726318389181519
760.3359509419728580.6719018839457170.664049058027142


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level60.1NOK
5% type I error level140.233333333333333NOK
10% type I error level180.3NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/10iev41229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/10iev41229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/1xftf1229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/1xftf1229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/2p73s1229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/2p73s1229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/397081229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/397081229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/4u69j1229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/4u69j1229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/5y67e1229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/5y67e1229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/695091229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/695091229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/74uo51229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/74uo51229180879.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/8ib7b1229180879.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/13/t12291809465bzzk7q9b6ct3mo/8ib7b1229180879.ps (open in new window)


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