Hi,
These are materials for logistic regression course II: Conditional logistic regression, 2011. This year I use R version 2.14.0 and the regression outputs are not different from the 2009 version where R version 2.12.0 was used. However, the different in regression outputs at the 3 or later digits after the decimal point is very usual when you change R version and you cannot notice the difference on your R console since you have no older version of R to compare. This is a technical issue, not a bug, of the maximum likelihood estimation method. None of the results is wrong. It means that you should not pay attention too much on later digits after the second decimal points.
If you are eager to know why the maximum likelihood estimation method is that tricky, please read some textbooks specific to this matter.
Conditional logistic regression requires library survival that already exists on your R library folder. Just call library(survival) or require(survival) and you are ready to use clogit function.
agechd.dta
cca-match.dta
The module can be downloaded here.
logistic1112-2.pdf
You can also download ICE modules from
r-ice.project.net
The required modules for this course are ice and epid which can be installed into R by typing the following two lines on your R console.
install.packages("ice",repos="http://r-ice-project.net")
install.packages("epid",repos="http://r-ice-project.net")
In this session, we are going to use multilevel logistic regression (glmer) in dealing with data stratified by age group as if the stratification is a matching condition. This method is recently used by some authors. Then we need another package from CRAN called "lme4". You can install the package by typing the following line on your R console.
install.packages("lme4")
(Since the package is installed from CRAN or its mirror, a repos argument is not required.)
Finally, you can follow my R script file below. Don't forget to change working directory to yours.
conditional1.R
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment