# Epsy 589 # Fall 2019 # C.J.Anderson # # Approximate exact (conditional) logistic regression # ######################################################## # Set up and read in data # ######################################################## #setwd("D:\\Dropbox\\edps 589\\5 logistic regression") setwd("C:\\Users\\cja\\Dropbox\\edps 589\\5 logistic regression") esr <- read.table(file="esr_data.txt", header=TRUE) names(esr) head(esr) library(elrm) # Data are in 'individual' format and the elrm command wants # response variable in format sucuess/ntrials esr$one <- 1 # it only seems to be able to handle 1 predictor/explanatory variable # at a time require(elrm) f <- elrm(response/one ~ fibrin, interest ~fibrin, dataset=esr, r=4, iter=2000, burnIn=100,alpha=.05) summary(f) require(elrm) g <- elrm(response/one ~ globulin, interest ~globulin, dataset=esr, r=4, iter=2000, burnIn=100,alpha=.05) summary(g)