
Updates to survey and correlated data were introduced in Stata 10.
|
Order |
Stata’s svy: prefix now works with
Twenty-five other commands also now support estimation with survey data.
You just declare the survey design for your data by using svyset, and then declare your data to be survival-time data by using stset. Here’s an example:
. use http://www.stata-press.com/data/r10/nhefs . svyset psu2 [pw = swgt2], strata(strata2) . stset age_lung_cancer if age_lung_cancer < . [pw = swgt2], fail(lung_cancer) . svy: stcox former_smoker smoker male urban1 rural
We could just as easily have fitted a parametric survival regression model simply by replacing svy:stcox with svy:streg.
|
|