Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
61 81 87 87 136 147 168 185 137 125 64 45 35 -4 88 85 95 128 186 182 151 106 60 44 30 54 72 88 153 168 181 180 149 84 85 42 54 30 96 110 141 159 164 155 135 93 28 56 56 22 76 83 121 151 208 179 139 99 103 57 44 70 58 91 126 146 199 194 145 131 74 -3 7 10 34 94 105 151 162 175 128 115 62 11 -7 64 80 77 127 158 173 206 147 103 73 52 52 68 77 94 147 160 166 167 155 104 44 53 56 36 76 99 142 150 190 176 175 112 73 52 48 61 68 97 146 160 155 175 163 117 82 55 32 48 53 82 139 150 184 185 138 147 77 32 48 72 76 94 133 164 174 187 149 102 86 35 31 28 75 102 133 178 190 190 147 83 83 46 40 50 61 102 117 158 170 190 155 117 68 40 56 28 66 103 122 166 176 164 160 139 75 44 22 32 42 86 140 163 222 166 183 140 98 69 75 63 81 126 139 171 170 173 144 105 75 41 68 53 61 87 155 159 180 175 138 105 73 26 12 35 64 115 138 138 182 191 155 113 98 29
Data Y:
80 111 122 131 192 188 216 238 173 160 93 67 60 32 126 131 134 162 230 232 200 143 85 66 54 81 100 126 204 218 227 220 220 120 110 67 81 52 106 156 187 204 204 196 204 124 53 77 77 50 105 125 165 194 263 225 263 140 127 86 71 95 95 133 178 160 250 251 250 173 103 21 29 39 71 148 144 199 206 224 206 152 88 35 23 92 117 120 173 202 217 256 217 143 95 77 76 100 108 132 195 198 204 212 204 129 73 77 80 64 109 138 185 198 237 223 237 146 102 77 70 86 98 141 195 205 191 226 191 147 100 74 56 77 80 120 186 196 229 229 229 176 104 61 72 99 113 140 174 209 205 229 215 136 113 57 55 66 125 149 176 230 238 245 238 124 111 72 63 78 100 149 166 201 214 231 214 151 97 68 81 55 99 146 170 218 218 207 218 178 105 67 47 55 73 124 185 213 278 205 278 171 125 92 96 92 118 185 183 215 207 214 207 142 102 66 87 90 90 133 205 201 220 210 220 136 95 52 40 60 100 169 184 202 226 239 226 149 121 50
Sample Range:
(leave blank to include all observations)
From:
To:
bandwidth of density plot
(?)
Chart options
Label y-axis:
Label x-axis:
R Code
par1 <- as.numeric(par1) library(lattice) z <- as.data.frame(cbind(x,y)) m <- lm(y~x) summary(m) bitmap(file='test1.png') plot(z,main='Scatterplot, lowess, and regression line') lines(lowess(z),col='red') abline(m) grid() dev.off() bitmap(file='test2.png') m2 <- lm(m$fitted.values ~ x) summary(m2) z2 <- as.data.frame(cbind(x,m$fitted.values)) names(z2) <- list('x','Fitted') plot(z2,main='Scatterplot, lowess, and regression line') lines(lowess(z2),col='red') abline(m2) grid() dev.off() bitmap(file='test3.png') m3 <- lm(m$residuals ~ x) summary(m3) z3 <- as.data.frame(cbind(x,m$residuals)) names(z3) <- list('x','Residuals') plot(z3,main='Scatterplot, lowess, and regression line') lines(lowess(z3),col='red') abline(m3) grid() dev.off() bitmap(file='test4.png') m4 <- lm(m$fitted.values ~ m$residuals) summary(m4) z4 <- as.data.frame(cbind(m$residuals,m$fitted.values)) names(z4) <- list('Residuals','Fitted') plot(z4,main='Scatterplot, lowess, and regression line') lines(lowess(z4),col='red') abline(m4) grid() dev.off() bitmap(file='test5.png') myr <- as.ts(m$residuals) z5 <- as.data.frame(cbind(lag(myr,1),myr)) names(z5) <- list('Lagged Residuals','Residuals') plot(z5,main='Lag plot') m5 <- lm(z5) summary(m5) abline(m5) grid() dev.off() bitmap(file='test6.png') hist(m$residuals,main='Residual Histogram',xlab='Residuals') dev.off() bitmap(file='test7.png') if (par1 > 0) { densityplot(~m$residuals,col='black',main=paste('Density Plot bw = ',par1),bw=par1) } else { densityplot(~m$residuals,col='black',main='Density Plot') } dev.off() bitmap(file='test8.png') acf(m$residuals,main='Residual Autocorrelation Function') dev.off() bitmap(file='test9.png') qqnorm(x) qqline(x) grid() dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Simple Linear Regression',5,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'Statistics',1,TRUE) a<-table.element(a,'Estimate',1,TRUE) a<-table.element(a,'S.D.',1,TRUE) a<-table.element(a,'T-STAT (H0: coeff=0)',1,TRUE) a<-table.element(a,'P-value (two-sided)',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'constant term',header=TRUE) a<-table.element(a,m$coefficients[[1]]) sd <- sqrt(vcov(m)[1,1]) a<-table.element(a,sd) tstat <- m$coefficients[[1]]/sd a<-table.element(a,tstat) pval <- 2*(1-pt(abs(tstat),length(x)-2)) a<-table.element(a,pval) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'slope',header=TRUE) a<-table.element(a,m$coefficients[[2]]) sd <- sqrt(vcov(m)[2,2]) a<-table.element(a,sd) tstat <- m$coefficients[[2]]/sd a<-table.element(a,tstat) pval <- 2*(1-pt(abs(tstat),length(x)-2)) a<-table.element(a,pval) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab')
Compute
Summary of computational transaction
Raw Input
view raw input (R code)
Raw Output
view raw output of R engine
Computing time
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation