| Multi | *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: Sun, 22 Nov 2009 11:56:10 -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/22/t1258916349wnii96rg9pmx85b.htm/, Retrieved Sun, 22 Nov 2009 19:59:22 +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/22/t1258916349wnii96rg9pmx85b.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 « | 17823,2 1,2218
17872 1,249
17420,4 1,2991
16704,4 1,3408
15991,2 1,3119
16583,6 1,3014
19123,5 1,3201
17838,7 1,2938
17209,4 1,2694
18586,5 1,2165
16258,1 1,2037
15141,6 1,2292
19202,1 1,2256
17746,5 1,2015
19090,1 1,1786
18040,3 1,1856
17515,5 1,2103
17751,8 1,1938
21072,4 1,202
17170 1,2271
19439,5 1,277
19795,4 1,265
17574,9 1,2684
16165,4 1,2811
19464,6 1,2727
19932,1 1,2611
19961,2 1,2881
17343,4 1,3213
18924,2 1,2999
18574,1 1,3074
21350,6 1,3242
18594,6 1,3516
19823,1 1,3511
20844,4 1,3419
19640,2 1,3716
17735,4 1,3622
19813,6 1,3896
22160 1,4227
20664,3 1,4684
17877,4 1,457
20906,5 1,4718
21164,1 1,4748
21374,4 1,5527
22952,3 1,5751
21343,5 1,5557
23899,3 1,5553
22392,9 1,577
18274,1 1,4975
22786,7 1,437
22321,5 1,3322
17842,2 1,2732
16373,5 1,3449
15993,8 1,3239
16446,1 1,2785
17729 1,305
16643 1,319
16196,7 1,365
18252,1 1,4016
17570,4 1,4088
15836,8 1,4268 | | 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 | EUDO[t] = + 0.82485539822803 + 2.71267840761339e-05UITV[t] + e[t] |
Multiple Linear Regression - Regression Statistics | Multiple R | 0.534702307917198 | R-squared | 0.285906558091978 | Adjusted R-squared | 0.273594602197012 | F-TEST (value) | 23.2218634091175 | F-TEST (DF numerator) | 1 | F-TEST (DF denominator) | 58 | p-value | 1.07793610141238e-05 | Multiple Linear Regression - Residual Statistics | Residual Standard Deviation | 0.089609615924503 | Sum Squared Residuals | 0.465733229435943 |
Multiple Linear Regression - Actuals, Interpolation, and Residuals | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | 1 | 1.2218 | 1.30834149617378 | -0.0865414961737837 | 2 | 1.249 | 1.30966528323670 | -0.0606652832366949 | 3 | 1.2991 | 1.29741482754791 | 0.00168517245208699 | 4 | 1.3408 | 1.2779920501494 | 0.062807949850599 | 5 | 1.3119 | 1.25864522774630 | 0.0532547722536977 | 6 | 1.3014 | 1.27471513463300 | 0.0266848653669959 | 7 | 1.3201 | 1.34361445350798 | -0.0235144535079765 | 8 | 1.2938 | 1.30876196132696 | -0.0149619613269597 | 9 | 1.2694 | 1.29169107610785 | -0.0222910761078486 | 10 | 1.2165 | 1.32904737045909 | -0.112547370459093 | 11 | 1.2037 | 1.26588536641622 | -0.0621853664162225 | 12 | 1.2292 | 1.23559831199522 | -0.00639831199521889 | 13 | 1.2256 | 1.34574661873636 | -0.120146618736361 | 14 | 1.2015 | 1.30626087183514 | -0.104760871835140 | 15 | 1.1786 | 1.34270841891983 | -0.164108418919834 | 16 | 1.1856 | 1.31423072099671 | -0.128630720996708 | 17 | 1.2103 | 1.29999458471355 | -0.0896945847135533 | 18 | 1.1938 | 1.30640464379074 | -0.112604643790744 | 19 | 1.202 | 1.39648184299395 | -0.194481842993954 | 20 | 1.2271 | 1.29062228081525 | -0.0635222808152489 | 21 | 1.277 | 1.35218651727603 | -0.075186517276035 | 22 | 1.265 | 1.36184093972873 | -0.096840939728731 | 23 | 1.2684 | 1.30160591568768 | -0.0332059156876757 | 24 | 1.2811 | 1.26337071353236 | 0.0177292864676351 | 25 | 1.2727 | 1.35286739955635 | -0.0801673995563459 | 26 | 1.2611 | 1.36554917111194 | -0.104449171111938 | 27 | 1.2881 | 1.36633856052855 | -0.078238560528554 | 28 | 1.3213 | 1.29532606517405 | 0.0259739348259493 | 29 | 1.2999 | 1.33820808544160 | -0.0383080854416030 | 30 | 1.3074 | 1.32871099833655 | -0.0213109983365487 | 31 | 1.3242 | 1.40402851432393 | -0.0798285143239343 | 32 | 1.3516 | 1.32926709741011 | 0.0223329025898906 | 33 | 1.3511 | 1.36259235164764 | -0.0114923516476398 | 34 | 1.3419 | 1.39029693622460 | -0.0483969362245954 | 35 | 1.3716 | 1.35763086284012 | 0.0139691371598850 | 36 | 1.3622 | 1.30595976453190 | 0.056240235468105 | 37 | 1.3896 | 1.36233464719892 | 0.0272653528010834 | 38 | 1.4227 | 1.42598493335516 | -0.0032849333551571 | 39 | 1.4684 | 1.38541140241248 | 0.0829885975875163 | 40 | 1.457 | 1.30981176787071 | 0.147188232129294 | 41 | 1.4718 | 1.39198150951572 | 0.0798184904842767 | 42 | 1.4748 | 1.39896936909374 | 0.0758306309062647 | 43 | 1.5527 | 1.40467413178495 | 0.148025868215054 | 44 | 1.5751 | 1.44747748437868 | 0.127622515621322 | 45 | 1.5557 | 1.40383591415699 | 0.151864085843006 | 46 | 1.5553 | 1.47316654889878 | 0.082133451101223 | 47 | 1.577 | 1.43230276136649 | 0.144697238633511 | 48 | 1.4975 | 1.32057296311371 | 0.176927036886292 | 49 | 1.437 | 1.44298528893567 | -0.00598528893567027 | 50 | 1.3322 | 1.43036590898345 | -0.0981659089834528 | 51 | 1.2732 | 1.30885690507123 | -0.0356569050712261 | 52 | 1.3449 | 1.26901579729861 | 0.0758842027013917 | 53 | 1.3239 | 1.2587157573849 | 0.0651842426150998 | 54 | 1.2785 | 1.27098520182254 | 0.00751479817746438 | 55 | 1.305 | 1.30578615311381 | -0.000786153113807886 | 56 | 1.319 | 1.27632646560713 | 0.0426735343928736 | 57 | 1.365 | 1.26421978187395 | 0.100780218126052 | 58 | 1.4016 | 1.31997617386403 | 0.0816238261359665 | 59 | 1.4088 | 1.30148384515933 | 0.107316154840667 | 60 | 1.4268 | 1.25445685228495 | 0.172343147715053 |
Goldfeld-Quandt test for Heteroskedasticity | p-values | Alternative Hypothesis | breakpoint index | greater | 2-sided | less | 5 | 0.0680389520275418 | 0.136077904055084 | 0.931961047972458 | 6 | 0.0213866909295609 | 0.0427733818591219 | 0.978613309070439 | 7 | 0.0484911579490474 | 0.0969823158980948 | 0.951508842050953 | 8 | 0.0194961620368426 | 0.0389923240736852 | 0.980503837963157 | 9 | 0.00853158642016578 | 0.0170631728403316 | 0.991468413579834 | 10 | 0.00776369785433023 | 0.0155273957086605 | 0.99223630214567 | 11 | 0.01715041046357 | 0.03430082092714 | 0.98284958953643 | 12 | 0.0112836045482085 | 0.0225672090964169 | 0.988716395451791 | 13 | 0.0083707861979769 | 0.0167415723959538 | 0.991629213802023 | 14 | 0.00848908976108815 | 0.0169781795221763 | 0.991510910238912 | 15 | 0.0122390356246309 | 0.0244780712492618 | 0.98776096437537 | 16 | 0.0142367372244303 | 0.0284734744488606 | 0.98576326277557 | 17 | 0.0112550590055374 | 0.0225101180110748 | 0.988744940994463 | 18 | 0.0115106353851468 | 0.0230212707702937 | 0.988489364614853 | 19 | 0.0143433130702333 | 0.0286866261404666 | 0.985656686929767 | 20 | 0.0105159956284337 | 0.0210319912568674 | 0.989484004371566 | 21 | 0.0103201138626563 | 0.0206402277253125 | 0.989679886137344 | 22 | 0.0102217632700013 | 0.0204435265400025 | 0.989778236729999 | 23 | 0.007029235826497 | 0.014058471652994 | 0.992970764173503 | 24 | 0.00419742869240824 | 0.00839485738481649 | 0.995802571307592 | 25 | 0.00427934633721960 | 0.00855869267443919 | 0.99572065366278 | 26 | 0.00535039530183814 | 0.0107007906036763 | 0.994649604698162 | 27 | 0.00728165331231167 | 0.0145633066246233 | 0.992718346687688 | 28 | 0.00741848715748327 | 0.0148369743149665 | 0.992581512842517 | 29 | 0.00816520493227677 | 0.0163304098645535 | 0.991834795067723 | 30 | 0.00869624636296177 | 0.0173924927259235 | 0.991303753637038 | 31 | 0.0190598851610973 | 0.0381197703221946 | 0.980940114838903 | 32 | 0.0264570995783551 | 0.0529141991567103 | 0.973542900421645 | 33 | 0.0371859206238326 | 0.0743718412476651 | 0.962814079376167 | 34 | 0.0572615637722851 | 0.114523127544570 | 0.942738436227715 | 35 | 0.0751060083579315 | 0.150212016715863 | 0.924893991642069 | 36 | 0.0825238371143128 | 0.165047674228626 | 0.917476162885687 | 37 | 0.101554404463711 | 0.203108808927422 | 0.89844559553629 | 38 | 0.137231035226420 | 0.274462070452839 | 0.86276896477358 | 39 | 0.199222981516519 | 0.398445963033038 | 0.800777018483481 | 40 | 0.33212415546889 | 0.66424831093778 | 0.66787584453111 | 41 | 0.350304488609884 | 0.700608977219768 | 0.649695511390116 | 42 | 0.342816431028333 | 0.685632862056667 | 0.657183568971667 | 43 | 0.452978566396098 | 0.905957132792197 | 0.547021433603902 | 44 | 0.490352365139488 | 0.980704730278977 | 0.509647634860512 | 45 | 0.586429463015877 | 0.827141073968246 | 0.413570536984123 | 46 | 0.553928420820472 | 0.892143158359056 | 0.446071579179528 | 47 | 0.771633337769014 | 0.456733324461972 | 0.228366662230986 | 48 | 0.932278395239436 | 0.135443209521129 | 0.0677216047605644 | 49 | 0.936841292161853 | 0.126317415676295 | 0.0631587078381474 | 50 | 0.899844478684905 | 0.200311042630191 | 0.100155521315095 | 51 | 0.906988160046388 | 0.186023679907224 | 0.0930118399536118 | 52 | 0.845999562792767 | 0.308000874414466 | 0.154000437207233 | 53 | 0.765185938951235 | 0.46962812209753 | 0.234814061048765 | 54 | 0.80294331568022 | 0.39411336863956 | 0.19705668431978 | 55 | 0.810393271430595 | 0.379213457138809 | 0.189606728569404 |
Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity | Description | # significant tests | % significant tests | OK/NOK | 1% type I error level | 2 | 0.0392156862745098 | NOK | 5% type I error level | 25 | 0.490196078431373 | NOK | 10% type I error level | 28 | 0.549019607843137 | NOK |
| Charts produced by software: | ![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/10syf61258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/10syf61258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/10syf61258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/1wdth1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/1wdth1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/1wdth1258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/2xx431258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/2xx431258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/2xx431258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/3jmix1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/3jmix1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/3jmix1258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/4ti1i1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/4ti1i1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/4ti1i1258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/5iaks1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/5iaks1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/5iaks1258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/6v2js1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/6v2js1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/6v2js1258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/7a8c01258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/7a8c01258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/7a8c01258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/8gzoc1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/8gzoc1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/8gzoc1258916165.ps (open in new window) |
![](http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/97ard1258916165.png) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/97ard1258916165.png (open in new window) | http://www.freestatistics.org/blog/date/2009/Nov/22/t1258916349wnii96rg9pmx85b/97ard1258916165.ps (open in new window) |
| | Parameters (Session): | par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; | | Parameters (R input): | par1 = 2 ; par2 = Do not include Seasonal Dummies ; par3 = No 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
|
|