[R] summary of the effects after logistic regression model
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Fri Jan 26 15:23:17 CET 2007
andrea evangelista wrote:
> Dear all, my aim is to estimate the efficacy over time of a treatment for
> headache prevention. Data consist of long sequences of repeated binary
> outcomes (1 if the subject has at least 1 episode of headache , 0
> otherwise) on subjects randomized to placebo or treatment.
> I have fit a logistic regression model with Huber-White cluster sandwich
> covariance estimator.
> I have put in the model the variables treatment (trt),sex,age and a
> restricted cubic spline of time (days) to allow for non-linear treatment
> I use the functions lrm and robcov from R Design library:
> h<-lrm(head ~ trt*rcs(days)+ age+ sex,x=T,y=T)
> I want to estimate treatment effect over time, then:
> k<-contrast(h.rob,list(day=1:240, trt=1),
> list(day=1:240, trt=0))
> xYplot(Cbind(exp(Contrast), exp(Lower),exp( Upper)) ~ day, data=k) #Plot
> of treatment effects (odds ratio).
> The treatment group has a disavantage at the baseline ( for day=1 ,OR=1.16),
> however at day=210 I can see a reduction of headache risk (OR=0.58) on
> treatment group.
> How can I set to 1 the OR of treatment at the baseline (day=1) with R? In
> case, is it corrent?
I don't know of an extremely simple way to do it. But the baseline may
be noisy and I'm not sure I would recommend doing what you want.
> Best regards
> Andrea Evangelista
> [[alternative HTML version deleted]]
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help