R version 2.6.1 (2007-11-26) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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(1 + ,70.6 + ,1 + ,7.8 + ,1 + ,1 + ,71.3 + ,1 + ,6.0 + ,1 + ,1 + ,67.5 + ,1 + ,6.0 + ,1 + ,1 + ,73.2 + ,1 + ,7.1 + ,1 + ,1 + ,81.2 + ,1 + ,5.9 + ,1 + ,1 + ,75.5 + ,1 + ,3.6 + ,1 + ,1 + ,66.7 + ,1 + ,6.9 + ,1 + ,1 + ,68.7 + ,1 + ,8.0 + ,1 + ,1 + ,73.0 + ,1 + ,5.6 + ,1 + ,1 + ,78.4 + ,1 + ,6.1 + ,1 + ,1 + ,76.1 + ,1 + ,5.1 + ,1 + ,1 + ,65.7 + ,1 + ,5.0 + ,1 + ,1 + ,66.7 + ,1 + ,5.2 + ,1 + ,1 + ,72.3 + ,1 + ,2.9 + ,1 + ,1 + ,66.2 + ,1 + ,4.9 + ,1 + ,1 + ,67.7 + ,1 + ,4.7 + ,1 + ,1 + ,64.9 + ,1 + ,6.5 + ,1 + ,1 + ,72.2 + ,1 + ,7.5 + ,1 + ,1 + ,69.4 + ,1 + ,3.9 + ,1 + ,1 + ,72.8 + ,1 + ,3.2 + ,1 + ,1 + ,75.4 + ,1 + ,4.5 + ,1 + ,1 + ,74.7 + ,1 + ,6.5 + ,1 + ,1 + ,77.4 + ,1 + ,7.4 + ,1 + ,1 + ,68.8 + ,1 + ,3.3 + ,1 + ,1 + ,75.3 + ,1 + ,5.9 + ,1 + ,1 + ,72.4 + ,1 + ,4.8 + ,1 + ,1 + ,72.7 + ,1 + ,4.4 + ,1 + ,1 + ,65.3 +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 + ,65 + ,0 + ,7 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,2 + ,6 + ,2 + ,0 + ,65 + ,1 + ,5 + ,2 + ,0 + ,65 + ,1 + ,7 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,0 + ,7 + ,2 + ,0 + ,65 + ,1 + ,9 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,1 + ,7 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,1 + ,7 + ,2 + ,0 + ,65 + ,1 + ,7 + ,2 + ,0 + ,65 + ,0 + ,8 + ,2 + ,0 + ,65 + ,1 + ,4 + ,2 + ,0 + ,65 + ,0 + ,5 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,1 + ,6 + ,2 + ,0 + ,65 + ,1 + ,7 + ,2) + ,dim=c(5 + ,268) + ,dimnames=list(c('dummy' + ,'age' + ,'snoring' + ,'sleep_time' + ,'sex') + ,1:268)) > y <- array(NA,dim=c(5,268),dimnames=list(c('dummy','age','snoring','sleep_time','sex'),1:268)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > library(brlr) > 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 <- brlr(x) Warning message: In brlr(x) : Not converged: gradient values not all zero > summary(r) Call: brlr(formula = x) Coefficients: Value Std. Error t value (Intercept) -287.1179 72.3550 -3.9682 age 4.4131 1.1092 3.9785 snoring 1.4261 0.8801 1.6204 sleep_time -0.2267 0.2223 -1.0198 sex -1.5477 0.7260 -2.1318 Deviance: 39.8686 Penalized deviance: 33.8476 Residual df: 263 > rc <- summary(r)$coeff > postscript(file="/var/www/html/freestat/rcomp/tmp/1m8431201695172.ps",horizontal=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/www/html/freestat/rcomp/tmp/244ze1201695172.ps",horizontal=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 > load(file='/var/www/html/freestat/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/www/html/freestat/rcomp/tmp/3u6sr1201695172.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.end(a) > table.save(a,file="/var/www/html/freestat/rcomp/tmp/460x31201695173.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/www/html/freestat/rcomp/tmp/5l34g1201695173.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/www/html/freestat/rcomp/tmp/6wkp21201695173.tab") > > system("convert tmp/1m8431201695172.ps tmp/1m8431201695172.png") > system("convert tmp/244ze1201695172.ps tmp/244ze1201695172.png") > > > proc.time() user system elapsed 3.671 0.468 3.738