On Wed, Jul 13, 2011 at 6:13 AM, Sze Liu <sze...@hsph.harvard.edu> wrote: > Hello all, > I am using AddHealth data to fit a cure, aka split population model using > nltm. I am not sure how to account for the complex survey > design - does anyone have any suggestions? Any help would be greatly > appreciated!
This will be not be easy, because the nltm functions don't accept any sort of weights. Two possible approaches: 1/ modify nltm to accept weights for the likelihood contributions. The point estimates from nltm should then be correct, though the standard errors will be wrong. You can now use as.svrepdesign() in the survey package to create replicate weights (jackknife or bootstrap, essentially), and then use withReplicates() to apply the replicate weights to nltm and compute standard errors. 2/ use svymle() in the survey package to do the estimation. This needs the loglikelihood and score functions for a single observation, which you may be able to extract from the nltm code. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland ______________________________________________ R-help@r-project.org 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.