Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
62.4 57.6 67.4 64.3 76.1 73.1 67.4 64.2 74.5 72.7 72.6 70.7 60.5 57.3 66.1 63.2 76.5 74.3 76.8 74 77 74.2 71 67.3 74.8 71.5 73.7 71.8 80.5 79.3 71.8 70.4 76.9 75.4 79.9 79.2 65.9 63.3 69.5 67 75.1 73.1 79.6 77.8 75.2 72.4 68 64.2 72.8 68.9 71.5 68.9 78.5 76.1 76.8 74.7 75.3 72.8 76.7 74.9 69.7 66.9 67.8 64.2 77.5 76 82.5 80.7 75.3 72.2 70.9 67.4 76 72.1 73.7 70.8 79.7 77.2 77.8 75.4 73.3 70.5 78.3 76.7 71.9 68.8 67 63 82 80.6 83.7 81.7 74.8 72.2 80 76.9 74.3 69.5 76.8 74 89 87.5 81.9 80.5 76.8 74.8 88.9 89.2 75.8 73.5 75.5 73.9 89.1 89.5 88 87.4 85.9 84.3 89.3 86.9 82.9 79.9 81.2 78.6 90.5 89.4 86.4 85.6 81.8 81 91.3 92.8 73.4 71.4 76.6 75.5 91 92.2 87 86.7 89.7 89.5 90.7 88.4 86.5 83.3 86.6 84.7 98.8 99 84.4 84.1 91.4 92.4 95.7 97.6 78.5 77.4 81.7 81.2 94.3 96.5 98.5 100 95.4 96.2 91.7 90.8 92.8 91.3 90.5 89.4 102.2 102.9 91.8 92.1 95 96.6 102 105 88.9 90 89.6 89.8 97.9 100.4 108.6 111.3 100.8 101.1 95.1 93.9 101 100.4 100.9 102.2 102.5 104.5 105.4 109.1 98.4 101.4 105.3 109.5 96.5 98.6 88.1 88.4 107.9 112.3 107 109.8 92.5 92.5 95.7 94.2 85.2 80.4 85.5 83.5 94.7 94.2 86.2 86 88.8 88.7 93.4 94.8 83.4 81.8 82.9 79.8 96.7 96.6 96.2 95.7 92.8 91.8 92.8 89.2 90 85.5 95.4 93.6 108.3 108.4 96.3 96.6 95 94.8 109 112.2 92 91.6 92.3 91.5 107 109.5 105.5 106.9 105.4 105.9 103.9 103.5 99.2 97.3 102.2 103.2 121.5 125.7 102.3 104.4 110 113 105.9 109.2 91.9 92.4 100 101.4 111.7 115.6 104.9 107.3 103.3 105.1 101.8 102.2 100.8 99.6 104.2 102.6 116.5 122.2 97.9 99.3 100.7 102.8 107 111.7 96.3 98.3 96 98.6 104.5 109 107.4 112.8 102.4 105.5 94.9 94.8 98.8 98.3 96.8 96.5 108.2 109.8 103.8 108 102.3 106.5 107.2 111.5 102 104.2 92.6 93.9 105.2 109.8 113 117 105.6 106.5 101.6 100.1 101.7 101.7 102.7 104 109 112.3 105.5 111.1 103.3 107.7 108.6 114.8 98.2 101.6 90 93 112.4 120.9 111.9 118.7 102.1 106.3 102.4 104.8 101.7 101.8 98.7 100.3 114 120 105.1 111.3 98.3 103.5 110 118.3 96.5 101.8 92.2 97.3 112 120.3 111.4 117.5 107.5 110.9 103.4 105.3 103.5 100.7 107.4 107.8 117.6 119.1 110.2 112.9 104.3 108.4 115.9 123.9 98.9 101.2 101.9 103.6 113.5 119.8 109.5 112.9 110 111.8 114.2 115.6 106.9 104.8 109.2 110.5 124.2 128.8 104.7 108.6 111.9 117.1 119 124.6 102.9 104.2 106.3 108.3
Names of X columns:
X1 X9
Response Variable (column number)
Explanatory Variable (column number)
Include Intercept Term ?
TRUE
FALSE
Chart options
Title:
Label y-axis:
Label x-axis:
R Code
library(boot) cat1 <- as.numeric(par1) cat2<- as.numeric(par2) intercept<-as.logical(par3) x <- na.omit(t(x)) rsq <- function(formula, data, indices) { d <- data[indices,] # allows boot to select sample fit <- lm(formula, data=d) return(summary(fit)$r.square) } xdf<-data.frame(na.omit(t(y))) (V1<-dimnames(y)[[1]][cat1]) (V2<-dimnames(y)[[1]][cat2]) xdf <- data.frame(xdf[[cat1]], xdf[[cat2]]) names(xdf)<-c('Y', 'X') if(intercept == FALSE) (lmxdf<-lm(Y~ X - 1, data = xdf) ) else (lmxdf<-lm(Y~ X, data = xdf) ) (results <- boot(data=xdf, statistic=rsq, R=1000, formula=Y~X)) sumlmxdf<-summary(lmxdf) (aov.xdf<-aov(lmxdf) ) (anova.xdf<-anova(lmxdf) ) load(file='createtable') a<-table.start() nc <- ncol(sumlmxdf$'coefficients') nr <- nrow(sumlmxdf$'coefficients') a<-table.row.start(a) a<-table.element(a,'Linear Regression Model', nc+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, lmxdf$call['formula'],nc+1) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'coefficients:',1,TRUE) a<-table.element(a, ' ',nc,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, ' ',1,TRUE) for(i in 1 : nc){ a<-table.element(a, dimnames(sumlmxdf$'coefficients')[[2]][i],1,TRUE) }#end header a<-table.row.end(a) for(i in 1: nr){ a<-table.element(a,dimnames(sumlmxdf$'coefficients')[[1]][i] ,1,TRUE) for(j in 1 : nc){ a<-table.element(a, round(sumlmxdf$coefficients[i, j], digits=3), 1 ,FALSE) } a<-table.row.end(a) } a<-table.row.start(a) a<-table.element(a, '- - - ',1,TRUE) a<-table.element(a, ' ',nc,FALSE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Residual Std. Err. ',1,TRUE) a<-table.element(a, paste(round(sumlmxdf$'sigma', digits=3), ' on ', sumlmxdf$'df'[2], 'df') ,nc, FALSE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Multiple R-sq. ',1,TRUE) a<-table.element(a, round(sumlmxdf$'r.squared', digits=3) ,nc, FALSE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, '95% CI Multiple R-sq. ',1,TRUE) a<-table.element(a, paste('[',round(boot.ci(results,type='bca')$bca[1,4], digits=3),', ', round(boot.ci(results,type='bca')$bca[1,5], digits=3), ']',sep='') ,nc, FALSE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Adjusted R-sq. ',1,TRUE) a<-table.element(a, round(sumlmxdf$'adj.r.squared', digits=3) ,nc, FALSE) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab') a<-table.start() a<-table.row.start(a) a<-table.element(a,'ANOVA Statistics', 5+1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, ' ',1,TRUE) a<-table.element(a, 'Df',1,TRUE) a<-table.element(a, 'Sum Sq',1,TRUE) a<-table.element(a, 'Mean Sq',1,TRUE) a<-table.element(a, 'F value',1,TRUE) a<-table.element(a, 'Pr(>F)',1,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, V2,1,TRUE) a<-table.element(a, anova.xdf$Df[1]) a<-table.element(a, round(anova.xdf$'Sum Sq'[1], digits=3)) a<-table.element(a, round(anova.xdf$'Mean Sq'[1], digits=3)) a<-table.element(a, round(anova.xdf$'F value'[1], digits=3)) a<-table.element(a, round(anova.xdf$'Pr(>F)'[1], digits=3)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a, 'Residuals',1,TRUE) a<-table.element(a, anova.xdf$Df[2]) a<-table.element(a, round(anova.xdf$'Sum Sq'[2], digits=3)) a<-table.element(a, round(anova.xdf$'Mean Sq'[2], digits=3)) a<-table.element(a, ' ') a<-table.element(a, ' ') a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable1.tab') bitmap(file='regressionplot.png') plot(Y~ X, data=xdf, xlab=V2, ylab=V1, main='Regression Solution') if(intercept == TRUE) abline(coef(lmxdf), col='red') if(intercept == FALSE) abline(0.0, coef(lmxdf), col='red') dev.off() library(car) bitmap(file='residualsQQplot.png') qqPlot(resid(lmxdf), main='QQplot of Residuals of Fit') dev.off() bitmap(file='residualsplot.png') plot(xdf$X, resid(lmxdf), main='Scatterplot of Residuals of Model Fit') dev.off() bitmap(file='cooksDistanceLmplot.png') plot(lmxdf, which=4) dev.off()
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