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

st: using srvyset with survival analysis

From   Sharon Minnick <>
To   statalist <" statalist">
Subject   st: using srvyset with survival analysis
Date   Tue, 17 Jul 2007 12:05:21 -0700


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,


Sharon Minnick
UC Davis
* For searches and help try:

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