Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
12.9 12 1 0 11 18 13 149 18 68 2011 12.2 8 1 1 19 23 8 139 31 39 2011 12.8 11 1 0 16 22 14 148 39 32 2011 7.4 13 1 1 24 22 16 158 46 62 2011 6.7 11 1 1 15 19 14 128 31 33 2011 12.6 10 1 1 17 25 13 224 67 52 2011 14.8 7 1 0 19 28 15 159 35 62 2011 13.3 10 1 1 19 16 13 105 52 77 2011 11.1 15 1 1 28 28 20 159 77 76 2011 8.2 12 1 1 26 21 17 167 37 41 2011 11.4 12 1 1 15 22 15 165 32 48 2011 6.4 10 1 1 26 24 16 159 36 63 2011 10.6 10 1 1 16 24 12 119 38 30 2011 12 14 1 0 24 26 17 176 69 78 2011 6.3 6 1 0 25 28 11 54 21 19 2011 11.3 12 0 0 22 24 16 91 26 31 2011 11.9 14 1 1 15 20 16 163 54 66 2011 9.3 11 1 0 21 26 15 124 36 35 2011 9.6 8 0 1 22 21 13 137 42 42 2011 10 12 1 0 27 28 14 121 23 45 2011 6.4 15 1 1 26 27 19 153 34 21 2011 13.8 13 1 1 26 23 16 148 112 25 2011 10.8 11 1 0 22 24 17 221 35 44 2011 13.8 12 1 1 21 24 10 188 47 69 2011 11.7 7 1 1 22 22 15 149 47 54 2011 10.9 11 1 1 20 21 14 244 37 74 2011 16.1 7 0 1 21 25 14 148 109 80 2011 13.4 12 0 0 20 20 16 92 24 42 2011 9.9 12 1 1 22 21 15 150 20 61 2011 11.5 13 1 0 21 26 17 153 22 41 2011 8.3 9 1 0 8 23 14 94 23 46 2011 11.7 11 1 0 22 21 16 156 32 39 2011 9 12 1 1 20 27 15 132 30 34 2011 9.7 15 1 1 24 25 16 161 92 51 2011 10.8 12 1 1 17 23 16 105 43 42 2011 10.3 6 1 1 20 25 10 97 55 31 2011 10.4 5 1 0 23 23 8 151 16 39 2011 12.7 13 0 1 20 19 17 131 49 20 2011 9.3 11 1 1 22 22 14 166 71 49 2011 11.8 6 1 0 19 24 10 157 43 53 2011 5.9 12 1 1 15 19 14 111 29 31 2011 11.4 10 1 1 20 21 12 145 56 39 2011 13 6 1 1 22 27 16 162 46 54 2011 10.8 12 1 1 17 25 16 163 19 49 2011 12.3 11 0 1 14 25 16 59 23 34 2011 11.3 6 1 0 24 23 8 187 59 46 2011 11.8 12 1 1 17 17 16 109 30 55 2011 7.9 12 0 1 23 28 15 90 61 42 2011 12.7 8 1 0 25 25 8 105 7 50 2011 12.3 10 0 1 16 20 13 83 38 13 2011 11.6 11 0 1 18 25 14 116 32 37 2011 6.7 7 0 1 20 21 13 42 16 25 2011 10.9 12 1 1 18 24 16 148 19 30 2011 12.1 13 0 1 23 28 19 155 22 28 2011 13.3 14 1 1 24 20 19 125 48 45 2011 10.1 12 1 1 23 19 14 116 23 35 2011 5.7 6 0 0 13 24 15 128 26 28 2011 14.3 14 1 1 20 21 13 138 33 41 2011 8 10 0 0 20 24 10 49 9 6 2011 13.3 12 0 1 19 23 16 96 24 45 2011 9.3 11 1 1 22 18 15 164 34 73 2011 12.5 10 1 0 22 27 11 162 48 17 2011 7.6 7 1 0 15 25 9 99 18 40 2011 15.9 12 1 1 17 20 16 202 43 64 2011 9.2 7 1 0 19 21 12 186 33 37 2011 9.1 12 0 1 20 23 12 66 28 25 2011 11.1 12 1 0 22 27 14 183 71 65 2011 13 10 1 1 21 24 14 214 26 100 2011 14.5 10 1 1 21 27 13 188 67 28 2011 12.2 12 0 0 16 24 15 104 34 35 2011 12.3 12 1 0 20 23 17 177 80 56 2011 11.4 12 1 0 21 24 14 126 29 29 2011 8.8 8 0 0 20 21 11 76 16 43 2011 14.6 10 0 1 23 23 9 99 59 59 2011 12.6 5 1 0 18 27 7 139 32 50 2011 13 10 1 0 16 25 15 162 43 59 2011 12.6 12 0 1 17 19 12 108 38 27 2011 13.2 11 1 0 24 24 15 159 29 61 2011 9.9 9 0 0 13 25 14 74 36 28 2011 7.7 12 1 1 19 23 16 110 32 51 2011 10.5 11 0 0 20 23 14 96 35 35 2011 13.4 10 0 0 22 25 13 116 21 29 2011 10.9 12 0 0 19 26 16 87 29 48 2011 4.3 10 0 1 21 26 13 97 12 25 2011 10.3 9 0 0 15 16 16 127 37 44 2011 11.8 11 0 1 21 23 16 106 37 64 2011 11.2 12 0 1 24 26 16 80 47 32 2011 11.4 7 0 0 22 25 10 74 51 20 2011 8.6 11 0 0 20 23 12 91 32 28 2011 13.2 12 0 0 21 26 12 133 21 34 2011 12.6 6 0 1 19 22 12 74 13 31 2011 5.6 9 0 1 14 20 12 114 14 26 2011 9.9 15 0 1 25 27 19 140 -2 58 2011 8.8 10 0 0 11 20 14 95 20 23 2011 7.7 11 0 1 17 22 13 98 24 21 2011 9 12 0 0 22 24 16 121 11 21 2011 7.3 12 0 1 20 21 15 126 23 33 2011 11.4 12 0 1 22 24 12 98 24 16 2011 13.6 11 0 1 15 26 8 95 14 20 2011 7.9 9 0 1 23 24 10 110 52 37 2011 10.7 11 0 1 20 24 16 70 15 35 2011 10.3 12 0 0 22 27 16 102 23 33 2011 8.3 12 0 1 16 25 10 86 19 27 2011 9.6 14 0 1 25 27 18 130 35 41 2011 14.2 8 0 1 18 19 12 96 24 40 2011 8.5 10 0 0 19 22 16 102 39 35 2011 13.5 9 0 0 25 22 10 100 29 28 2011 4.9 10 0 0 21 25 14 94 13 32 2011 6.4 9 0 0 22 23 12 52 8 22 2011 9.6 10 0 0 21 24 11 98 18 44 2011 11.6 12 0 0 22 24 15 118 24 27 2011 11.1 11 0 1 23 23 7 99 19 17 2011 4.35 9 1 1 20 22 16 48 23 12 2012 12.7 11 1 1 6 24 16 50 16 45 2012 18.1 12 1 1 15 19 16 150 33 37 2012 17.85 12 1 1 18 25 16 154 32 37 2012 16.6 7 0 0 24 26 12 109 37 108 2012 12.6 12 0 1 22 18 15 68 14 10 2012 17.1 12 1 1 21 24 14 194 52 68 2012 19.1 12 1 0 23 28 15 158 75 72 2012 16.1 10 1 1 20 23 16 159 72 143 2012 13.35 15 1 0 20 19 13 67 15 9 2012 18.4 10 1 0 18 19 10 147 29 55 2012 14.7 15 1 1 25 27 17 39 13 17 2012 10.6 10 1 1 16 24 15 100 40 37 2012 12.6 15 1 1 20 26 18 111 19 27 2012 16.2 9 1 1 14 21 16 138 24 37 2012 13.6 15 1 1 22 25 20 101 121 58 2012 18.9 12 0 1 26 28 16 131 93 66 2012 14.1 13 1 1 20 19 17 101 36 21 2012 14.5 12 1 1 17 20 16 114 23 19 2012 16.15 12 1 0 22 26 15 165 85 78 2012 14.75 8 1 1 22 27 13 114 41 35 2012 14.8 9 1 1 20 23 16 111 46 48 2012 12.45 15 1 1 17 18 16 75 18 27 2012 12.65 12 1 1 22 23 16 82 35 43 2012 17.35 12 1 1 17 21 17 121 17 30 2012 8.6 15 1 1 22 23 20 32 4 25 2012 18.4 11 1 0 21 22 14 150 28 69 2012 16.1 12 1 1 25 21 17 117 44 72 2012 11.6 6 0 1 11 14 6 71 10 23 2012 17.75 14 1 1 19 24 16 165 38 13 2012 15.25 12 1 1 24 26 15 154 57 61 2012 17.65 12 1 1 17 24 16 126 23 43 2012 16.35 12 1 0 22 22 16 149 36 51 2012 17.65 11 1 0 17 20 14 145 22 67 2012 13.6 12 1 1 26 20 16 120 40 36 2012 14.35 12 1 0 20 18 16 109 31 44 2012 14.75 12 1 0 19 18 16 132 11 45 2012 18.25 12 1 1 21 25 14 172 38 34 2012 9.9 8 1 0 24 28 14 169 24 36 2012 16 8 1 1 21 23 16 114 37 72 2012 18.25 12 1 1 19 20 16 156 37 39 2012 16.85 12 1 0 13 22 15 172 22 43 2012 14.6 11 0 1 24 27 16 68 15 25 2012 13.85 10 0 1 28 24 16 89 2 56 2012 18.95 11 1 1 27 23 18 167 43 80 2012 15.6 12 1 0 22 20 15 113 31 40 2012 14.85 13 0 0 23 22 16 115 29 73 2012 11.75 12 0 0 19 21 16 78 45 34 2012 18.45 12 0 0 18 24 16 118 25 72 2012 15.9 10 0 1 23 26 17 87 4 42 2012 17.1 10 1 0 21 24 14 173 31 61 2012 16.1 11 1 1 22 18 18 2 -4 23 2012 19.9 8 0 0 17 17 9 162 66 74 2012 10.95 12 0 1 15 23 15 49 61 16 2012 18.45 9 0 0 21 21 14 122 32 66 2012 15.1 12 0 1 20 21 15 96 31 9 2012 15 9 0 0 26 24 13 100 39 41 2012 11.35 11 0 0 19 22 16 82 19 57 2012 15.95 15 0 1 28 24 20 100 31 48 2012 18.1 8 0 0 21 24 14 115 36 51 2012 14.6 8 0 1 19 24 12 141 42 53 2012 15.4 11 1 1 22 23 15 165 21 29 2012 15.4 11 1 1 21 21 15 165 21 29 2012 17.6 11 0 1 20 24 15 110 25 55 2012 13.35 13 1 1 19 19 16 118 32 54 2012 19.1 7 1 0 11 19 11 158 26 43 2012 15.35 12 0 1 17 23 16 146 28 51 2012 7.6 8 1 0 19 25 7 49 32 20 2012 13.4 8 0 0 20 24 11 90 41 79 2012 13.9 4 0 0 17 21 9 121 29 39 2012 19.1 11 1 1 21 18 15 155 33 61 2012 15.25 10 0 0 21 23 16 104 17 55 2012 12.9 7 0 1 12 20 14 147 13 30 2012 16.1 12 0 0 23 23 15 110 32 55 2012 17.35 11 0 0 22 23 13 108 30 22 2012 13.15 9 0 0 22 23 13 113 34 37 2012 12.15 10 0 0 21 23 12 115 59 2 2012 12.6 8 0 1 20 27 16 61 13 38 2012 10.35 8 0 1 18 19 14 60 23 27 2012 15.4 11 0 1 21 25 16 109 10 56 2012 9.6 12 0 1 24 25 14 68 5 25 2012 18.2 10 0 0 22 21 15 111 31 39 2012 13.6 10 0 0 20 25 10 77 19 33 2012 14.85 12 0 1 17 17 16 73 32 43 2012 14.75 8 1 0 19 22 14 151 30 57 2012 14.1 11 0 0 16 23 16 89 25 43 2012 14.9 8 0 0 19 27 12 78 48 23 2012 16.25 10 0 0 23 27 16 110 35 44 2012 19.25 14 1 1 8 5 16 220 67 54 2012 13.6 9 0 1 22 19 15 65 15 28 2012 13.6 9 1 0 23 24 14 141 22 36 2012 15.65 10 0 0 15 23 16 117 18 39 2012 12.75 13 1 1 17 28 11 122 33 16 2012 14.6 12 0 0 21 25 15 63 46 23 2012 9.85 13 1 1 25 27 18 44 24 40 2012 12.65 8 0 1 18 16 13 52 14 24 2012 19.2 3 0 0 20 25 7 131 12 78 2012 16.6 8 0 1 21 26 7 101 38 57 2012 11.2 12 0 1 21 24 17 42 12 37 2012 15.25 11 1 1 24 23 18 152 28 27 2012 11.9 9 1 0 22 24 15 107 41 61 2012 13.2 12 0 0 22 27 8 77 12 27 2012 16.35 12 1 0 23 25 13 154 31 69 2012 12.4 12 1 1 17 19 13 103 33 34 2012 15.85 10 0 1 15 19 15 96 34 44 2012 18.15 13 1 1 22 24 18 175 21 34 2012 11.15 9 0 1 19 20 16 57 20 39 2012 15.65 12 0 0 18 21 14 112 44 51 2012 17.75 11 1 0 21 28 15 143 52 34 2012 7.65 14 0 0 20 26 19 49 7 31 2012 12.35 11 1 1 19 19 16 110 29 13 2012 15.6 9 1 1 19 23 12 131 11 12 2012 19.3 12 1 0 16 23 16 167 26 51 2012 15.2 8 0 0 18 21 11 56 24 24 2012 17.1 15 1 0 23 26 16 137 7 19 2012 15.6 12 0 1 22 25 15 86 60 30 2012 18.4 14 1 1 23 25 19 121 13 81 2012 19.05 12 1 0 20 24 15 149 20 42 2012 18.55 9 1 0 24 23 14 168 52 22 2012 19.1 9 1 0 25 22 14 140 28 85 2012 13.1 13 0 1 25 27 17 88 25 27 2012 12.85 13 1 1 20 26 16 168 39 25 2012 9.5 15 1 1 23 23 20 94 9 22 2012 4.5 11 1 1 21 22 16 51 19 19 2012 11.85 7 0 0 23 26 9 48 13 14 2012 13.6 10 1 1 23 22 13 145 60 45 2012 11.7 11 1 1 11 17 15 66 19 45 2012 12.4 14 0 1 21 25 19 85 34 28 2012 13.35 14 1 0 27 22 16 109 14 51 2012 11.4 13 0 0 19 28 17 63 17 41 2012 14.9 12 0 1 21 22 16 102 45 31 2012 19.9 8 0 0 16 21 9 162 66 74 2012 11.2 13 0 1 21 24 11 86 48 19 2012 14.6 9 0 1 22 26 14 114 29 51 2012 17.6 12 1 0 16 26 19 164 -2 73 2012 14.05 13 1 1 18 24 13 119 51 24 2012 16.1 11 1 0 23 27 14 126 2 61 2012 13.35 11 1 1 24 22 15 132 24 23 2012 11.85 13 1 1 20 23 15 142 40 14 2012 11.95 12 1 0 20 22 14 83 20 54 2012 14.75 12 0 1 18 23 16 94 19 51 2012 15.15 10 0 0 4 15 17 81 16 62 2012 13.2 9 1 1 14 20 12 166 20 36 2012 16.85 10 0 0 22 22 15 110 40 59 2012 7.85 13 0 1 17 25 17 64 27 24 2012 7.7 13 1 0 23 27 15 93 25 26 2012 12.6 9 0 0 20 24 10 104 49 54 2012 7.85 11 0 1 18 21 16 105 39 39 2012 10.95 12 0 1 19 17 15 49 61 16 2012 12.35 8 0 0 20 26 11 88 19 36 2012 9.95 12 0 1 15 20 16 95 67 31 2012 14.9 12 0 1 24 22 16 102 45 31 2012 16.65 12 0 0 21 24 16 99 30 42 2012 13.4 9 0 1 19 23 14 63 8 39 2012 13.95 12 0 0 19 22 14 76 19 25 2012 15.7 12 0 0 27 28 16 109 52 31 2012 16.85 11 0 1 23 21 16 117 22 38 2012 10.95 12 0 1 23 24 18 57 17 31 2012 15.35 6 0 0 20 28 14 120 33 17 2012 12.2 7 0 1 17 25 20 73 34 22 2012 15.1 10 0 0 21 24 15 91 22 55 2012 17.75 12 0 0 23 24 16 108 30 62 2012 15.2 10 0 1 22 21 16 105 25 51 2012 14.6 12 1 0 16 20 16 117 38 30 2012 16.65 9 0 0 20 26 12 119 26 49 2012 8.1 3 0 1 16 16 8 31 13 16 2012
Names of X columns:
TOT CONFSOFTTOT group gender AMS.I1 AMS.E1 CONFSTATTOT LFM PRH CH year
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 mywarning <- '' par1 <- as.numeric(par1) if(is.na(par1)) { par1 <- 1 mywarning = 'Warning: you did not specify the column number of the endogenous series! The first column was selected by default.' } if (par4=='') par4 <- 0 par4 <- as.numeric(par4) if (par5=='') par5 <- 0 par5 <- as.numeric(par5) x <- na.omit(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'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 } if (par3 == 'Seasonal Differences (s=12)'){ (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if (par3 == 'First and Seasonal Differences (s=12)'){ (n <- n -1) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+1,j] - x[i,j] } } x <- x2 (n <- n - 12) x2 <- array(0, dim=c(n,k), dimnames=list(1:n, paste('(1-B12)',colnames(x),sep=''))) for (i in 1:n) { for (j in 1:k) { x2[i,j] <- x[i+12,j] - x[i,j] } } x <- x2 } if(par4 > 0) { x2 <- array(0, dim=c(n-par4,par4), dimnames=list(1:(n-par4), paste(colnames(x)[par1],'(t-',1:par4,')',sep=''))) for (i in 1:(n-par4)) { for (j in 1:par4) { x2[i,j] <- x[i+par4-j,par1] } } x <- cbind(x[(par4+1):n,], x2) n <- n - par4 } if(par5 > 0) { x2 <- array(0, dim=c(n-par5*12,par5), dimnames=list(1:(n-par5*12), paste(colnames(x)[par1],'(t-',1:par5,'s)',sep=''))) for (i in 1:(n-par5*12)) { for (j in 1:par5) { x2[i,j] <- x[i+par5*12-j*12,par1] } } x <- cbind(x[(par5*12+1):n,], x2) n <- n - par5*12 } 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[n,])) if (par3 == 'Linear Trend'){ x <- cbind(x, c(1:n)) colnames(x)[k+1] <- 't' } x (k <- length(x[n,])) head(x) 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, signif(mysum$coefficients[i,1],6), 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.row.start(a) a<-table.element(a, mywarning) 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,formatC(signif(mysum$coefficients[i,1],5),format='g',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,2],5),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,3],4),format='e',flag='+')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4],4),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$coefficients[i,4]/2,4),format='g',flag=' ')) 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,formatC(signif(sqrt(mysum$r.squared),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-squared',1,TRUE) a<-table.element(a,formatC(signif(mysum$adj.r.squared,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (value)',1,TRUE) a<-table.element(a,formatC(signif(mysum$fstatistic[1],6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[2],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE) a<-table.element(a, signif(mysum$fstatistic[3],6)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'p-value',1,TRUE) a<-table.element(a,formatC(signif(1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]),6),format='g',flag=' ')) 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,formatC(signif(mysum$sigma,6),format='g',flag=' ')) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Sum Squared Residuals',1,TRUE) a<-table.element(a,formatC(signif(sum(myerror*myerror),6),format='g',flag=' ')) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable3.tab') if(n < 200) { 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,formatC(signif(x[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(x[i]-mysum$resid[i],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(mysum$resid[i],6),format='g',flag=' ')) 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,formatC(signif(gqarr[mypoint-kp3+1,1],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,2],6),format='g',flag=' ')) a<-table.element(a,formatC(signif(gqarr[mypoint-kp3+1,3],6),format='g',flag=' ')) 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,signif(numsignificant1,6)) a<-table.element(a,formatC(signif(numsignificant1/numgqtests,6),format='g',flag=' ')) 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,signif(numsignificant5,6)) a<-table.element(a,signif(numsignificant5/numgqtests,6)) 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,signif(numsignificant10,6)) a<-table.element(a,signif(numsignificant10/numgqtests,6)) 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