Send output to:
Browser Blue - Charts White
Browser Black/White
CSV
Data X:
342185 24 1500000 0 121448 10 65000 4 10714 45 13383 2 15101 4 94420 9 30000 3 30657 10 45835 7 68267 40 35250 5 25302 4 14250 8 28232 6 13731 1 16000 2 10879 0 36000 3 526837 44 34837 5 3370 0 17101 14 11242 37 91945 3 326 4 28161 0 14534 8 52515 11 18816 6 15848 4 100000 26 138135 0 86750 37 600 5 30000 0 17859 4 20050 39 52000 8 168 0 31730 3 10182 5 51840 5 20000 45 12000 2 1500 0 52000 15 12051 5 26067 4 39466 7 113 0 21000 7 250 0 147368 19 20900 1 51366 3 18450 4 12745 57 9441 4 136647 47 45702 8 25109 42 46500 0 0 52 16362 5 90000 5 1074611 29 72495 5 42066 10 41400 10 24000 7 20000 79 1025 38 70000 5 0 0 3449547 43 10614 3 10882 60 40378 7 1000 79 12544 0 18269 8 710 3 46231 4 293770 9 12759 4 11159 9 9901 2 29657 0 6333 2 2689175 26 73467 40 23000 35 10393 79 300 0 11164 5 23300 0 23000 10 25000 10 54213 2 6541 4 5280 0 9964 44 80471 41 6986 43 3963 0 39700 6 10501 5 18515 55 86507 11 69910 3 61092 0 9841 5 10000 76 150 0 41214 0 877 2 202000 20 18000 0 28467 15 13877 5 12500 18 5000 20 12558 6 25000 23 45250 0 18127 0 25856 14 37000 12 18513 3 17504 0 3353 6 48124 17 637957 47 13104 32 10000 0 28607 0 18736 0 337 3 15869 0 0 4 22123 2 85791 0 17660 6 9233 1 2676 8 10572 0 21634 5 10000 5 10000 3 24659 9 9695 45 20000 8 11325 5 56670 4 913564 47 50959 10 95100 32 1536426 46 75000 5 28747 5 22200 9 142000 34 53779 0 3800 3 9573 38 16897 0 500 2 18463 30 13670 3 20833 70 0 0 24880 5 31253 4 123441 22 16725 54 0 0 127299 3 10477 3 13986 50 0 0 18352 50 3600 0 70000 15 31100 9 63989 5 14548 40 33673 5 79780 7 20400 5 3807 0 22253 6 153210 24 37240 0 9740 3 11322 45 731320 45 56175 6 9866 5 19000 44 67423 4 28373 50 18500 30 50400 30 0 0 27317 10 22906 3 257037 7 33000 50 7500 0 22000 7 80000 7 5000 0 2000 79 40000 0 46297 55 10214 45 18125 2 249600 14 9950 17 30000 3 5000 0 18600 7 339895 30 112534 10 16620 11 23852 7 25300 5 10037 5 10050 4 14768 0 9187 0 31297 15 21507 0 3843 4 68350 6 14171 7 27021 3 33240 3 59811 6 111680 4 22465 3 615 0 59450 19 10860 7 19889 6 10300 28 68728 4 30000 5 10000 10 51456 3 24312 8 36782 9 10339 6 149066 13 557506 10 104879 9 23609 60 135 0 101514 30 23000 12 58675 3 9517 4 275000 0 20000 30 131500 7 43010 2 12150 9 6833 0 13067 0 0 15 2576191 65 64300 20 10243 8 15860 22 11632 4 15795 6 270000 24 13000 10 5000 3 26586 9 20000 9 78420 0 350 4 13618 10 5000 0 110000 8 7000 3 2800 0 21986 8 1181943 48 33545 11 18782 9 3000 0 9690 27 220514 10 10092 9 14051 30 9625 2 18155 3 34553 6 93288 9 15185 0 10000 25 81400 0 6350 1 25324 6 42538 5 9200 70 0 0 12700 5 192600 36 28756 6 10783 79 0 0 43292 5 142729 4 20000 0 9606 8 49281 26 9483 5 0 2 16483 37 18288 5 25685 7 11015 4 10400 21 24700 4 11720 3 1493 0 38000 0 38000 4 12580 44 83274 5 28500 4 15383 0 14428 7 23709 3 300000 80 65000 0 60200 5 15533 4 122779 7 646685 26 20000 0 16166 3 565 1 20000 0 10020 4 852950 48 20443 8 85000 20 239508 25 14600 24 124161 7 31300 17 20000 0 11491 5 16645 0 11742 3 4100 6 18854 2 49530 22 30000 10 110400 0 30000 5 15000 0 10100 2 43857 9 37960 10 16873 20 1492082 49 73190 10 579585 4 116144 10 640000 51 289653 9 9329 7 235000 14 10500 3 23259 3 25000 2 94700 2 20118 2 272418 23 27114 2 46597 2 293015 20 1929657 0 641874 15 46649 5 20712 7 36063 6 2620 0 57050 2 14000 0 39970 12 147750 28 250 20 64479 9 23314 2 11019 5 227425 4 500 4 11600 9 53324 0 30093 7 10000 5 0 5 25696 2 83800 4 102893 0 86486 8 31500 3 52025 6 3041 5 17500 0 750 1 139500 14 40300 8 44996 23 18255 7 6402 0 19628 18
Names of X columns:
X1 X2
Response Variable (column number)
Explanatory Variable (column number)
Include Intercept Term ?
TRUE
FALSE
Chart options
Title:
Label y-axis:
Label x-axis:
R Code
par3 <- 'TRUE' par2 <- '2' par1 <- '1' 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