Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
176508 12 60 38 146 1 165446 0 69 25 93 1 237213 0 78 38 140 1 133131 7 44 30 99 1 324799 0 158 47 181 1 236785 3 77 31 116 1 344297 1 80 30 108 1 174724 0 123 34 129 1 174415 0 73 31 118 1 223632 0 105 33 125 1 124817 0 47 25 95 1 325107 0 84 36 136 1 7176 0 0 0 0 1 265769 2 96 32 124 1 175824 0 57 20 80 1 111665 4 39 28 104 1 362301 2 76 34 125 1 168809 0 76 28 118 1 24188 0 8 4 12 1 329267 8 79 39 144 1 218946 1 76 29 108 1 244052 5 101 44 166 1 341570 1 94 21 80 1 256462 0 123 35 127 1 196553 2 41 29 111 1 174184 0 72 25 98 1 187559 8 75 36 135 1 73566 6 22 23 88 1 182999 6 73 34 129 1 152299 0 62 33 122 1 346485 0 118 38 147 1 193339 2 100 35 87 1 122774 0 24 24 90 1 112611 0 46 20 78 1 286468 1 57 29 111 1 148446 1 135 37 141 1 140344 6 33 25 93 1 220516 1 98 32 124 1 243060 4 58 29 112 1 162765 2 68 28 108 1 232138 0 131 31 117 1 85574 0 37 21 78 1 232317 0 118 33 126 1 164709 0 81 31 115 1 220801 1 51 18 72 1 92661 1 40 17 45 1 133328 0 56 20 78 1 61361 0 27 12 39 1 100750 0 83 30 119 1 101523 0 59 22 88 1 243511 0 133 42 155 1 22938 0 12 1 0 1 152474 0 106 32 123 1 132487 0 71 36 136 1 21054 0 4 0 0 1 209641 5 62 24 88 1 46698 0 14 13 52 1 131698 0 60 19 75 1 244749 2 98 33 124 1 272458 0 100 43 162 1 108043 1 45 14 54 1 351067 3 136 45 170 1 229242 4 63 31 120 1 84207 11 14 30 112 1 250047 0 41 18 71 1 299775 9 91 31 120 1 173260 3 41 21 79 1 92499 0 25 18 71 1 74408 4 29 7 28 1 181633 2 47 30 110 1 271856 1 109 37 147 1 95227 0 37 32 111 1 139942 0 54 22 88 1 72880 0 14 19 76 1 65475 2 16 13 51 1 71965 1 32 15 59 1 181528 0 32 16 61 1 134019 0 32 18 67 1 56375 7 10 13 49 1 65490 3 27 16 62 1 76302 0 29 20 76 1 104011 6 25 22 88 1 30989 0 5 17 68 1 63123 1 34 17 68 1 74914 0 35 23 90 1 81437 0 37 14 54 1 65745 0 26 21 77 1 56653 0 38 18 68 1 158399 0 23 18 72 1 73624 0 30 17 64 1 91899 0 18 15 59 1 139526 0 28 21 84 1 86678 0 12 15 59 1 150580 0 27 22 83 1 99611 0 41 21 81 1 31706 0 26 10 32 1 89806 0 27 16 62 1 19764 1 10 2 8 1 64187 0 10 16 61 1 72535 0 17 16 64 1 210907 3 79 30 115 2 120982 4 58 28 109 2 385534 0 121 25 96 2 149061 5 43 26 100 2 230964 4 102 30 116 2 135473 0 82 23 88 2 215147 0 101 36 135 2 153935 5 50 25 89 2 225548 5 81 31 118 2 210767 3 94 35 135 2 170266 4 44 42 154 2 294424 2 107 33 127 2 106408 1 33 14 46 2 96560 0 42 17 54 2 149112 6 56 35 128 2 152871 5 59 28 97 2 183167 0 91 39 149 2 103597 1 27 16 60 2 235800 8 105 23 84 2 143246 5 67 27 105 2 187681 2 114 28 107 2 167488 2 69 28 104 2 143756 0 105 34 132 2 243199 3 88 28 108 2 130585 5 67 29 109 2 182079 2 124 33 124 2 265318 10 110 52 199 2 310839 9 130 24 91 2 225060 7 93 41 158 2 144966 0 39 32 122 2 99466 0 28 23 91 2 102010 3 28 13 50 2 99923 0 44 25 99 2 317394 1 116 31 117 2 22648 0 12 13 39 2 31414 0 18 8 25 2 128423 8 32 38 145 2 97839 2 25 24 87 2 328107 3 129 41 159 2 158015 0 59 31 119 2 120445 0 36 16 59 2 324598 0 113 37 136 2 131069 4 47 30 107 2 204271 0 92 35 130 2 116048 0 50 20 75 2 195838 1 111 31 116 2 254488 10 120 39 150 2 224330 1 131 39 144 2 135781 2 45 14 47 2 81240 0 58 17 68 2 98146 0 15 17 68 2 59194 6 7 24 80 2 118612 2 54 12 48 2 135131 0 38 15 60 2 108446 1 22 17 68 2 121848 0 37 17 64 2 81872 0 32 16 64 2 58981 7 0 23 91 2 53515 2 5 22 88 2 98104 2 55 17 66 2 135458 3 43 12 48 2 31774 1 0 17 66 2 51567 2 21 14 56 2 102538 1 50 15 58 2 99373 1 12 18 72 2 86230 0 21 17 61 2 30837 0 8 4 15 2 64175 0 37 18 72 2 59382 0 29 12 41 2 119308 0 32 16 61 2 76702 0 35 21 67 2 84105 0 17 17 66 2
Names of X columns:
Tijd Gedeelde_compendia Aantal_blogs Reviews Reviews+120 Geslacht
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