| review ws8 | *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: Sat, 04 Dec 2010 09:33:17 +0000 | | Cite this page as follows: | Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk.htm/, Retrieved Sat, 04 Dec 2010 10:31:27 +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/2010/Dec/04/t1291455087jobi48ul2jx8qtk.htm/},
year = {2010},
}
@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 = {2010},
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 « | 9084 0 9700 9081
9743 0 9081 9084
8587 0 9084 9743
9731 0 9743 8587
9563 0 8587 9731
9998 0 9731 9563
9437 0 9563 9998
10038 0 9998 9437
9918 0 9437 10038
9252 0 10038 9918
9737 0 9918 9252
9035 0 9252 9737
9133 0 9737 9035
9487 0 9035 9133
8700 0 9133 9487
9627 0 9487 8700
8947 0 8700 9627
9283 0 9627 8947
8829 0 8947 9283
9947 0 9283 8829
9628 0 8829 9947
9318 0 9947 9628
9605 0 9628 9318
8640 0 9318 9605
9214 0 9605 8640
9567 0 8640 9214
8547 0 9214 9567
9185 0 9567 8547
9470 0 8547 9185
9123 0 9185 9470
9278 0 9470 9123
10170 0 9123 9278
9434 0 9278 10170
9655 0 10170 9434
9429 0 9434 9655
8739 0 9655 9429
9552 0 9429 8739
9687 0 8739 9552
9019 0 9552 9687
9672 0 9687 9019
9206 0 9019 9672
9069 0 9672 9206
9788 0 9206 9069
10312 0 9069 9788
10105 0 9788 10312
9863 0 10312 10105
9656 0 10105 9863
9295 0 9863 9656
9946 0 9656 9295
9701 0 9295 9946
9049 0 9946 9701
10190 0 9701 9049
9706 0 9049 10190
9765 0 10190 9706
9893 0 9706 9765
9994 0 9765 9893
1 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 | Births[t] = + 5632.42646760897 + 233.327295316956x[t] + 0.184925679115300`y-1`[t] + 0.141855719535449`y-2`[t] + 485.518122007314M1[t] + 884.077057591996M2[t] -117.371735721934M3[t] + 921.654299160091M4[t] + 567.78584832305M5[t] + 616.785989141178M6[t] + 611.199861323609M7[t] + 1154.83556367848M8[t] + 916.246498776956M9[t] + 598.938676886247M10[t] + 725.272206498409M11[t] + 4.70384799637204t + 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) | 5632.42646760897 | 1521.695785 | 3.7014 | 0.000485 | 0.000242 | x | 233.327295316956 | 122.061409 | 1.9116 | 0.060965 | 0.030483 | `y-1` | 0.184925679115300 | 0.130178 | 1.4206 | 0.160892 | 0.080446 | `y-2` | 0.141855719535449 | 0.129205 | 1.0979 | 0.276861 | 0.13843 | M1 | 485.518122007314 | 176.827297 | 2.7457 | 0.008064 | 0.004032 | M2 | 884.077057591996 | 177.463322 | 4.9817 | 6e-06 | 3e-06 | M3 | -117.371735721934 | 157.726562 | -0.7441 | 0.459844 | 0.229922 | M4 | 921.654299160091 | 196.252407 | 4.6963 | 1.7e-05 | 9e-06 | M5 | 567.78584832305 | 191.711759 | 2.9617 | 0.004455 | 0.002228 | M6 | 616.785989141178 | 162.79502 | 3.7887 | 0.000367 | 0.000184 | M7 | 611.199861323609 | 159.618277 | 3.8291 | 0.000322 | 0.000161 | M8 | 1154.83556367848 | 157.843079 | 7.3164 | 0 | 0 | M9 | 916.246498776956 | 162.994281 | 5.6213 | 1e-06 | 0 | M10 | 598.938676886247 | 161.398589 | 3.7109 | 0.000471 | 0.000235 | M11 | 725.272206498409 | 158.07279 | 4.5882 | 2.5e-05 | 1.3e-05 | t | 4.70384799637204 | 2.45333 | 1.9173 | 0.060212 | 0.030106 |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.882356647284765 | R-squared | 0.77855325300761 | Adjusted R-squared | 0.720277793272771 | F-TEST (value) | 13.3598817847191 | F-TEST (DF numerator) | 15 | F-TEST (DF denominator) | 57 | p-value | 1.54876111935209e-13 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 267.664628275107 | Sum Squared Residuals | 4083728.13409011 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 9084 | 9204.61931413246 | -120.619314132463 | 2 | 9743 | 9493.83866949976 | 249.161330500238 | 3 | 8587 | 8591.13142039341 | -4.13142039341149 | 4 | 9731 | 9592.74211402581 | 138.257885974188 | 5 | 9563 | 9192.08636927641 | 370.91363072359 | 6 | 9998 | 9433.51357411686 | 564.486425883143 | 7 | 9437 | 9463.2710182022 | -26.2710182022101 | 8 | 10038 | 10012.4721803092 | 25.5278196907818 | 9 | 9918 | 9760.0989448612 | 157.901055138809 | 10 | 9252 | 9541.6126177709 | -289.612617770896 | 11 | 9737 | 9555.98300467498 | 181.016995325014 | 12 | 9035 | 8781.05416785685 | 253.945832143149 | 13 | 9133 | 9261.38237711757 | -128.382377117572 | 14 | 9487 | 9548.72919447416 | -61.7291944741601 | 15 | 8700 | 8620.32389042545 | 79.6761095745493 | 16 | 9627 | 9617.87701243627 | 9.12298756373444 | 17 | 8947 | 9254.67615214122 | -307.676152141217 | 18 | 9283 | 9383.3443562115 | -100.344356211494 | 19 | 8829 | 9304.3761363558 | -475.376136355804 | 20 | 9947 | 9850.4482182207 | 96.5517817793093 | 21 | 9628 | 9691.20143743783 | -63.2014374378281 | 22 | 9318 | 9540.09239826259 | -222.092398262588 | 23 | 9605 | 9568.16321117735 | 36.8367888226475 | 24 | 8640 | 8830.98048365625 | -190.980483656246 | 25 | 9214 | 9237.38535421432 | -23.385354214315 | 26 | 9567 | 9543.62004046245 | 23.3799595375478 | 27 | 8547 | 8703.09750395309 | -156.09750395309 | 28 | 9185 | 9667.41331763303 | -482.413317633031 | 29 | 9470 | 9220.12847115837 | 249.871528841628 | 30 | 9123 | 9432.24392331603 | -309.243923316035 | 31 | 9278 | 9434.8415273639 | -156.841527363899 | 32 | 10170 | 9940.99950359012 | 229.000496409876 | 33 | 9434 | 9862.31306877347 | -428.313068773467 | 34 | 9655 | 9610.25699107189 | 44.7430089281129 | 35 | 9429 | 9636.5391828689 | -207.539182868895 | 36 | 8739 | 8924.78000683633 | -185.780006836327 | 37 | 9552 | 9275.3283268805 | 276.671673119504 | 38 | 9687 | 9666.32109185431 | 20.6789081456868 | 39 | 9019 | 8839.07124579478 | 179.92875420522 | 40 | 9672 | 9813.00647470406 | -141.006474704063 | 41 | 9206 | 9432.94330307102 | -226.943303071022 | 42 | 9069 | 9541.2989950443 | -472.298995044292 | 43 | 9788 | 9434.80711517901 | 353.192884820990 | 44 | 10312 | 10059.8061098374 | 252.193890162559 | 45 | 10105 | 10033.2148532528 | 71.7851467472319 | 46 | 9863 | 9788.14780127101 | 74.8521987289898 | 47 | 9656 | 9846.5764791751 | -190.576479175099 | 48 | 9295 | 9051.89197238332 | 243.108027616679 | 49 | 9946 | 9452.62441205784 | 493.375587942157 | 50 | 9701 | 9881.47709889585 | -180.477098895851 | 51 | 9049 | 8970.36411939617 | 78.6358806038313 | 52 | 10190 | 9876.2972817542 | 313.702718245795 | 53 | 9706 | 9568.4185121203 | 137.581487879692 | 54 | 9765 | 9764.4645325502 | 0.535467449793721 | 55 | 9893 | 9682.4477114898 | 210.552288510204 | 56 | 9994 | 10259.8554090094 | -265.855409009376 | 57 | 10433 | 10297.2954020210 | 135.704597978978 | 58 | 10073 | 10065.6435825934 | 7.35641740660755 | 59 | 10112 | 10226.7952743008 | -114.795274300782 | 60 | 9266 | 9445.18604437912 | -179.186044379119 | 61 | 9820 | 9822.61017714131 | -2.61017714131218 | 62 | 10097 | 10148.0139048135 | -51.0139048134611 | 63 | 9115 | 9293.0118200371 | -178.011820037099 | 64 | 10411 | 10248.6637994466 | 162.336200553376 | 65 | 9678 | 9901.74719223267 | -223.747192232672 | 66 | 10408 | 10091.1346187611 | 316.865381238885 | 67 | 10153 | 10058.2564914093 | 94.7435085907183 | 68 | 10368 | 10705.4185790332 | -337.418579033151 | 69 | 10581 | 10454.8762936537 | 126.123706346277 | 70 | 10597 | 10212.2466090302 | 384.753390969774 | 71 | 10680 | 10384.9428478029 | 295.057152197114 | 72 | 9738 | 9679.10732488813 | 58.8926751118645 | 73 | 9556 | 10051.050038456 | -495.050038455999 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 19 | 0.722416958132689 | 0.555166083734622 | 0.277583041867311 | 20 | 0.694757275701564 | 0.610485448596872 | 0.305242724298436 | 21 | 0.597392911243731 | 0.805214177512537 | 0.402607088756269 | 22 | 0.583922238097266 | 0.832155523805467 | 0.416077761902734 | 23 | 0.476526460963469 | 0.953052921926939 | 0.523473539036531 | 24 | 0.383682946082648 | 0.767365892165295 | 0.616317053917352 | 25 | 0.509918947750997 | 0.980162104498006 | 0.490081052249003 | 26 | 0.431390823401617 | 0.862781646803233 | 0.568609176598383 | 27 | 0.336067772354845 | 0.672135544709689 | 0.663932227645155 | 28 | 0.344518556101432 | 0.689037112202865 | 0.655481443898568 | 29 | 0.497821783578187 | 0.995643567156373 | 0.502178216421813 | 30 | 0.462961157724357 | 0.925922315448714 | 0.537038842275643 | 31 | 0.407167522464835 | 0.81433504492967 | 0.592832477535165 | 32 | 0.532559660479788 | 0.934880679040424 | 0.467440339520212 | 33 | 0.53161246076555 | 0.9367750784689 | 0.46838753923445 | 34 | 0.564035048406048 | 0.871929903187904 | 0.435964951593952 | 35 | 0.532193176938636 | 0.935613646122728 | 0.467806823061364 | 36 | 0.465282394551828 | 0.930564789103656 | 0.534717605448172 | 37 | 0.574605858158626 | 0.850788283682748 | 0.425394141841374 | 38 | 0.513267448129986 | 0.973465103740027 | 0.486732551870014 | 39 | 0.552088545837763 | 0.895822908324474 | 0.447911454162237 | 40 | 0.468435732481262 | 0.936871464962524 | 0.531564267518738 | 41 | 0.406984218252647 | 0.813968436505293 | 0.593015781747353 | 42 | 0.69446502839964 | 0.611069943200721 | 0.305534971600361 | 43 | 0.744496965357579 | 0.511006069284842 | 0.255503034642421 | 44 | 0.728528443001407 | 0.542943113997186 | 0.271471556998593 | 45 | 0.66122487451998 | 0.677550250960039 | 0.338775125480020 | 46 | 0.591943590782632 | 0.816112818434737 | 0.408056409217368 | 47 | 0.634965879046198 | 0.730068241907604 | 0.365034120953802 | 48 | 0.550837340144558 | 0.898325319710884 | 0.449162659855442 | 49 | 0.78590511568797 | 0.428189768624061 | 0.214094884312031 | 50 | 0.695163037145905 | 0.60967392570819 | 0.304836962854095 | 51 | 0.60515170020158 | 0.78969659959684 | 0.39484829979842 | 52 | 0.515026900603477 | 0.969946198793046 | 0.484973099396523 | 53 | 0.582099673288738 | 0.835800653422524 | 0.417900326711262 | 54 | 0.408364486409824 | 0.816728972819649 | 0.591635513590176 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 0 | 0 | OK | 5% type I error level | 0 | 0 | OK | 10% type I error level | 0 | 0 | OK |
| | Charts produced by software: | | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/10djav1291455189.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/10djav1291455189.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/1vqs71291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/1vqs71291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/2vqs71291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/2vqs71291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/3vqs71291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/3vqs71291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/46zrr1291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/46zrr1291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/56zrr1291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/56zrr1291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/66zrr1291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/66zrr1291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/7h88c1291455188.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/7h88c1291455188.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/82saa1291455189.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/82saa1291455189.ps (open in new window) |
| http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/92saa1291455189.png (open in new window) | http://www.freestatistics.org/blog/date/2010/Dec/04/t1291455087jobi48ul2jx8qtk/92saa1291455189.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
|