Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
14.78 68216 44505 15.03 3722 -1 14.68 68135 47264 14.78 3690 1 16.42 67781 45715 14.68 3723 -1 17.89 68153 43839 16.42 3796 -1 19.06 68555 42251 17.89 3822 -1 19.66 68229 44256 19.06 3865 1 18.38 68098 43661 19.66 3889 0 17.45 68759 44860 18.38 3920 1 17.72 69342 44900 17.45 3914 0 18.07 69743 44649 17.72 3924 0 17.16 70115 45897 18.07 3886 1 18.04 69844 47814 17.16 3887 1 18.57 70245 45162 18.04 3830 -1 18.54 69407 47722 18.57 3772 1 19.9 70322 46711 18.54 3808 0 19.74 70319 44137 19.9 3823 -1 18.45 69272 43484 19.74 3872 0 17.33 70317 44523 18.45 3922 0 18.02 70452 43208 17.33 3884 -1 18.23 70935 45108 18.02 3904 1 17.43 70530 45312 18.23 3884 0 17.99 70829 44565 17.43 3863 0 19.03 71183 47313 17.99 3771 1 18.86 71290 48249 19.03 3739 0 19.09 71591 47154 18.86 3680 0 21.33 71666 49202 19.09 3645 1 23.5 71546 47428 21.33 3690 -1 21.17 71484 45307 23.5 3724 -1 20.42 71743 44395 21.17 3746 0 21.3 71933 44470 20.42 3763 0 21.9 71495 45801 21.3 3774 1 23.97 71995 45979 21.9 3783 0 24.88 72467 45643 23.97 3776 0 23.71 73011 47731 24.88 3763 1 25.23 73599 47569 23.71 3770 0 25.13 73436 48187 25.23 3782 0 22.18 73958 48334 25.13 3743 0 20.97 73938 48380 22.18 3809 0 19.7 74396 46075 20.97 3801 -1 20.82 73754 47000 19.7 3845 0 19.26 72952 45059 20.82 3832 -1 19.66 73456 46315 19.26 3827 1 19.95 74363 47625 19.66 3859 1 19.8 74814 45997 19.95 3882 -1 21.33 75328 47560 19.8 3902 1 20.19 75171 48250 21.33 3932 0 18.33 75061 47534 20.19 3884 0 16.72 76492 50021 18.33 3908 1 16.06 76895 47002 16.72 3896 -1 15.12 76712 48451 16.06 3876 1 15.35 76597 48287 15.12 3930 0 14.91 75969 46499 15.35 4047 -1 13.72 75662 44524 14.91 4030 -1 14.17 75207 47192 13.72 4031 1 13.47 74498 47833 14.17 4088 0 15.03 74514 46865 13.47 4070 0 14.46 74684 47248 15.03 4082 0 13 75681 47610 14.46 4070 0 11.35 75367 48398 13 4017 0 12.52 75661 50484 11.35 4068 1 12.01 76102 47677 12.52 4002 -1 14.68 75692 50278 12.01 3954 1 17.31 74278 50786 14.68 3988 0 17.72 74107 47094 17.31 4036 -1 17.92 73050 45046 17.72 3996 -1 20.1 74673 47900 17.92 4005 1 21.28 74596 47634 20.1 4003 0 23.8 74712 47934 21.28 3975 0 22.69 75313 48314 23.8 3942 0 25 75312 48245 22.69 3900 0 26.1 74624 49191 25 3746 0 27.26 75674 52197 26.1 3761 1 29.37 76266 47338 27.26 3737 -1 29.84 76315 50193 29.37 3724 1 25.72 76931 49296 29.84 3763 0 28.79 77476 46289 25.72 3783 -1 31.82 77226 47325 28.79 3813 0 29.7 77781 47872 31.82 3874 0 31.26 78681 47237 29.7 3839 0 33.88 78874 49856 31.26 3847 1 33.11 79240 48859 33.88 3837 0 34.42 79929 48347 33.11 3856 0 28.44 78285 48846 34.42 3810 0 29.59 78323 50654 28.44 3792 1 29.61 78202 49900 29.59 3784 0 27.25 78931 49833 29.61 3811 0 27.49 77927 49326 27.25 3847 0 28.63 77304 47347 27.49 3877 -1 27.6 75732 47331 28.63 3880 0 26.43 77718 47384 27.6 3892 1 27.37 77877 48242 26.43 3891 0 26.2 77444 49099 27.37 3940 0 22.17 77445 47655 26.2 3956 -1 19.64 77953 48300 22.17 3942 0 19.39 77209 49087 19.64 3926 0 19.72 76692 49085 19.39 3958 0 20.72 76817 48946 19.72 3940 0 24.53 76614 49436 20.72 3922 0 26.18 76117 48345 24.53 3923 0 27.04 76778 47475 26.18 3956 0 25.52 76454 46400 27.04 3980 0 26.97 76890 47320 25.52 3970 0 28.39 76719 48736 26.97 3967 1 29.66 77282 48308 28.39 3909 0 28.84 78733 48224 29.66 3921 0 26.35 79020 48853 28.84 3889 0 29.46 77079 49685 26.35 3829 0 32.95 77517 50581 29.46 3795 0 35.83 79312 49773 32.95 3717 0 33.51 79786 51734 35.83 3794 1 28.17 78647 49085 33.51 3815 -1 28.11 78597 48347 28.17 3867 0 30.66 77892 47465 28.11 3918 0 30.76 78723 48043 30.66 3950 0 31.57 79282 48709 30.76 3965 0 28.31 80069 48275 31.57 3985 0 30.34 81113 49217 28.31 3965 0 31.11 81480 49826 30.34 3974 0 32.13 82819 48909 31.11 3928 0 34.31 82659 51603 32.13 3918 1 34.69 82673 49975 34.31 3901 -1 36.74 82571 51305 34.69 3888 1 36.75 82461 50944 36.74 3904 0 40.28 82030 49380 36.75 3950 -1 38.03 83677 47473 40.28 3973 -1 40.78 84294 49304 38.03 4003 1 44.9 83240 49821 40.78 4020 0 45.94 83791 49548 44.9 4012 0 53.28 84688 49959 45.94 4015 0 48.47 84522 50021 53.28 4068 0 43.15 84199 50778 48.47 3994 0 46.84 84570 52315 43.15 4025 1 48.15 84973 50548 46.84 4013 -1 54.19 85078 52176 48.15 4002 1 52.98 85516 51764 54.19 4044 0 49.83 85821 49181 52.98 4129 -1 56.35 85363 48501 49.83 4110 0 59 85056 50276 56.35 4155 1 64.99 85286 49283 59 4124 0 65.59 84566 51038 64.99 4125 1 62.26 84533 49647 65.59 4164 -1 58.32 85338 48491 62.26 4148 0 59.41 85114 51073 58.32 4076 1 65.49 85034 52789 59.41 4114 1 61.63 85057 50705 65.49 4118 -1 62.69 84645 51639 61.63 4075 0 69.44 84910 51419 62.69 4102 0 70.84 84737 48313 69.44 4152 -1 70.95 84699 48565 70.84 4145 0 74.41 86018 50119 70.95 4197 1 73.04 85735 49428 74.41 4229 0 63.8 85302 50409 73.04 4259 0 58.89 85574 49628 63.8 4241 0 59.08 85058 50063 58.89 4210 0 61.96 84754 50879 59.08 4169 0 54.51 84533 50966 61.96 4178 0 59.28 84768 49802 54.51 4117 0 60.44 84586 51549 59.28 4092 1 63.98 85010 50336 60.44 4121 0 63.46 84755 48949 63.98 4166 -1 67.49 84698 48836 63.46 4153 0 74.12 85166 49628 67.49 4182 0 72.36 84372 49716 74.12 4166 0 79.92 85304 50085 72.36 4156 0 85.8 86083 49629 79.92 4127 0 94.77 85851 50653 85.8 4080 0 91.69 86245 51003 94.77 4086 0 92.97 86248 50615 91.69 4128 0 95.39 86432 50015 92.97 4066 0 105.45 86610 50640 95.39 4080 0 112.58 86146 48477 105.45 4071 -1 125.4 86891 49214 112.58 4093 0 133.88 86851 47802 125.4 4109 -1 133.37 87867 47586 133.88 4158 0 116.67 86895 48383 133.37 4177 0 104.11 85277 47131 116.67 4162 -1 76.61 86953 46955 104.11 4173 0 57.31 86680 48475 76.61 4198 1 41.12 85341 47058 57.31 4203 -1 41.71 84139 48318 41.12 4242 1 39.09 84807 47281 41.71 4256 0 47.94 84641 47620 39.09 4275 0 49.65 85134 46963 47.94 4280 0 59.03 85098 45930 49.65 4291 0 69.64 85411 44291 59.03 4306 -1 64.15 86305 46016 69.64 4312 1 71.05 85945 45834 64.15 4323 0 69.41 86391 45418 71.05 4328 0 75.72 86889 46126 69.41 4279 0 77.99 87028 46528 75.72 4289 0 74.47 86644 46096 77.99 4207 0 78.33 86516 47699 74.47 4264 1 76.39 87044 45440 78.33 4248 -1 81.2 87438 47572 76.39 4231 1 84.29 87706 47200 81.2 4274 0 73.74 88052 46323 84.29 4304 0 75.34 88161 45127 73.74 4306 -1 76.32 88639 47050 75.34 4311 1 76.6 88591 46950 76.32 4338 0 75.24 88697 47306 76.6 4282 0 81.89 88520 47900 75.24 4298 0 84.25 89023 46529 81.89 4274 -1 89.15 88866 47476 84.25 4219 0 89.17 89383 48485 89.15 4276 0 88.58 88299 45914 89.17 4206 -1 102.86 87416 47585 88.58 4186 1 109.53 87477 46991 102.86 4214 0 100.9 87210 44885 109.53 4234 -1 96.26 88133 44578 100.9 4227 0 97.3 88452 46221 96.26 4230 1 86.33 89050 46025 97.3 4209 0 85.52 88372 47445 86.33 4177 1 86.32 88805 46863 85.52 4153 0 97.16 89799 45986 86.32 4170 0 98.56 90154 46573 97.16 4119 0 100.27 90365 46903 98.56 4175 0 102.2 90753 45150 100.27 4162 -1 106.16 90272 47646 102.2 4170 1 103.32 90649 45826 106.16 4187 -1 94.66 90228 44727 103.32 4195 0 82.3 89990 45392 94.66 4203 0 87.9 90399 45915 82.3 4233 0 94.13 90576 45740 87.9 4235 0 94.51 89889 46575 94.13 4247 0 89.49 90512 45048 94.51 4213 -1 86.53 91000 46311 89.49 4211 1 87.86 90816 46392 86.53 4187 0 94.76 89773 45764 87.86 4228 0 95.31 89557 45848 94.76 4201 0 92.94 89774 46446 95.31 4223 0 92.02 90697 45176 92.94 4230 -1 94.51 90911 45785 92.02 4204 0 95.77 90918 45449 94.51 4214 0 104.67 91739 45321 95.77 4226 0 106.57 91563 46689 104.67 4232 1 106.29 90900 46326 106.57 4258 0 100.54 91260 45872 106.29 4222 0 93.86 91581 46303 100.54 4171 0 97.63 91623 46926 93.86 4127 0 94.62 91613 46255 97.63 4133 0 100.82 92265 45222 94.62 4139 0 100.8 91695 46518 100.82 4147 1 102.07 92232 45300 100.8 4158 -1 102.18 92132 44863 102.07 4223 0 105.79 93025 44223 102.18 4208 0 103.59 93201 44927 105.79 4221 0 96.54 93540 46008 103.59 4266 0 93.21 94102 45452 96.54 4275 0 84.4 95008 45693 93.21 4258 0 75.79 94678 46319 84.4 4262 0 59.29 95247 45417 75.79 4268 0 47.22 94223 47131 59.29 4290 1 50.58 94263 45832 47.22 4285 -1 47.82 95094 47568 50.58 4339 1
Names of X columns:
WTI_Spot_Price__FOB_(Dollars-per_Barrel) Total_Oil_Supply_World_(1000_Barrels_per_Day) Consumption_Petroleum_Products_OECD_(t-1)_(1000_Barrels_per_Day) WTI_Spot_Price__(t-1)_(Dollars-per_Barrel) World_Total_Petroleum_Stocks_End_of_Period_(Millions_Barrels) Dummy_(DemandAndSupplyTowardsPrice)_(EvenBetween-2.5%And_2.5%)
Sample Range:
(leave blank to include all observations)
From:
To:
Column Number of Endogenous Series
(?)
Fixed Seasonal Effects
Do not include Seasonal Dummies
Do not include Seasonal Dummies
Include Seasonal Dummies
Type of Equation
No Linear Trend
No Linear Trend
Linear Trend
First Differences
Seasonal Differences (s)
First and Seasonal Differences (s)
Degree of Predetermination (lagged endogenous variables)
Degree of Seasonal Predetermination
Seasonality
12
1
2
3
4
5
6
7
8
9
10
11
12
Chart options
R Code
library(lattice) library(lmtest) n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test mywarning <- '' par1 <- as.numeric(par1) if(is.na(par1)) { par1 <- 1 mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.' } if (par4=='') par4 <- 0 par4 <- as.numeric(par4) if (par5=='') par5 <- 0 par5 <- as.numeric(par5) x <- na.omit(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'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 } if (par3 == 'Seasonal Differences (s=12)'){ (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if (par3 == 'First and Seasonal Differences (s=12)'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if(par4 > 0) { x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep=''))) for (i in 1:(n-par4)) { for (j in 1:par4) { x2[i,j] <- x[i+par4-j,par1] } } x <- cbind(x[(par4+1):n,], x2) n <- n - par4 } if(par5 > 0) { x2 <- array(0, dim=c(n-par5*12,par5), dimnames=list(1:(n-par5*12), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep=''))) for (i in 1:(n-par5*12)) { for (j in 1:par5) { x2[i,j] <- x[i+par5*12-j*12,par1] } } x <- cbind(x[(par5*12+1):n,], x2) n <- n - par5*12 } 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[n,])) if (par3 == 'Linear Trend'){ x <- cbind(x, c(1:n)) colnames(x)[k+1] <- 't' } x (k <- length(x[n,])) head(x) 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, signif(mysum$coefficients[i,1],6), 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.row.start(a) a<-table.element(a, mywarning) 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,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' ')) 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,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[2],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[3],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'p-value',1,TRUE) a<-table.element(a,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' ')) 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,formatC(signif(mysum$sigma,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') if(n < 200) { 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,formatC(signif(x[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' ')) 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,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' ')) 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,signif(numsignificant1,6)) a<-table.element(a,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' ')) 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,signif(numsignificant5,6)) a<-table.element(a,signif(numsignificant5/numgqtests,6)) 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,signif(numsignificant10,6)) a<-table.element(a,signif(numsignificant10/numgqtests,6)) 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') } }
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
0 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation