[R] logistic regression for repeated measurement
Frank E Harrell Jr
fharrell at virginia.edu
Wed Mar 5 03:33:57 CET 2003
On Wed, 5 Mar 2003 11:14:37 +0900
Hiroto Miyoshi <h_m_ at po.harenet.ne.jp> wrote:
> Dear R-users
>
> I need your help.
> I have a data set which was collected from
> an experiment of one between- and one
> within-subject design. And the response
> data is coded by success(1)/failure(0).
>
> The experiment had two groups of subjects:
> The one was experimental, and the
> other, control. The experimental group
> got a task training, and both groups of subjects
> were tested twice, once before the training
> and once after the training. at the same time.
> I like to examine the effect of training by
> detecting an interaction effect of the group and
> tests.
> Now, it seems glm is not appropriate to this
> situation since it does not deal with stratified
> errors.
>
> Could you lead me to appropriate functions?
> Sincerely
> -----------------------
> Hiroto Miyoshi
> h_m_ at po.harenet.ne.jp
>
There are several ways to go. GEE is one, random effects models another. One other approach is to install the Hmisc and Design packages (http://hesweb1.med.virginia.edu/biostat/s) and do (assume id is the unique subject identifier):
f <- lrm(y ~ x1 + x2*x3 + ..., x=T, y=T) # working independence model
g <- robcov(f, id) # cluster sandwich variance adjustment
h <- bootcov(f, id, B=100) # cluster bootstrap adjustment
summary(g) # etc.
--
Frank E Harrell Jr Prof. of Biostatistics & Statistics
Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences
U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat
More information about the R-help
mailing list