Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
1845 162687 95 48 21 20465 0 1796 201906 62 58 20 33629 1 192 7215 18 0 0 1423 0 2444 146367 97 67 27 25629 0 3567 257045 139 83 31 54002 0 6917 524450 265 136 36 151036 1 1840 188294 58 65 23 33287 1 1740 195674 60 86 30 31172 0 2078 177020 44 62 30 28113 0 3097 325899 98 71 27 57803 1 1946 121844 75 50 24 49830 2 2370 203938 72 88 30 52143 0 1883 107394 105 50 22 21055 0 3198 220751 120 79 28 47007 4 1490 172905 62 56 18 28735 4 1573 156326 88 54 22 59147 3 1807 145178 58 81 37 78950 0 1309 89171 61 13 15 13497 5 2820 172624 88 74 34 46154 0 757 32443 26 14 18 53249 0 1162 87927 62 31 15 10726 0 2818 241285 103 99 30 83700 0 1760 195820 72 38 25 40400 1 2315 146946 56 59 34 33797 1 1994 159763 89 54 21 36205 1 1806 207078 34 63 21 30165 0 2152 212394 166 66 25 58534 0 1457 201536 95 90 31 44663 0 3000 394662 121 72 31 92556 0 2236 217892 46 61 20 40078 0 1684 182286 44 61 28 34711 0 1626 181740 47 61 22 31076 2 2257 137978 107 53 17 74608 4 3373 255929 130 118 25 58092 0 2571 236489 55 73 25 42009 1 1 0 1 0 0 0 0 2142 230761 64 54 31 36022 0 1878 132807 54 54 14 23333 3 2190 157118 49 46 35 53349 9 2186 253254 68 83 34 92596 0 2532 269329 71 106 22 49598 2 1823 161273 61 44 34 44093 0 1095 107181 33 27 23 84205 2 2162 195891 79 64 24 63369 1 1365 139667 51 71 26 60132 2 1244 171101 98 44 23 37403 2 756 81407 33 23 35 24460 1 2417 247563 104 78 24 46456 0 2327 239807 90 60 31 66616 1 2786 172743 59 73 30 41554 8 658 48188 28 12 22 22346 0 2012 169355 70 104 23 30874 0 2602 315622 76 83 27 68701 0 2071 241518 79 57 30 35728 0 1911 195583 59 67 33 29010 1 1775 159913 57 44 12 23110 8 1918 220241 69 53 26 38844 0 1046 101694 25 26 26 27084 1 1190 157258 68 67 23 35139 0 2890 202536 99 36 38 57476 10 1836 173505 64 56 32 33277 6 2254 150518 83 52 21 31141 0 1392 141491 64 54 22 61281 11 1325 125612 38 57 26 25820 3 1317 166049 36 27 28 23284 0 1525 124197 42 58 33 35378 0 2335 195043 71 76 36 74990 8 2897 138708 65 93 25 29653 2 1118 116552 40 59 25 64622 0 340 31970 15 5 21 4157 0 2977 258158 115 57 19 29245 3 1449 151184 78 42 12 50008 1 1550 135926 68 88 30 52338 2 1684 119629 72 53 21 13310 1 2728 171518 71 81 39 92901 0 1574 108949 45 35 32 10956 2 2413 183471 60 102 28 34241 1 2563 159966 98 71 29 75043 0 1079 93786 34 28 21 21152 0 1235 84971 72 34 31 42249 0 980 88882 76 54 26 42005 0 2246 304603 65 49 29 41152 0 1076 75101 30 30 23 14399 1 1637 145043 40 57 25 28263 0 1208 95827 48 54 22 17215 0 1865 173924 58 38 26 48140 0 2726 241957 237 63 33 62897 0 1208 115367 115 58 24 22883 0 1419 118408 64 46 24 41622 7 1609 164078 53 46 21 40715 0 1864 158931 41 51 28 65897 5 2412 184139 82 87 28 76542 1 1238 152856 58 39 25 37477 0 1462 144014 59 28 15 53216 0 973 62535 42 26 13 40911 0 2319 245196 117 52 36 57021 0 1890 199841 71 96 27 73116 0 223 19349 12 13 1 3895 0 2526 247280 108 43 24 46609 3 2072 159408 83 42 31 29351 0 778 72128 30 30 4 2325 0 1194 104253 26 59 21 31747 0 1424 151090 57 73 27 32665 0 1327 137382 65 39 23 19249 1 839 87448 42 36 12 15292 1 596 27676 22 2 16 5842 0 1671 165507 50 102 29 33994 0 1167 132148 37 30 26 13018 1 0 0 0 0 0 0 0 1106 95778 34 46 25 98177 0 1148 109001 67 25 21 37941 0 1485 158833 46 59 24 31032 0 1526 147690 63 60 21 32683 1 962 89887 63 36 21 34545 0 78 3616 5 0 0 0 0 0 0 0 0 0 0 0 1184 199005 45 45 23 27525 0 1671 160930 92 79 33 66856 0 2142 177948 102 30 32 28549 2 1015 136061 39 43 23 38610 0 778 43410 19 7 1 2781 0 1856 184277 74 80 29 41211 1 1056 108858 43 32 20 22698 0 2234 141744 58 81 33 41194 8 731 60493 40 3 12 32689 3 285 19764 12 10 2 5752 1 1872 177559 56 47 21 26757 3 1181 140281 35 35 28 22527 0 1725 164249 54 54 35 44810 0 256 11796 9 1 2 0 0 98 10674 9 0 0 0 0 1435 151322 59 46 18 100674 0 41 6836 3 0 1 0 0 1930 174712 67 51 21 57786 6 42 5118 3 5 0 0 0 528 40248 16 8 4 5444 1 0 0 0 0 0 0 0 1121 127628 50 38 29 28470 0 1305 88837 38 21 26 61849 0 81 7131 4 0 0 0 1 262 9056 15 0 4 2179 0 1099 87957 26 18 19 8019 1 1290 144470 53 53 22 39644 0 1248 111408 20 17 22 23494 1
Names of X columns:
Pageviews Time_in_RFC #Logins blogs reviews Characters Shared
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