Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
36.43 10.81 38.72 11.46 49.66 14.65 37.7 11.09 34.72 10.15 51.52 14.98 32.26 9.35 51.88 15.04 50.13 14.41 144.69 5.14 159.08 5.65 146.64 5.21 121.21 4.23 116.45 4.07 117.19 4.09 133.82 4.67 136.98 4.78 121.07 4.23 90.99 3.17 91.51 3.19 116.48 4.06 120.43 3.82 125.72 3.99 114.31 3.62 116.63 3.7 157.88 5.01 115.46 3.46 152.5 4.58 147.38 4.42 147.38 4.42 127.7 3.83 129.52 3.73 120.51 3.47 114.97 3.31 116.23 3.35 117.8 3.39 146.61 3.9 148.85 3.96 114.77 3.05 127.83 3.4 153.35 4.08 154.94 4 148.37 3.83 152.96 3.95 161.02 4.16 154.34 3.99 144.24 3.73 178.7 4.62 121.86 3.15 150.66 3.89 196.75 2.69 250.12 3.42 228.32 3.12 238.36 3.26 198.25 2.71 324.08 2.26 431.54 3.01 267.83 1.87 331.21 2.31 248.52 1.73 367.71 2.56 320.22 2.23 51.87 6.72 51.3 6.65 69.23 8.97 57.51 7.45 58.3 7.55 55.8 7.23 68.21 8.84 66.63 8.63 49.41 6.37 49.34 6.36 49.02 6.32 50.24 6.47 49.81 6.42 49.25 6.35 49.25 6.35 49.81 6.42 49.25 13.03 49.34 13.05 48.54 12.84 44.97 11.87 52.31 13.8 53.5 6.01 52.35 5.88 65.47 7.36 68 7.64 66.05 7.42 62.11 6.97 114.06 4.46 97.89 3.82 112.57 4.4 112.42 4.39 118.16 4.62 129.41 5.05 120.64 4.71 326.84 1.83 328.86 1.84 332.35 1.86 296.16 1.66 89.47 4.73 100.05 5.29 93.24 4.93 92.74 4.91 113.08 5.98 113.8 6.02 83.81 4.43 113.16 5.99 81.89 4.33 97.53 5.16 89.43 4.73 88.18 4.66 87.7 4.64 91.17 4.82 113.59 4.12 116.72 4.23 115.92 4.2 118.11 4.28 114.45 4.15 115.78 4.17
Names of X columns:
Vol PUV
Response Variable (column number)
Explanatory Variable (column number)
Include Intercept Term ?
TRUE
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
1 seconds
R Server
Big Analytics Cloud Computing Center
Click here to blog (archive) this computation