[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
[email protected] (Roberto G. Gutierrez, StataCorp.) |

To |
[email protected] |

Subject |
Re: st: Interpretation of shared frailty model |

Date |
Wed, 09 Jul 2003 09:55:34 -0500 |

Christian Schnier <[email protected]> asks: > The idea is to analyse the time-to-first-service in cattle from 200 > different farms. Every cow is measured only once, but cows from the same > farm are correlated. The main predictor variable is the type of farm (so it > is measured on the group level) and potential confounding factors are > measured on the cow-level (breed, 2 levels). > For the analysis I have used an Accelerated failure time model with Weibull- > distributed failure times and a gamma-shared frailty effect. In STATA this > looks like: > xi: streg i.type i.breed, d(weibull) frailty(gamma) shared(farm) time > Now, the question: > I would like to predict the length of the period when the first, second and > third quartile of the cows are inseminated (fail) in both farm-types. > For the median of a cow in farm-type1 I would use: > [-ln(0.5)]^(1/e(aux_p))*exp(_b[_cons]+_b_[I_type1]) > which should work for Weibull-AFT models without frailty (Hosmer and > Lemeshow). > But: can I use the 'normal' formula and ignore the estimated shared frailty > (theta=0.3)? Is that a prediction for a farm with zero-frailty? If you use the "normal" formula, then you obtain the estimated median time for a farm with frailty of one (remember, frailties are multiplicative), which corresponds to an additive random effect of zero. Alternatively, you could just use . predict median_t, time median and this will predict the median times for all observations based on their covariate patterns. Simply find an observation that has the covariate pattern you seek and pick off the predicted time. Suppose you didn't want a prediction for mean frailty, but instead a prediction that is unconditional on the frailty. That is, I don't want a median time for the "average" farm, but instead a prediction that has the farm effect integrated out of it. In this case, you would use . predict median_t, time median unconditional As far as the other quartiles go, use the usual Weibull formulas in predicting for an average farm. If you want unconditional predictions, this gets a little more complicated. There are two possible solutions: (1) Work out the unconditional formulas analogous to what we did when we coded the unconditional median (email me privately if you are interested and I can provide the formulas). (2) Predict the survival function (unconditionally) and see if you can pick off a time when the survival function is at or near 0.25 or 0.75. Of course, if you do this be mindful of the covariate values for the observation you are picking off. If your data are not sufficiently "gridded" to give accurate survival-function based quartiles, you would have to resort to adding observations and predicting out-of-sample. --Bobby [email protected] * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: -linkplot- available on SSC** - Next by Date:
**st: Query: Nested-logit** - Previous by thread:
**st: Interpretation of shared frailty model** - Next by thread:
**st: Quantile regression bootstrap with weights** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |