Statalist


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

st: using srvyset with survival analysis


From   Sharon Minnick <slminnick@ucdavis.edu>
To   statalist <" statalist"@hsphsun2.harvard.edu>
Subject   st: using srvyset with survival analysis
Date   Tue, 17 Jul 2007 12:05:21 -0700

Hello,

In Stata10, I have been attempting to analyze my survival data with cox regression while accounting for the sampling design and I always get this error:

the stset ID variable is not nested within the final stage sampling unit

Originally I thought this might be because some of our subjects moved during the study and so they change strata and cluster from where they were originally sampled. But I just tried creating a temporary variable that holds the strata constant for each subject and dropped the cluster variables and I still get the same error.

So my srvyset code is:

svyset _n, strata(staticzone) vce(linearized) singleunit(missing)

and the cox regression code is:

svy: stcox agegrp male

If I change the svyset code to use my subject ID variable instead of _n, then I get this error:

no observations;
stset and subpop() option identify disjoint subsets of the data

which I don't understand since I am not using a subpop option.

Any help would be appreciated,

thanks,

Sharon Minnick
UC Davis
*
* 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/




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