[R] Help in Coxme
Nelson Martins
nelson.e.v.martins at gmail.com
Sun Jan 16 20:09:12 CET 2011
Thank you for the informations, especially for the cumhaz tip.
I'll explain a bit more of my experimental design:
I have 4 different replicate populations of drosophila, from which I
take samples to infect, in 5 independent replicates (tubes) of 10
individuals each. That makes 200 individuals per treatment (50 per
pop), and if I treat it as a whole like in
coxph(Surv(Time,Status)~Treatment) or coxph(Surv(Time,Status)~strat(Treatment)
some of the variability associated with the population and replicate
would go unconsidered, and the variance would be wrongly estimated.
That's my interest in using (nested) random models.
For now, I would only like to plot the survival curves of each
treatment, with the "correct" s.e., and I'm having some troubles with
that using the standard R functions.
In the future I would like to know if
a) what are the different survival curves for each treatment
b) the variability between populations (i.e. if the different
populations are significantly different between each other, for the
same treatment)
c) if the variability within populations for a given treatment is
different from other treatments.
d) all this removing the error associated with the replicates.
Thank you again for your help
On Sun, Jan 16, 2011 at 16:44, David Winsemius <dwinsemius at comcast.net> wrote:
>
> On Jan 16, 2011, at 5:07 AM, Nelson Martins wrote:
>
>> I am a relative newbie to survival analysis and R in general, but
>> would like to use the coxme package to analyse some data I currently
>> have.
>> The data is relative to survival times of drosophila melanogaster
>> populations to infection with pathogens, and has the variables:
>> Time,
>> Status,
>> Treatment (4 treatments + 2 controls)
>> Population
>> Replicate
>> and I'm currently using the following call
>> mixed<- coxme(formula = Surv(Time, Status) ~ strata(Treatment) + (1 |
>> Population/Replicate),x=T,y=T)
>>
>> The treatments have very different mortality profiles, that's why I'm
>> using stratification.
>> I have several problems:
>> 1 - I'm able to get the results, and to compare the different treatments
>> using glht (e.g. - glht(mixed,mcp(Treatment="Tukey"))), only if I
>> don't stratify the treatments
>
> My understanding is that strata are used when you _don't_ want estimates for
> that factor (at least in ordinary coxph() modeling.)
>
>> 2 - I'm unable to plot the results as in other cox models (cph,coxph)
>> using survplot/survfit. The other models don't allow specifying random
>> variables (Populations and Replicates), which is of great importance
>> to me.
>
> My understanding is that _this_ is the situation in which one would use
> strata (for factors like Replicates) within regular coxph() models. I'm not
> clear what you mean by "Population" and so cannot comment on how it might be
> handled.
>
>> 3 - One other problem I'm having is in plotting the hazard curves
>> (i.e. the instantaneous risk at each day). Is it possible to do it
>> using
>> these functions, hopefully with the associated standard errors?
>
> (Sorry, I don't have sufficient understanding of the operation of coxme to
> make informed comments. Terry Therneau visits R-help but not generally on
> the weekends. In ordinary survfit use, there is a "cumhaz" option to the fun
> argument.))
>>
>> Thank you for your time and help
>>
>> Best regards
>> Nelson Martins
>
> David Winsemius, MD
> West Hartford, CT
>
>
More information about the R-help
mailing list