andrea evangelista
2007-Jan-25 15:56 UTC
[R] summary of the effects after logistic regression model
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 effects. I use the functions lrm and robcov from R Design library: h<-lrm(head ~ trt*rcs(days)+ age+ sex,x=T,y=T) h.rob<-robcov(h,id) 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? Best regards Andrea Evangelista Italy [[alternative HTML version deleted]]
Frank E Harrell Jr
2007-Jan-26 14:23 UTC
[R] summary of the effects after logistic regression model
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 > effects. > > I use the functions lrm and robcov from R Design library: > > h<-lrm(head ~ trt*rcs(days)+ age+ sex,x=T,y=T) > h.rob<-robcov(h,id) > > 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. Frank Harrell> > Best regards > > Andrea Evangelista > Italy > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Possibly Parallel Threads
- extracting Pr>ltl from robcov/ols (Design)
- Creating dummy vars with contrasts - why does the returned identity matrix contain all levels (and not n-1 levels) ?
- Confidence Intervals for Random Effect BLUP's
- Error: cannot use PQL when using lmer
- Omitting constant in ols() from Design