Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
4581945 1.21 2.50 2.47 1.79 1.79 9656062 3874038 1.22 2.51 2.51 1.78 1.85 8063164 4086290 1.22 2.45 2.51 1.80 1.87 8514407 4364364 1.22 2.46 2.51 1.81 1.86 8829978 3793586 1.21 2.44 2.49 1.82 1.86 7920583 4533914 1.23 2.47 2.52 1.76 1.87 9385093 4823043 1.22 2.47 2.51 1.78 1.86 9898542 3981535 1.22 2.45 2.54 1.80 1.86 8322279 4746356 1.22 2.47 2.53 1.73 1.88 9837172 5284534 1.22 2.48 2.55 1.75 1.90 10839587 4264830 1.23 2.45 2.50 1.80 1.86 8890176 3924674 1.22 2.46 2.59 1.79 1.86 8194413 3734753 1.21 2.45 2.56 1.78 1.84 7722000 3762290 1.22 2.43 2.59 1.80 1.82 7769178 3609739 1.21 2.44 2.58 1.79 1.80 7449343 3877594 1.22 2.41 2.62 1.76 1.84 7929370 3636415 1.21 2.41 2.59 1.76 1.83 7473017 3578195 1.20 2.41 2.58 1.77 1.79 7472424 3604342 1.18 2.41 2.57 1.76 1.81 7292436 3459513 1.19 2.38 2.57 1.74 1.78 7215340 3366571 1.20 2.41 2.55 1.75 1.74 7216230 3371277 1.19 2.39 2.51 1.70 1.74 7378041 3724848 1.19 2.37 2.50 1.71 1.77 7877412 3350830 1.20 2.40 2.59 1.77 1.76 7158125 3305159 1.21 2.35 2.63 1.77 1.74 7137912 3390736 1.20 2.35 2.63 1.77 1.77 7290803 3349758 1.20 2.33 2.61 1.77 1.75 7425266 3253655 1.20 2.35 2.64 1.77 1.78 7450430 3734250 1.21 2.36 2.67 1.77 1.78 9214042 3455433 1.21 2.41 2.63 1.79 1.79 8158864 2966726 1.21 2.37 2.58 1.79 1.78 6515759 2993716 1.20 2.34 2.56 1.76 1.74 6308487 3009320 1.21 2.37 2.57 1.76 1.76 6366367 3169713 1.21 2.34 2.55 1.78 1.76 6770097 3170061 1.21 2.34 2.58 1.81 1.77 6700697 3368934 1.20 2.33 2.50 1.77 1.84 7140792 3292638 1.19 2.33 2.56 1.75 1.85 6891715 3337344 1.20 2.34 2.62 1.77 1.84 7057521 3208306 1.20 2.37 2.71 1.72 1.83 6806593 3359130 1.20 2.38 2.74 1.80 1.83 7068776 3223078 1.22 2.41 2.76 1.77 1.82 6868085 3437159 1.22 2.39 2.66 1.80 1.84 7245015 3400156 1.21 2.38 2.61 1.79 1.84 7160726 3657576 1.25 2.45 2.68 1.82 1.65 7927365 3765613 1.25 2.41 2.70 1.81 1.64 8275238 3481921 1.27 2.46 2.70 1.80 1.66 7510220 3604800 1.28 2.40 2.72 1.76 1.65 7751398 3981340 1.27 2.31 2.77 1.73 1.64 8701633 3734078 1.28 2.42 2.76 1.77 1.65 8164755 4018173 1.29 2.46 2.72 1.78 1.65 8534307 3887417 1.26 2.45 2.69 1.77 1.68 8333017 3919880 1.27 2.48 2.70 1.75 1.66 8568251 4014466 1.25 2.45 2.69 1.75 1.66 8613013 4197758 1.27 2.45 2.66 1.78 1.66 9139357 3896531 1.27 2.43 2.74 1.76 1.63 8385716 3964742 1.27 2.44 2.76 1.73 1.64 8451237 4201847 1.29 2.46 2.79 1.77 1.66 9033401 4050512 1.26 2.48 2.78 1.78 1.68 8565930 3997402 1.27 2.52 2.80 1.80 1.68 8562307 4314479 1.27 2.51 2.78 1.81 1.69 9255216 4925744 1.28 2.50 2.76 1.79 1.71 10502760 5130631 1.28 2.50 2.73 1.79 1.71 10855161 4444855 1.28 2.53 2.72 1.79 1.69 9473338 3967319 1.27 2.54 2.73 1.76 1.68 8521439 3931250 1.24 2.54 2.74 1.78 1.66 8169912 4235952 1.25 2.53 2.72 1.81 1.65 8705590 4169219 1.25 2.48 2.71 1.82 1.67 8600302 3779064 1.24 2.47 2.66 1.80 1.64 7884570 3558810 1.24 2.44 2.68 1.78 1.62 7509946 3699466 1.23 2.44 2.67 1.76 1.62 7796000 3650693 1.24 2.43 2.68 1.76 1.64 7651158 3525633 1.23 2.41 2.67 1.76 1.60 7430052 3470276 1.24 2.42 2.71 1.77 1.60 7581024 3859094 1.24 2.43 2.69 1.78 1.60 8431470 3661155 1.24 2.42 2.64 1.78 1.59 7903994 3356365 1.25 2.46 2.66 1.79 1.63 7462642 3344440 1.26 2.47 2.70 1.84 1.65 7424743 3338684 1.26 2.46 2.69 1.91 1.65 7480504 3404294 1.27 2.43 2.71 1.92 1.64 7863944 3289319 1.26 2.46 2.74 1.86 1.64 7703698 3469252 1.28 2.46 2.78 1.76 1.67 8508132 3571850 1.29 2.47 2.79 1.80 1.67 8933008 3639914 1.28 2.48 2.75 1.81 1.70 8491850 3091730 1.27 2.43 2.69 1.80 1.64 6940275 3078149 1.30 2.42 2.69 1.81 1.66 6917191 3188115 1.30 2.45 2.69 1.80 1.66 7096722 3246082 1.28 2.43 2.72 1.80 1.65 7105114 3486992 1.29 2.44 2.69 1.76 1.66 7647797 3378187 1.27 2.42 2.70 1.76 1.67 7440408 3282306 1.26 2.43 2.68 1.76 1.67 7255613 3288345 1.27 2.43 2.70 1.78 1.65 7231703 3325749 1.27 2.40 2.72 1.77 1.63 7278022 3352262 1.27 2.39 2.70 1.80 1.67 7382680 3531954 1.28 2.42 2.66 1.80 1.66 7622740 3722622 1.29 2.41 2.68 1.81 1.68 8295038 3809365 1.28 2.37 2.65 1.79 1.66 8136158 3750617 1.30 2.38 2.69 1.81 1.66 8240817 3615286 1.30 2.37 2.66 1.81 1.66 7993962 3696556 1.30 2.38 2.69 1.79 1.66 7997958 4123959 1.29 2.37 2.69 1.79 1.66 8914911 4136163 1.30 2.40 2.65 1.79 1.66 9082346 3933392 1.29 2.66 2.66 1.79 1.67 8690947 4035576 1.28 2.50 2.63 1.80 1.65 8678669 4551202 1.30 2.60 2.65 1.86 1.72 9768461 4032195 1.30 2.64 2.60 1.93 1.73 8751448 3970893 1.31 2.67 2.57 1.81 1.72 8737854 4489016 1.32 2.72 2.65 1.70 1.74 9684075 5426127 1.33 2.73 2.69 1.74 1.76 11529582 4578224 1.32 2.48 2.71 1.74 1.74 9854882 4126390 1.30 2.41 2.72 1.73 1.71 9030507 4892100 1.31 2.47 2.73 1.76 1.75 10656814 4128697 1.30 2.54 2.72 1.75 1.71 9111428 4408721 1.30 2.56 2.73 1.79 1.72 9642906 4199465 1.30 2.52 2.72 1.79 1.72 9217060 4074767 1.29 2.52 2.70 1.83 1.71 8816389 4161758 1.29 2.51 2.72 1.82 1.70 9074790 3891319 1.30 2.51 2.70 1.85 1.67 8601172 4470302 1.30 2.51 2.72 1.85 1.69 9735782 4283111 1.29 2.46 2.70 1.86 1.69 9222117 3845962 1.27 2.45 2.65 1.83 1.69 8197462 3911471 1.26 2.45 2.66 1.87 1.72 8161117 3798478 1.25 2.43 2.69 1.88 1.69 8085780 3644313 1.26 2.42 2.70 1.92 1.73 7777563 3784029 1.27 2.39 2.71 1.91 1.72 8192525 3647134 1.26 2.39 2.69 1.93 1.74 8222640 3994662 1.25 2.39 2.72 1.90 1.75 8852425 3607836 1.25 2.41 2.71 1.91 1.71 8047626 3566008 1.25 2.37 2.71 1.89 1.72 8079925 3511412 1.26 2.38 2.74 1.91 1.72 8099820 3258665 1.26 2.41 2.82 1.92 1.72 7444464 3486573 1.26 2.46 2.76 1.91 1.72 8060967 3369443 1.27 2.47 2.77 1.95 1.74 7904184 3465544 1.28 2.50 2.77 1.95 1.74 8532755 3905224 1.29 2.52 2.81 1.97 1.78 10077590 3733881 1.30 2.53 2.77 1.97 1.77 9163186 3220642 1.26 2.51 2.76 1.94 1.72 7027349 3225812 1.25 2.43 2.73 1.93 1.73 7000371 3354461 1.26 2.53 2.72 1.92 1.71 7234027 3352261 1.25 2.52 2.73 1.93 1.71 7166769 3450652 1.24 2.49 2.71 1.91 1.72 7538708
Names of X columns:
QPILS PPILS PLUX PFRU PWIT PNA BUDBEER
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
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 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') }
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