| Paper: Multiple Regression | | *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, 19 Dec 2010 15:42:29 +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/19/t1292773304pskov1ajctzm9th.htm/, Retrieved Sun, 19 Dec 2010 16:41:44 +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/19/t1292773304pskov1ajctzm9th.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 « | | 695 0 641 696 729 839 627 608
638 0 695 641 696 729 696 651
762 0 638 695 641 696 825 691
635 0 762 638 695 641 677 627
721 0 635 762 638 695 656 634
854 0 721 635 762 638 785 731
418 0 854 721 635 762 412 475
367 0 418 854 721 635 352 337
824 0 367 418 854 721 839 803
687 0 824 367 418 854 729 722
601 0 687 824 367 418 696 590
676 0 601 687 824 367 641 724
740 0 676 601 687 824 695 627
691 0 740 676 601 687 638 696
683 0 691 740 676 601 762 825
594 0 683 691 740 676 635 677
729 0 594 683 691 740 721 656
731 0 729 594 683 691 854 785
386 0 731 729 594 683 418 412
331 0 386 731 729 594 367 352
706 0 331 386 731 729 824 839
715 0 706 331 386 731 687 729
657 0 715 706 331 386 601 696
653 0 657 715 706 331 676 641
642 0 653 657 715 706 740 695
643 0 642 653 657 715 691 638
718 0 643 642 653 657 683 762
654 0 718 643 642 653 594 635
632 0 654 718 643 642 729 721
731 0 632 654 718 643 731 854
392 1 731 632 654 718 386 418
344 1 392 731 632 654 331 367
792 1 344 392 731 632 706 824
8 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 | | faillissement[t] = -122.703425274455 + 78.463476286789crisis[t] + 0.0523803521122521`t-1`[t] + 0.0444563774906133`t-2`[t] + 0.063446088726049`t-3`[t] -0.00750219719536323`t-4`[t] + 0.668851325427979`t-12`[t] + 0.345558412581939`t-24`[t] + 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) | -122.703425274455 | 118.622544 | -1.0344 | 0.305735 | 0.152867 | | crisis | 78.463476286789 | 20.476574 | 3.8319 | 0.000344 | 0.000172 | | `t-1` | 0.0523803521122521 | 0.072402 | 0.7235 | 0.472633 | 0.236317 | | `t-2` | 0.0444563774906133 | 0.082172 | 0.541 | 0.590807 | 0.295404 | | `t-3` | 0.063446088726049 | 0.072969 | 0.8695 | 0.388572 | 0.194286 | | `t-4` | -0.00750219719536323 | 0.075037 | -0.1 | 0.920745 | 0.460372 | | `t-12` | 0.668851325427979 | 0.143201 | 4.6707 | 2.2e-05 | 1.1e-05 | | `t-24` | 0.345558412581939 | 0.154023 | 2.2436 | 0.029146 | 0.014573 |
| Multiple Linear Regression - Regression Statistics | | Multiple R | 0.899985961342426 | | R-squared | 0.80997473061345 | | Adjusted R-squared | 0.784394405888338 | | F-TEST (value) | 31.6639737500396 | | F-TEST (DF numerator) | 7 | | F-TEST (DF denominator) | 52 | | p-value | 1.11022302462516e-16 | | Multiple Linear Regression - Residual Statistics | | Residual Standard Deviation | 73.883945471156 | | Sum Squared Residuals | 283859.544716007 |
| Multiple Linear Regression - Actuals, Interpolation, and Residuals | | Time or Index | Actuals | Interpolation Forecast | Residuals Prediction Error | | 1 | 695 | 611.241170290506 | 83.7588297094942 | | 2 | 638 | 671.365882501669 | -33.3658825016687 | | 3 | 762 | 767.643041926765 | -5.64304192676461 | | 4 | 635 | 654.337167140086 | -19.3371671400856 | | 5 | 721 | 637.548938578817 | 83.4510614211828 | | 6 | 854 | 764.503616161986 | 89.4963838380138 | | 7 | 418 | 428.361027731063 | -10.3610277310628 | | 8 | 367 | 330.026894628637 | 36.9731053713627 | | 9 | 824 | 802.526472673378 | 21.4735273266224 | | 10 | 687 | 693.9728542089 | -6.97285420890017 | | 11 | 601 | 639.462713734943 | -38.4627137349425 | | 12 | 676 | 667.762958729284 | 8.23704127071627 | | 13 | 740 | 658.346423952423 | 81.653576047577 | | 14 | 691 | 646.323437103487 | 44.6765628965134 | | 15 | 683 | 779.52025319878 | -96.52025319878 | | 16 | 594 | 644.333969382177 | -50.3339693821765 | | 17 | 729 | 685.991955378767 | 43.0080446212331 | | 18 | 731 | 822.500985775012 | -91.5009857750121 | | 19 | 386 | 402.508207341752 | -16.5082073417520 | | 20 | 331 | 338.913893794667 | -7.91389379466694 | | 21 | 706 | 793.7616223983 | -87.7616223983001 | | 22 | 715 | 659.411191705887 | 55.5888082941131 | | 23 | 657 | 606.727837984335 | 50.2721620156654 | | 24 | 653 | 659.452925792345 | -6.45292579234464 | | 25 | 642 | 715.889264446529 | -73.8892644465287 | | 26 | 643 | 658.917317679321 | -15.9173176793208 | | 27 | 718 | 696.1604535182 | 21.8395464818002 | | 28 | 654 | 596.051851755908 | 57.9481482440921 | | 29 | 632 | 716.192660205219 | -84.1926602052187 | | 30 | 731 | 764.243010280862 | -33.243010280862 | | 31 | 392 | 460.873711495473 | -68.8737114954731 | | 32 | 344 | 392.191978229303 | -48.1919782293028 | | 33 | 792 | 789.792662066212 | 2.20733793378826 | | 34 | 852 | 747.552371497606 | 104.447628502394 | | 35 | 649 | 701.598081973644 | -52.598081973644 | | 36 | 629 | 745.657682000875 | -116.657682000875 | | 37 | 685 | 750.789585133611 | -65.7895851336115 | | 38 | 617 | 723.240558567889 | -106.240558567889 | | 39 | 715 | 769.82165812631 | -54.8216581263104 | | 40 | 715 | 702.073740329332 | 12.9262596706678 | | 41 | 629 | 733.631664786247 | -104.631664786247 | | 42 | 916 | 802.762218651564 | 113.237781348436 | | 43 | 531 | 467.278664257589 | 63.7213357424113 | | 44 | 357 | 403.304269091188 | -46.3042690911879 | | 45 | 917 | 825.158397422909 | 91.8416025770912 | | 46 | 828 | 863.417215406721 | -35.4172154067214 | | 47 | 708 | 719.680454953725 | -11.6804549537245 | | 48 | 858 | 731.514126943283 | 126.485873056717 | | 49 | 775 | 757.843013820791 | 17.1569861792091 | | 50 | 785 | 708.081734405807 | 76.9182655941932 | | 51 | 1006 | 806.797146403147 | 199.202853596853 | | 52 | 789 | 790.31067464605 | -1.31067464604990 | | 53 | 734 | 724.902641853983 | 9.09735814601649 | | 54 | 906 | 952.491865452292 | -46.4918654522917 | | 55 | 532 | 568.978336264838 | -36.9783362648382 | | 56 | 387 | 422.206088986301 | -35.2060889863012 | | 57 | 991 | 938.676511931538 | 52.3234880684625 | | 58 | 841 | 900.05459156188 | -59.0545915618802 | | 59 | 892 | 762.24481282967 | 129.755187170330 | | 60 | 782 | 891.073540910223 | -109.073540910223 |
| Goldfeld-Quandt test for Heteroskedasticity | | p-values | Alternative Hypothesis | | breakpoint index | greater | 2-sided | less | | 11 | 0.366296828505451 | 0.732593657010903 | 0.633703171494549 | | 12 | 0.235518118772881 | 0.471036237545761 | 0.76448188122712 | | 13 | 0.20249548598751 | 0.40499097197502 | 0.79750451401249 | | 14 | 0.118222352995701 | 0.236444705991402 | 0.8817776470043 | | 15 | 0.306266616760127 | 0.612533233520254 | 0.693733383239873 | | 16 | 0.270302153525888 | 0.540604307051776 | 0.729697846474112 | | 17 | 0.193403678967360 | 0.386807357934719 | 0.80659632103264 | | 18 | 0.238940330303897 | 0.477880660607795 | 0.761059669696103 | | 19 | 0.180822116827093 | 0.361644233654186 | 0.819177883172907 | | 20 | 0.140580468939363 | 0.281160937878726 | 0.859419531060637 | | 21 | 0.136927740931019 | 0.273855481862037 | 0.863072259068981 | | 22 | 0.163412149817833 | 0.326824299635666 | 0.836587850182167 | | 23 | 0.163148443514637 | 0.326296887029274 | 0.836851556485363 | | 24 | 0.112990413127758 | 0.225980826255516 | 0.887009586872242 | | 25 | 0.106348845636183 | 0.212697691272367 | 0.893651154363817 | | 26 | 0.0717534596194758 | 0.143506919238952 | 0.928246540380524 | | 27 | 0.0487262992485758 | 0.0974525984971515 | 0.951273700751424 | | 28 | 0.0459305936469611 | 0.0918611872939222 | 0.954069406353039 | | 29 | 0.0417330384204142 | 0.0834660768408284 | 0.958266961579586 | | 30 | 0.0258565842315159 | 0.0517131684630319 | 0.974143415768484 | | 31 | 0.0163387602299168 | 0.0326775204598335 | 0.983661239770083 | | 32 | 0.0100357595279463 | 0.0200715190558925 | 0.989964240472054 | | 33 | 0.00843733915742236 | 0.0168746783148447 | 0.991562660842578 | | 34 | 0.0162944310138086 | 0.0325888620276173 | 0.983705568986191 | | 35 | 0.0102447807704118 | 0.0204895615408236 | 0.989755219229588 | | 36 | 0.0173329480357047 | 0.0346658960714095 | 0.982667051964295 | | 37 | 0.0156897867476944 | 0.0313795734953889 | 0.984310213252306 | | 38 | 0.0233407503504210 | 0.0466815007008421 | 0.976659249649579 | | 39 | 0.0189020707652204 | 0.0378041415304407 | 0.98109792923478 | | 40 | 0.0119895130056501 | 0.0239790260113002 | 0.98801048699435 | | 41 | 0.076502631909536 | 0.153005263819072 | 0.923497368090464 | | 42 | 0.135110608252103 | 0.270221216504205 | 0.864889391747897 | | 43 | 0.129816586035655 | 0.259633172071310 | 0.870183413964345 | | 44 | 0.101910414285684 | 0.203820828571367 | 0.898089585714316 | | 45 | 0.0826698677694323 | 0.165339735538865 | 0.917330132230568 | | 46 | 0.0639520081351108 | 0.127904016270222 | 0.93604799186489 | | 47 | 0.0634643227980983 | 0.126928645596197 | 0.936535677201902 | | 48 | 0.0521377261665826 | 0.104275452333165 | 0.947862273833417 | | 49 | 0.0245357262656658 | 0.0490714525313315 | 0.975464273734334 |
| 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 | 11 | 0.282051282051282 | NOK | | 10% type I error level | 15 | 0.384615384615385 | NOK |
| | | | Charts produced by software: |  | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/10fyei1292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/10fyei1292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/19fz61292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/19fz61292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/2jog91292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/2jog91292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/3jog91292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/3jog91292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/4jog91292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/4jog91292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/5ugfc1292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/5ugfc1292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/6ugfc1292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/6ugfc1292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/75pwf1292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/75pwf1292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/85pwf1292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/85pwf1292773340.ps (open in new window) |
 | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/9fyei1292773340.png (open in new window) | | http://www.freestatistics.org/blog/date/2010/Dec/19/t1292773304pskov1ajctzm9th/9fyei1292773340.ps (open in new window) |
| | | | Parameters (Session): | | par1 = 48 ; par2 = 1 ; par3 = 0 ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ; | | | | Parameters (R input): | | par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ; par4 = 0 ; par5 = 12 ; par6 = White Noise ; par7 = 0.95 ; | | | | 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
|