| Workshop 7: model 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: Fri, 20 Nov 2009 04:10: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/20/t1258720180acqrv42xuxlz6ar.htm/, Retrieved Fri, 20 Nov 2009 13:29: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/20/t1258720180acqrv42xuxlz6ar.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: | WS7M4MLDG | | Dataseries X: | » Textbox « » Textfile « » CSV « | 264777 26,4 267366 267413
258863 29,4 264777 267366
254844 34,4 258863 264777
254868 24,4 254844 258863
277267 26,4 254868 254844
285351 25,4 277267 254868
286602 31,4 285351 277267
283042 27,4 286602 285351
276687 27,4 283042 286602
277915 29,4 276687 283042
277128 32,4 277915 276687
277103 26,4 277128 277915
275037 22,4 277103 277128
270150 19,4 275037 277103
267140 21,4 270150 275037
264993 23,4 267140 270150
287259 23,4 264993 267140
291186 25,4 287259 264993
292300 28,4 291186 287259
288186 27,4 292300 291186
281477 21,4 288186 292300
282656 17,4 281477 288186
280190 24,4 282656 281477
280408 26,4 280190 282656
276836 22,4 280408 280190
275216 14,4 276836 280408
274352 18,4 275216 276836
271311 25,4 274352 275216
289802 29,4 271311 274352
290726 26,4 289802 271311
292300 26,4 290726 289802
278506 20,4 292300 290726
269826 26,4 278506 292300
265861 29,4 269826 278506
269034 33,4 265861 269826
264176 32,4 269034 265861
255198 35,4 264176 269034
253353 34,4 255198 264176 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!
Multiple Linear Regression - Estimated Regression Equation | Y[t] = + 38700.4448705963 -357.374472052318X[t] + 0.855647370845933Y1[t] + 0.0401402690200562Y2[t] -3281.03169319582M1[t] -3516.7130856408M2[t] -5821.00541143949M3[t] -2989.17761744896M4[t] + 20876.6717415511M5[t] + 5718.67789938775M6[t] + 908.13223657077M7[t] -4151.43097655575M8[t] -5064.07466478773M9[t] + 2531.01839913112M10[t] + 3396.50452876132M11[t] -78.2294747601183t + e[t] |
Multiple Linear Regression - Ordinary Least Squares | Variable | Parameter | S.D. | T-STAT H0: parameter = 0 | 2-tail p-value | 1-tail p-value | (Intercept) | 38700.4448705963 | 12104.709906 | 3.1971 | 0.002385 | 0.001192 | X | -357.374472052318 | 86.779454 | -4.1182 | 0.00014 | 7e-05 | Y1 | 0.855647370845933 | 0.150132 | 5.6993 | 1e-06 | 0 | Y2 | 0.0401402690200562 | 0.14173 | 0.2832 | 0.778158 | 0.389079 | M1 | -3281.03169319582 | 2079.842465 | -1.5775 | 0.120855 | 0.060427 | M2 | -3516.7130856408 | 2282.880196 | -1.5405 | 0.129628 | 0.064814 | M3 | -5821.00541143949 | 2148.087604 | -2.7099 | 0.009145 | 0.004572 | M4 | -2989.17761744896 | 2406.723714 | -1.242 | 0.219914 | 0.109957 | M5 | 20876.6717415511 | 2148.958423 | 9.7148 | 0 | 0 | M6 | 5718.67789938775 | 3465.391881 | 1.6502 | 0.105043 | 0.052521 | M7 | 908.13223657077 | 2075.026862 | 0.4376 | 0.663489 | 0.331745 | M8 | -4151.43097655575 | 2155.721403 | -1.9258 | 0.059716 | 0.029858 | M9 | -5064.07466478773 | 2367.82398 | -2.1387 | 0.037271 | 0.018635 | M10 | 2531.01839913112 | 2373.771239 | 1.0662 | 0.291335 | 0.145668 | M11 | 3396.50452876132 | 2125.042774 | 1.5983 | 0.116149 | 0.058075 | t | -78.2294747601183 | 32.387464 | -2.4154 | 0.019339 | 0.009669 |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.986040149162972 | R-squared | 0.972275175761335 | Adjusted R-squared | 0.96412081569114 | F-TEST (value) | 119.233780136229 | F-TEST (DF numerator) | 15 | F-TEST (DF denominator) | 51 | p-value | 0 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 3345.57670827937 | Sum Squared Residuals | 570837059.060053 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 264777 | 265411.542353513 | -634.542353513001 | 2 | 258863 | 261808.350434387 | -2945.3504343871 | 3 | 254844 | 252474.734565891 | 2369.26543410906 | 4 | 254868 | 255125.84127123 | -257.841271230105 | 5 | 277267 | 278057.924007074 | -790.924007074084 | 6 | 285351 | 282345.683988238 | 3005.3160117625 | 7 | 286602 | 283128.817250045 | 3473.18274995475 | 8 | 283042 | 280815.431246054 | 2226.56875394572 | 9 | 276687 | 276828.668919395 | -141.668919394760 | 10 | 277915 | 278050.245165012 | -135.245165011543 | 11 | 277128 | 278561.021965501 | -1433.02196550102 | 12 | 277103 | 276606.432563794 | 496.567436205625 | 13 | 275037 | 274623.687708058 | 413.312291942228 | 14 | 270150 | 273613.129282116 | -3463.12928211643 | 15 | 267140 | 266251.380040333 | 888.619959666526 | 16 | 264993 | 265518.565334512 | -525.565334511973 | 17 | 287259 | 287348.288103795 | -89.2881037952946 | 18 | 291186 | 290362.979044437 | 823.02095556329 | 19 | 292300 | 288655.970946015 | 3644.02905398478 | 20 | 288186 | 284986.374737745 | 3199.62526225498 | 21 | 281477 | 282664.331383095 | -1187.33138309501 | 22 | 282656 | 285705.017582709 | -3049.01758270913 | 23 | 280190 | 284730.160118585 | -4540.16011858479 | 24 | 280408 | 278477.976131627 | 1930.02386837271 | 25 | 276836 | 276635.758075322 | 200.241924678429 | 26 | 275216 | 276133.22115452 | -917.221154519716 | 27 | 274352 | 270791.671684042 | 3560.32831595841 | 28 | 271311 | 270239.342134682 | 1071.65786531760 | 29 | 289802 | 289960.759283537 | -158.759283537221 | 30 | 290726 | 291496.368358993 | -770.368358992896 | 31 | 292300 | 288140.445106527 | 4159.5548934727 | 32 | 278506 | 286530.777821241 | -8024.7778212406 | 33 | 269826 | 271656.038775923 | -1830.03877592337 | 34 | 265861 | 270120.06489912 | -4259.06489911978 | 35 | 269034 | 265736.764305282 | 3297.23569471762 | 36 | 264176 | 265175.217714843 | -999.217714842883 | 37 | 255198 | 256714.463276761 | -1516.46327676108 | 38 | 253353 | 248880.923359254 | 4472.07664074592 | 39 | 246057 | 243844.603880118 | 2212.39611988217 | 40 | 235372 | 241710.838073524 | -6338.83807352357 | 41 | 258556 | 255348.2534534 | 3207.74654660028 | 42 | 260993 | 260592.583423846 | 400.416576153945 | 43 | 254663 | 260149.130814191 | -5486.13081419076 | 44 | 250643 | 249692.912104451 | 950.087895548771 | 45 | 243422 | 243936.125191605 | -514.125191604582 | 46 | 247105 | 244398.246290320 | 2706.75370968044 | 47 | 248541 | 248046.999329421 | 494.000670578608 | 48 | 245039 | 247735.683921497 | -2696.68392149716 | 49 | 237080 | 240008.089198942 | -2928.08919894229 | 50 | 237085 | 233458.258629171 | 3626.74137082918 | 51 | 225554 | 231475.287608440 | -5921.28760844024 | 52 | 226839 | 225077.365739896 | 1761.63426010406 | 53 | 247934 | 249144.260581550 | -1210.26058155028 | 54 | 248333 | 253081.622214470 | -4748.62221446953 | 55 | 246969 | 251167.881713100 | -4198.88171309964 | 56 | 245098 | 243449.504090509 | 1648.49590949112 | 57 | 246263 | 242589.835729982 | 3673.16427001772 | 58 | 255765 | 251028.42606284 | 4736.57393716001 | 59 | 264319 | 262137.054281210 | 2181.94571878959 | 60 | 268347 | 267077.689668238 | 1269.31033176171 | 61 | 273046 | 268580.459387404 | 4465.54061259572 | 62 | 273963 | 274736.117140552 | -773.117140551849 | 63 | 267430 | 270539.322221176 | -3109.32222117593 | 64 | 271993 | 267704.047446156 | 4288.95255384398 | 65 | 292710 | 293668.514570643 | -958.514570643393 | 66 | 295881 | 294590.762970017 | 1290.23702998269 | 67 | 293299 | 294890.754170122 | -1591.75417012184 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 19 | 0.0268048603408347 | 0.0536097206816693 | 0.973195139659165 | 20 | 0.00888050386709873 | 0.0177610077341975 | 0.991119496132901 | 21 | 0.00267390253593636 | 0.00534780507187272 | 0.997326097464064 | 22 | 0.00123002983133951 | 0.00246005966267902 | 0.99876997016866 | 23 | 0.000605231439091229 | 0.00121046287818246 | 0.999394768560909 | 24 | 0.00030069865810754 | 0.00060139731621508 | 0.999699301341892 | 25 | 8.2610373773177e-05 | 0.000165220747546354 | 0.999917389626227 | 26 | 0.000278331308391881 | 0.000556662616783762 | 0.999721668691608 | 27 | 0.000314389322885023 | 0.000628778645770046 | 0.999685610677115 | 28 | 0.000114358107751812 | 0.000228716215503624 | 0.999885641892248 | 29 | 3.88131572442882e-05 | 7.76263144885764e-05 | 0.999961186842756 | 30 | 4.65425799582758e-05 | 9.30851599165517e-05 | 0.999953457420042 | 31 | 0.000175083915008972 | 0.000350167830017944 | 0.999824916084991 | 32 | 0.0530987724496575 | 0.106197544899315 | 0.946901227550343 | 33 | 0.0393941069133485 | 0.078788213826697 | 0.960605893086651 | 34 | 0.0707997573252944 | 0.141599514650589 | 0.929200242674706 | 35 | 0.185982650032092 | 0.371965300064184 | 0.814017349967908 | 36 | 0.133225166264555 | 0.266450332529111 | 0.866774833735445 | 37 | 0.102169022884274 | 0.204338045768548 | 0.897830977115726 | 38 | 0.139251271252852 | 0.278502542505705 | 0.860748728747148 | 39 | 0.380340299677466 | 0.760680599354933 | 0.619659700322533 | 40 | 0.567532857117105 | 0.86493428576579 | 0.432467142882895 | 41 | 0.594819939103072 | 0.810360121793856 | 0.405180060896928 | 42 | 0.761431369922407 | 0.477137260155185 | 0.238568630077593 | 43 | 0.846337746717805 | 0.307324506564389 | 0.153662253282195 | 44 | 0.824086546252655 | 0.351826907494689 | 0.175913453747345 | 45 | 0.778059570073201 | 0.443880859853599 | 0.221940429926799 | 46 | 0.724107375925224 | 0.551785248149552 | 0.275892624074776 | 47 | 0.783687312195525 | 0.432625375608950 | 0.216312687804475 | 48 | 0.955077021348614 | 0.0898459573027725 | 0.0449229786513863 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 11 | 0.366666666666667 | NOK | 5% type I error level | 12 | 0.4 | NOK | 10% type I error level | 15 | 0.5 | NOK |
| Charts produced by software: | | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/10yyks1258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/10yyks1258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/126b71258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/126b71258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/2j9xb1258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/2j9xb1258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/3057f1258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/3057f1258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/45ju81258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/45ju81258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/5aa161258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/5aa161258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/6g8ar1258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/6g8ar1258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/7q1uk1258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/7q1uk1258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/8l5p81258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/8l5p81258715431.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/91coe1258715431.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/20/t1258720180acqrv42xuxlz6ar/91coe1258715431.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
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
|
|