Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
0 146455 1 0 22 0 68 0 128 0 95556 0 0 84944 4 0 20 0 72 0 89 0 54565 0 0 113337 9 0 24 0 37 0 68 0 63016 0 0 128655 2 0 21 0 70 0 108 0 79774 0 0 74398 1 0 15 0 30 0 51 0 31258 0 0 35523 2 0 16 0 53 0 33 0 52491 0 0 293403 0 0 20 0 74 0 119 0 91256 0 0 32750 0 0 18 0 22 0 5 0 22807 0 0 106539 5 0 19 0 68 0 63 0 77411 0 0 130539 0 0 20 0 47 0 66 0 48821 0 0 154991 0 0 25 0 87 0 98 0 52295 0 0 126683 7 0 37 0 123 0 71 0 63262 0 0 100672 6 0 23 0 69 0 55 0 50466 0 0 179562 3 0 28 0 89 0 116 0 62932 0 0 125971 4 0 25 0 45 0 71 0 38439 0 0 234509 0 0 35 0 122 0 120 0 70817 0 0 158980 4 0 20 0 75 0 122 0 105965 0 0 184217 3 0 22 0 45 0 74 0 73795 0 0 107342 0 0 19 0 53 0 111 0 82043 0 0 141371 5 0 26 0 96 0 103 0 74349 0 0 154730 0 0 27 0 82 0 98 0 82204 0 0 264020 1 0 22 0 76 0 100 0 55709 0 0 90938 3 0 15 0 51 0 42 0 37137 0 0 101324 5 0 26 0 104 0 100 0 70780 0 0 130232 0 0 24 0 83 0 105 0 55027 0 0 137793 0 0 22 0 78 0 77 0 56699 0 0 161678 4 0 21 0 59 0 83 0 65911 0 0 151503 0 0 23 0 83 0 98 0 56316 0 0 105324 0 0 21 0 71 0 46 0 26982 0 0 175914 0 0 25 0 81 0 95 0 54628 0 0 181853 3 0 25 0 93 0 91 0 96750 0 0 114928 4 0 28 0 72 0 91 0 53009 0 0 190410 1 0 30 0 107 0 94 0 64664 0 0 61499 4 0 20 0 75 0 15 0 36990 0 0 223004 1 0 23 0 84 0 137 0 85224 0 0 167131 0 0 25 0 69 0 56 0 37048 0 0 233482 0 0 26 0 90 0 78 0 59635 0 0 121185 2 0 20 0 51 0 68 0 42051 0 0 78776 1 0 8 0 18 0 34 0 26998 0 0 188967 2 0 20 0 75 0 94 0 63717 0 0 199512 8 0 21 0 59 0 82 0 55071 0 0 102531 5 0 25 0 63 0 63 0 40001 0 0 118958 3 0 20 0 68 0 58 0 54506 0 0 68948 4 0 18 0 47 0 43 0 35838 0 0 93125 1 0 21 0 29 0 36 0 50838 0 0 277108 2 0 22 0 69 0 64 0 86997 0 0 78800 2 0 26 0 66 0 21 0 33032 0 0 157250 0 0 30 0 106 0 104 0 61704 0 0 210554 6 0 24 0 73 0 124 0 117986 0 0 127324 3 0 26 0 87 0 101 0 56733 0 0 114397 0 0 18 0 65 0 85 0 55064 0 0 24188 0 0 4 0 7 0 7 0 5950 0 0 246209 6 0 31 0 111 0 124 0 84607 0 0 65029 5 0 18 0 61 0 21 0 32551 0 0 98030 3 0 14 0 41 0 35 0 31701 0 0 173587 1 0 20 0 70 0 95 0 71170 0 0 172684 5 0 30 0 112 0 102 0 101773 0 0 191381 5 0 20 0 71 0 212 0 101653 0 0 191276 0 0 26 0 90 0 141 0 81493 0 0 134043 9 0 20 0 69 0 54 0 55901 0 0 233406 6 0 27 0 85 0 117 0 109104 0 0 195304 6 0 18 0 47 0 145 0 114425 0 0 127619 5 0 27 0 50 0 50 0 36311 0 0 162810 6 0 22 0 76 0 80 0 70027 0 0 129100 2 0 19 0 60 0 87 0 73713 0 0 108715 0 0 15 0 35 0 78 0 40671 0 0 106469 3 0 19 0 72 0 86 0 89041 0 0 142069 8 0 28 0 88 0 82 0 57231 0 0 143937 2 0 20 0 66 0 139 0 78792 0 0 84256 5 0 17 0 58 0 75 0 59155 0 0 118807 11 0 25 0 81 0 70 0 55827 0 0 69471 6 0 20 0 63 0 25 0 22618 0 1 122433 5 5 25 25 91 91 66 66 58425 58425 1 131122 1 1 20 20 50 50 89 89 65724 65724 1 94763 0 0 22 22 75 75 99 99 56979 56979 1 188780 3 3 25 25 85 85 98 98 72369 72369 1 191467 3 3 20 20 75 75 104 104 79194 79194 1 105615 6 6 23 23 70 70 48 48 202316 202316 1 89318 1 1 22 22 78 78 81 81 44970 44970 1 107335 0 0 21 21 61 61 64 64 49319 49319 1 98599 1 1 18 18 55 55 44 44 36252 36252 1 260646 0 0 25 25 60 60 104 104 75741 75741 1 131876 5 5 22 22 83 83 36 36 38417 38417 1 119291 2 2 25 25 38 38 120 120 64102 64102 1 80953 0 0 8 8 27 27 58 58 56622 56622 1 99768 0 0 21 21 62 62 27 27 15430 15430 1 84572 5 5 22 22 82 82 84 84 72571 72571 1 202373 1 1 21 21 79 79 56 56 67271 67271 1 166790 0 0 30 30 59 59 46 46 43460 43460 1 99946 1 1 23 23 80 80 119 119 99501 99501 1 116900 1 1 20 20 36 36 57 57 28340 28340 1 142146 2 2 24 24 88 88 139 139 76013 76013 1 99246 4 4 21 21 63 63 51 51 37361 37361 1 156833 1 1 20 20 73 73 85 85 48204 48204 1 175078 4 4 20 20 71 71 91 91 76168 76168 1 130533 0 0 20 20 76 76 79 79 85168 85168 1 142339 2 2 20 20 67 67 142 142 125410 125410 1 176789 0 0 23 23 66 66 149 149 123328 123328 1 181379 7 7 33 33 123 123 96 96 83038 83038 1 228548 7 7 19 19 65 65 198 198 120087 120087 1 142141 6 6 27 27 87 87 61 61 91939 91939 1 167845 0 0 25 25 77 77 145 145 103646 103646 1 103012 0 0 20 20 37 37 26 26 29467 29467 1 43287 4 4 19 19 64 64 49 49 43750 43750 1 125366 4 4 15 15 22 22 68 68 34497 34497 1 118372 0 0 21 21 35 35 145 145 66477 66477 1 135171 0 0 22 22 61 61 82 82 71181 71181 1 175568 0 0 24 24 80 80 102 102 74482 74482 1 74112 0 0 19 19 54 54 52 52 174949 174949 1 88817 0 0 20 20 60 60 56 56 46765 46765 1 164767 4 4 23 23 87 87 80 80 90257 90257 1 141933 0 0 27 27 75 75 99 99 51370 51370 1 22938 0 0 1 1 0 0 11 11 1168 1168 1 115199 0 0 20 20 54 54 87 87 51360 51360 1 61857 4 4 11 11 30 30 28 28 25162 25162 1 91185 0 0 27 27 66 66 67 67 21067 21067 1 213765 1 1 22 22 56 56 150 150 58233 58233 1 21054 0 0 0 0 0 0 4 4 855 855 1 167105 5 5 17 17 32 32 71 71 85903 85903 1 31414 0 0 8 8 9 9 39 39 14116 14116 1 178863 1 1 23 23 78 78 87 87 57637 57637 1 126681 7 7 26 26 90 90 66 66 94137 94137 1 64320 5 5 20 20 56 56 23 23 62147 62147 1 67746 2 2 16 16 35 35 56 56 62832 62832 1 38214 0 0 8 8 21 21 16 16 8773 8773 1 90961 1 1 22 22 78 78 49 49 63785 63785 1 181510 0 0 33 33 118 118 108 108 65196 65196 1 116775 0 0 28 28 83 83 112 112 73087 73087 1 223914 2 2 26 26 89 89 110 110 72631 72631 1 185139 0 0 27 27 83 83 126 126 86281 86281 1 242879 2 2 35 35 124 124 155 155 162365 162365 1 139144 0 0 21 21 76 76 75 75 56530 56530 1 75812 0 0 20 20 57 57 30 30 35606 35606 1 178218 4 4 24 24 91 91 78 78 70111 70111 1 246834 4 4 26 26 89 89 135 135 92046 92046 1 50999 8 8 20 20 66 66 8 8 63989 63989 1 223842 0 0 22 22 82 82 114 114 104911 104911 1 93577 4 4 24 24 63 63 60 60 43448 43448 1 155383 0 0 23 23 75 75 99 99 60029 60029 1 111664 1 1 22 22 59 59 98 98 38650 38650 1 75426 0 0 12 12 19 19 33 33 47261 47261 1 243551 9 9 21 21 57 57 93 93 73586 73586 1 136548 0 0 21 21 62 62 157 157 83042 83042 1 173260 3 3 21 21 78 78 15 15 37238 37238 1 185039 7 7 25 25 73 73 98 98 63958 63958 1 67507 5 5 32 32 112 112 49 49 78956 78956 1 139350 2 2 24 24 79 79 88 88 99518 99518 1 172964 1 1 28 28 96 96 151 151 111436 111436 1 0 9 9 0 0 0 0 0 0 0 0 1 14688 0 0 0 0 0 0 5 5 6023 6023 1 98 0 0 0 0 0 0 0 0 0 0 1 455 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 128066 2 2 20 20 48 48 80 80 42564 42564 1 176460 1 1 27 27 55 55 122 122 38885 38885 1 0 0 0 0 0 0 0 0 0 0 0 1 203 0 0 0 0 0 0 0 0 0 0 1 7199 0 0 0 0 0 0 6 6 1644 1644 1 46660 0 0 5 5 13 13 13 13 6179 6179 1 17547 0 0 1 1 4 4 3 3 3926 3926 1 73567 0 0 23 23 31 31 18 18 23238 23238 1 969 0 0 0 0 0 0 0 0 0 0 1 101060 2 2 16 16 29 29 48 48 49288 49288
Names of X columns:
Gender Time_in_RFC Shared_compendiums Shared_compendiums_g Reviewed_compendiums Reviewed_compendiums_g Long_feedback Long_feedback_g Blogs Blogs_g Characters Characters_g
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