R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(0 + ,0 + ,0 + ,0.051 + ,1 + ,0 + ,1 + ,0 + ,0 + ,2.000 + ,-1 + ,1 + ,0 + ,0 + ,1 + ,0.264 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0.993 + ,-1 + ,1 + ,0 + ,0 + ,1 + ,0.167 + ,1 + ,0 + ,1 + ,1 + ,0 + ,2.600 + ,-1 + ,0 + ,1 + ,3 + ,1 + ,6.500 + ,-1 + ,0 + ,1 + ,0 + ,0 + ,2.800 + ,-1 + ,0 + ,0 + ,1 + ,0 + ,1.200 + ,-1 + ,0 + ,0 + ,1 + ,0 + ,1.300 + ,1 + ,1 + ,1 + ,0 + ,0 + ,1.100 + ,1 + ,1 + ,1 + ,0 + ,0 + ,5.300 + ,1 + ,1 + ,1 + ,0 + ,0 + ,0.123 + ,1 + ,0 + ,1 + ,0 + ,0 + ,2.600 + ,-1 + ,1 + ,1 + ,0 + ,0 + ,3.400 + ,1 + ,1 + ,1 + ,1 + ,0 + ,3.200 + ,1 + ,0 + ,1 + ,0 + ,0 + ,0.504 + ,1 + ,1 + ,1 + ,1 + ,1 + ,0.373 + ,-1 + ,0 + ,1 + ,1 + ,0 + ,2.700 + ,-1 + ,1 + ,0 + ,0 + ,1 + ,1.400 + ,0 + ,1 + ,1 + ,1 + ,0 + ,1.500 + ,0 + ,0 + ,1 + ,0 + ,0 + ,1.200 + ,0 + ,1 + ,1 + ,1 + ,0 + ,1.900 + ,-1 + ,1 + ,0 + ,0 + ,0 + ,0.385 + ,-1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0 + ,0 + ,0.308 + ,1 + ,0 + ,0 + ,0 + ,0 + ,-0.308 + ,-1 + ,1 + ,1 + ,0 + ,0 + ,1.600 + ,-1 + ,1 + ,0 + ,0 + ,0 + ,-1.600 + ,1 + ,0 + ,1 + ,0 + ,0 + ,1.000 + ,0 + ,1 + ,0 + ,1 + ,0 + ,-1.000 + ,0 + ,0 + ,1 + ,0 + ,1 + ,0.547 + ,1 + ,1 + ,0 + ,0 + ,1 + ,-0.547 + ,-1 + ,0 + ,1 + ,1 + ,0 + ,0.594 + ,1 + ,0 + ,0 + ,0 + ,0 + ,-0.594 + ,-1 + ,1 + ,0 + ,0 + ,0 + ,0.544 + ,0 + ,0 + ,1 + ,0 + ,0 + ,-0.544 + ,0 + ,1 + ,0 + ,0 + ,0 + ,0.201 + ,-1 + ,0 + ,1 + ,0 + ,0 + ,-0.201 + ,1 + ,1 + ,1 + ,0 + ,0 + ,2.300 + ,1 + ,1 + ,0 + ,0 + ,0 + ,-2.300 + ,-1 + ,0 + ,1 + ,0 + ,0 + ,0.084 + ,0 + ,1 + ,0 + ,0 + ,0 + ,-0.084 + ,0 + ,0 + ,1 + ,0 + ,0 + ,0.604 + ,1 + ,1 + ,0 + ,0 + ,0 + ,-0.604 + ,-1 + ,0 + ,1 + ,0 + ,1 + ,1.000 + ,1 + ,0 + ,0 + ,0 + ,0 + ,-1.000 + ,-1 + ,1 + ,0 + ,1 + ,2 + ,0.387 + ,1 + ,1 + ,1 + ,1 + ,0 + ,-0.387 + ,-1 + ,0 + ,1 + ,1 + ,0 + ,1.500 + ,1 + ,0 + ,0 + ,0 + ,0 + ,-1.500 + ,-1 + ,1 + ,1 + ,2 + ,0 + ,0.132 + ,1 + ,1 + ,0 + ,0 + ,0 + ,-0.132 + ,-1 + ,0) + ,dim=c(6 + ,332) + ,dimnames=list(c('W%' + ,'ADCKills' + ,'SuppKills' + ,'GoldAdv' + ,'DragAdv' + ,'Side') + ,1:332)) > y <- array(NA,dim=c(6,332),dimnames=list(c('W%','ADCKills','SuppKills','GoldAdv','DragAdv','Side'),1:332)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: > library(brglm) Loading required package: profileModel > roc.plot <- function (sd, sdc, newplot = TRUE, ...) + { + sall <- sort(c(sd, sdc)) + sens <- 0 + specc <- 0 + for (i in length(sall):1) { + sens <- c(sens, mean(sd >= sall[i], na.rm = T)) + specc <- c(specc, mean(sdc >= sall[i], na.rm = T)) + } + if (newplot) { + plot(specc, sens, xlim = c(0, 1), ylim = c(0, 1), type = 'l', + xlab = '1-specificity', ylab = 'sensitivity', main = 'ROC plot', ...) + abline(0, 1) + } + else lines(specc, sens, ...) + npoints <- length(sens) + area <- sum(0.5 * (sens[-1] + sens[-npoints]) * (specc[-1] - + specc[-npoints])) + lift <- (sens - specc)[-1] + cutoff <- sall[lift == max(lift)][1] + sensopt <- sens[-1][lift == max(lift)][1] + specopt <- 1 - specc[-1][lift == max(lift)][1] + list(area = area, cutoff = cutoff, sensopt = sensopt, specopt = specopt) + } > roc.analysis <- function (object, newdata = NULL, newplot = TRUE, ...) + { + if (is.null(newdata)) { + sd <- object$fitted[object$y == 1] + sdc <- object$fitted[object$y == 0] + } + else { + sd <- predict(object, newdata, type = 'response')[newdata$y == + 1] + sdc <- predict(object, newdata, type = 'response')[newdata$y == + 0] + } + roc.plot(sd, sdc, newplot, ...) + } > hosmerlem <- function (y, yhat, g = 10) + { + cutyhat <- cut(yhat, breaks = quantile(yhat, probs = seq(0, + 1, 1/g)), include.lowest = T) + obs <- xtabs(cbind(1 - y, y) ~ cutyhat) + expect <- xtabs(cbind(1 - yhat, yhat) ~ cutyhat) + chisq <- sum((obs - expect)^2/expect) + P <- 1 - pchisq(chisq, g - 2) + c('X^2' = chisq, Df = g - 2, 'P(>Chi)' = P) + } > x <- as.data.frame(t(y)) > r <- brglm(x) > summary(r) Call: brglm(formula = x) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.2579 0.2021 -1.276 0.201911 ADCKills -0.1342 0.2608 -0.515 0.606828 SuppKills -0.1638 0.3918 -0.418 0.675956 GoldAdv 0.8858 0.1188 7.453 9.13e-14 *** DragAdv 0.5761 0.1646 3.499 0.000467 *** Side 0.6162 0.2653 2.323 0.020186 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 435.37 on 331 degrees of freedom Residual deviance: 338.68 on 326 degrees of freedom Penalized deviance: 319.4787 AIC: 350.68 > rc <- summary(r)$coeff > try(hm <- hosmerlem(y[1,],r$fitted.values),silent=T) > try(hm,silent=T) X^2 Df P(>Chi) 8.5671704 8.0000000 0.3801126 > postscript(file="/var/wessaorg/rcomp/tmp/1hilm1424663641.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > ra <- roc.analysis(r) > dev.off() null device 1 > te <- array(0,dim=c(2,99)) > for (i in 1:99) { + threshold <- i / 100 + numcorr1 <- 0 + numfaul1 <- 0 + numcorr0 <- 0 + numfaul0 <- 0 + for (j in 1:length(r$fitted.values)) { + if (y[1,j] > 0.99) { + if (r$fitted.values[j] >= threshold) numcorr1 = numcorr1 + 1 else numfaul1 = numfaul1 + 1 + } else { + if (r$fitted.values[j] < threshold) numcorr0 = numcorr0 + 1 else numfaul0 = numfaul0 + 1 + } + } + te[1,i] <- numfaul1 / (numfaul1 + numcorr1) + te[2,i] <- numfaul0 / (numfaul0 + numcorr0) + } > postscript(file="/var/wessaorg/rcomp/tmp/2c5xw1424663641.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow=c(2,2)) > plot((1:99)/100,te[1,],xlab='Threshold',ylab='Type I error', main='1 - Specificity') > plot((1:99)/100,te[2,],xlab='Threshold',ylab='Type II error', main='1 - Sensitivity') > plot(te[1,],te[2,],xlab='Type I error',ylab='Type II error', main='(1-Sens.) vs (1-Spec.)') > plot((1:99)/100,te[1,]+te[2,],xlab='Threshold',ylab='Sum of Type I & II error', main='(1-Sens.) + (1-Spec.)') > par(op) > dev.off() null device 1 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Coefficients of Bias-Reduced Logistic Regression',5,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.E.',header=TRUE) > a<-table.element(a,'t-stat',header=TRUE) > a<-table.element(a,'2-sided p-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:length(rc[,1])) { + a<-table.row.start(a) + a<-table.element(a,labels(rc)[[1]][i],header=TRUE) + a<-table.element(a,rc[i,1]) + a<-table.element(a,rc[i,2]) + a<-table.element(a,rc[i,3]) + a<-table.element(a,2*(1-pt(abs(rc[i,3]),r$df.residual))) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/3zp8w1424663641.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Summary of Bias-Reduced Logistic Regression',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Deviance',1,TRUE) > a<-table.element(a,r$deviance) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Penalized deviance',1,TRUE) > a<-table.element(a,r$penalized.deviance) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Residual Degrees of Freedom',1,TRUE) > a<-table.element(a,r$df.residual) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'ROC Area',1,TRUE) > a<-table.element(a,ra$area) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Hosmer–Lemeshow test',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Chi-square',1,TRUE) > phm <- array('NA',dim=3) > for (i in 1:3) { try(phm[i] <- hm[i],silent=T) } > a<-table.element(a,phm[1]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Degrees of Freedom',1,TRUE) > a<-table.element(a,phm[2]) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'P(>Chi)',1,TRUE) > a<-table.element(a,phm[3]) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/41dqt1424663641.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Fit of Logistic Regression',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Index',1,TRUE) > a<-table.element(a,'Actual',1,TRUE) > a<-table.element(a,'Fitted',1,TRUE) > a<-table.element(a,'Error',1,TRUE) > a<-table.row.end(a) > for (i in 1:length(r$fitted.values)) { + a<-table.row.start(a) + a<-table.element(a,i,1,TRUE) + a<-table.element(a,y[1,i]) + a<-table.element(a,r$fitted.values[i]) + a<-table.element(a,y[1,i]-r$fitted.values[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/5hfio1424663641.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Type I & II errors for various threshold values',3,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Threshold',1,TRUE) > a<-table.element(a,'Type I',1,TRUE) > a<-table.element(a,'Type II',1,TRUE) > a<-table.row.end(a) > for (i in 1:99) { + a<-table.row.start(a) + a<-table.element(a,i/100,1,TRUE) + a<-table.element(a,te[1,i]) + a<-table.element(a,te[2,i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/6tlro1424663641.tab") > > try(system("convert tmp/1hilm1424663641.ps tmp/1hilm1424663641.png",intern=TRUE)) character(0) > try(system("convert tmp/2c5xw1424663641.ps tmp/2c5xw1424663641.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.982 0.245 4.237