Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
11110 104970 2764 21046 8.40 0.85 -7.91 9990 105880 3043 20878 8.60 0.89 -6.31 10370 105160 2690 21437 11.30 0.98 -6.24 9530 109990 2574 21103 13.20 1.14 -6.27 9300 108690 2901 22227 12.60 1.56 -7.02 8485 106580 3250 22393 13.55 1.80 -7.85 8645 109370 2743 21861 13.90 2.14 -9.13 7450 112570 3312 22741 15.50 2.50 -9.78 8300 113000 3084 22657 13.20 2.91 -9.07 7440 116620 3270 21928 13.60 3.13 -9.98 6720 115100 3382 22979 13.85 3.34 -6.28 6555 109280 2680 22783 13.20 3.66 -4.28 6375 110530 2866 22412 11.50 3.68 -4.15 6390 112000 2739 22178 10.60 3.64 0.48 6030 117630 2629 21026 11.70 3.74 1.20 6185 115950 2846 21450 12.95 3.84 3.39 5715 119190 2837 20900 13.50 3.83 1.82 5610 119750 2625 20556 12.05 3.77 1.64 5195 117390 2635 20270 11.55 3.71 1.29 5050 113540 2720 19963 10.55 3.65 3.99 4830 113960 2343 19049 6.95 3.59 5.74 4390 115150 2118 18566 6.20 3.50 8.31 4260 115550 1944 19266 8.90 3.41 9.11 4620 117210 1984 19061 7.80 3.27 8.24 4510 120590 1948 18729 9.65 2.96 7.11 4475 119280 2174 19233 7.35 2.86 10.62 5720 119060 2631 20492 4.90 2.76 9.87 5070 115400 2729 20116 8.55 2.57 7.85 5190 111910 2531 20420 8.35 2.38 8.52 4650 106550 2686 20929 9.90 2.27 6.37 4680 107700 2702 21097 9.60 2.23 4.11 5150 107090 2898 21920 7.25 2.19 1.67 5450 107260 3045 22653 7.05 2.17 0.37 6595 106820 2722 22891 7.65 2.20 0.06 6660 106500 2689 23081 10.15 2.26 -0.56 6020 102260 3120 23452 9.00 2.42 -1.98 6530 100140 3351 24845 9.25 2.57 -3.03 5685 99810 3660 24725 10.45 2.69 -0.06 5865 99490 3104 23215 9.95 2.87 0.11 6825 97380 2580 23253 6.30 3.09 -0.47 5835 93310 2956 23555 9.45 3.38 -1.09 5890 95110 3019 23378 9.40 3.62 -1.24 6345 97140 3054 23421 7.50 3.82 -1.11 6145 98100 3157 24370 7.55 4.11 -1.42 6290 93200 2920 24366 7.00 4.30 -1.12 5865 92880 2911 24758 8.60 4.41 -1.56 5775 90280 3041 24844 8.40 4.44 -0.57 6495 87260 3252 25529 8.15 4.47 -0.97 7550 87420 3305 26257 7.80 4.40 -2.13 7505 87420 3616 27473 8.10 4.36 0.45 7375 87950 3576 28377 9.40 4.42 1.39 6715 90680 3738 27254 9.65 4.50 1.93 8555 88980 3988 27725 8.55 4.72 1.37 7310 89000 3705 26594 9.75 4.82 0.73 6645 90110 4380 26778 9.80 4.95 1.54 6930 88960 4212 27650 9.85 4.99 0.88 8235 87510 4964 28498 8.70 5.14 0.10 7440 84980 5176 28370 7.85 5.07 0.76 9445 81820 4913 29094 8.25 4.89 2.29 10375 81000 4345 28390 7.85 4.61 1.94 10535 83640 4820 28475 8.70 4.55 2.59 11915 82510 5175 30500 8.45 4.51 3.72 12640 84050 5540 31357 10.40 4.51 3.99 12515 84420 4972 30374 10.90 4.51 4.69 11835 87800 5197 30083 11.75 4.49 4.70 10465 88980 5650 30691 12.40 4.49 3.87 10315 89230 6057 31524 12.00 4.51 3.26 9775 87540 6894 31899 10.10 4.52 2.41 9345 89350 6624 33333 9.25 4.55 4.12 9665 89930 5976 32668 8.35 4.48 1.40 9300 91510 5732 33249 9.55 4.42 2.85 10710 90960 6104 34789 8.15 3.88 4.19 11820 88810 6792 36330 9.50 3.70 1.68 11180 90080 6141 35327 9.00 3.60 3.66 10700 89390 6663 36191 11.50 3.49 3.94 10720 85880 7188 37953 12.15 3.36 3.34 9895 84650 7129 37980 12.75 3.35 2.83 9950 84900 7393 38563 10.80 3.30 2.60 9935 85090 7440 39149 12.15 3.34 3.01 10400 85020 7026 39095 12.35 3.44 1.19 10765 85680 6291 37010 10.30 3.60 1.26 10825 85110 5873 38392 11.65 3.67 0.89 11970 82850 6313 40879 12.85 3.62 1.28 12620 83430 6105 39489 11.65 3.71 -0.52 11765 84430 5814 39437 12.50 3.72 0.77 11770 83500 6179 41064 9.65 3.75 2.29 10925 82660 6587 40745 12.75 3.91 2.70 10315 81300 6571 40354 12.95 3.97 2.31 11190 82250 6401 40758 12.20 4.04 1.96 11100 81690 7068 41036 11.35 4.17 1.11 11430 80660 7821 42452 12.05 4.28 2.02 11265 80745 7404 41349 10.95 4.39 1.55 12865 77625 8166 44756 9.15 4.43 0.30 12135 76460 9453 45429 10.95 4.54 -0.07 12595 76170 8871 45126 10.55 4.54 3.20 13620 76700 9598 47608 10.75 4.47 2.50 13815 75285 9175 50327 10.75 4.39 1.34 16460 73750 10184 56565 9.30 4.33 1.46 12740 72165 10158 51638 11.75 4.38 3.14 13455 72720 11346 53623 9.95 4.38 4.47 13390 72950 12735 54130 11.20 4.32 4.92 15090 72800 14000 59598 11.45 4.41 2.56 13935 73420 12408 54886 12.00 4.58 3.05 14190 77500 11546 51647 12.10 4.57 2.17 13045 79360 10064 45242 11.90 4.59 2.55 11300 86345 6781 36956 13.00 4.60 2.48 11410 86705 5443 36174 8.95 4.51 4.66 11205 82150 4460 36306 9.45 4.44 7.06 11890 86460 4168 36450 8.80 4.26 8.55 10945 88150 4476 35245 9.85 4.16 12.19 11575 85895 4966 36883 9.55 4.01 15.05 11500 84775 5112 37155 8.70 3.82 16.40 13740 79430 6631 41704 8.10 3.72 19.56 11730 80425 6989 39876 10.15 3.58 20.40 12785 78450 6945 41341 9.80 3.52 18.48 12090 78220 6996 41502 8.05 3.43 17.71 12780 76860 7061 43067 8.45 3.35 17.20 13550 76475 7700 45269 8.30 3.29 13.80 14175 74935 7728 47922 4.90 3.18 11.88 13595 78220 7936 48442 6.30 3.09 14.08 13170 79650 7289 46529 6.80 2.93 16.14 12905 80440 7966 47832 7.25 2.77 23.51 13615 81291 8376 46725 6.70 2.61 29.53 13520 81860 8615 48111 4.40 2.41 34.12 13425 86588 7598 45870 4.20 2.33 37.47 16420 86019 7616 47137 0.85 2.21 38.54 17630 81739 7895 49905 -0.95 2.11 37.98 17680 83090 7192 49673 -0.40 2.01 36.49 18305 78720 7997 53612 -0.90 1.96 34.91 20345 77260 8143 56628 -3.20 1.81 27.21 20095 81190 8411 56596 -4.25 1.74 26.56 24050 79020 9138 62953 -9.05 1.71 26.66 24480 77730 9219 65080 -1.35 1.62 25.72 27170 76880 9697 67696 2.20 1.59 26.48 26415 75850 10672 67281 8.45 1.57 17.97 29935 72930 11393 68766 5.20 1.59 14.54 26460 74630 10270 65642 10.85 1.66 13.37 26535 74300 9542 63223 7.55 1.62 12.46 23955 73890 9570 64577 9.45 1.53 12.12 28910 74110 8881 66193 -0.20 1.47 10.05 22835 78550 7920 57138 5.00 1.43 13.49 22695 76160 9319 60428 6.20 1.27 11.08 23380 80205 10050 58422 8.20 1.46 9.84 22425 79273 9906 56300 8.80 1.53 9.48 21505 78811 9828 58900 11.00 1.53 9.71 20315 78949 10691 60032 8.70 1.57 12.07 18245 78919 10293 57294 13.10 1.54 12.48 17795 78763 10487 55815 11.05 1.52 9.70 16065 83083 8653 50876 12.55 1.55 8.15 17010 81627 8806 53966 9.40 1.62 8.76 16845 82635 8162 56088 11.05 1.77 6.55 16455 81300 9637 57691 9.05 1.96 4.45 17350 79994 9219 58024 12.10 2.15 8.86 15465 79919 8624 56388 13.35 2.4 3.40
Names of X columns:
y x1 x2 x3 x4 x5 x6
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 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