Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: case-cohort data structures


From   Enzo Coviello <[email protected]>
To   [email protected]
Subject   Re: st: case-cohort data structures
Date   Fri, 05 Jul 2002 20:26:34 +0200

At 12.24 05/07/2002 -0400, you wrote:
Hi, we've been using the stcascoh and stselpre commands to turn a cohort
study dataset into a dataset designed for case-cohort analysis. Wonderful
commands these.
However, we don't want Stata to select the random sample from the cohort at
baseline, we've already done that.  Rather, we wish to feed the stcascoh
command the subcohort members and nonsubcohort cases, or an indicator
variable stating which cohort members should be in the subcohort.
Is there an extension to the stcascoh command that this that would force the
macro to keep our selection,
Unfortunately not.


or have we missed finding a different command
to accomplish this?

You could try in this way:
1) Divide your dataset in two files: the first one for subcohort members,
the second one for non subcohort cases.
2) appropriately stset new files.
3) feed the stcascoh command the subcohort file setting alpha just below 1 (i.e. .999)
and save it. Do some assert to verify that _subco _wSelpre _wBarlow are coded as you expect.
4) feed the stcascoh command the non-subcohort case file setting alpha = 0
and save it. Do some assert to verify that _subco _wSelpre _wBarlow are coded as you expect.
5) append two files.

I am not sure that this works (be careful), but it is the best I can do now.
Ciao

Enzo







Enzo Coviello
Unit´┐Ż di Epidemiologia ASL Ba/1
via Fornaci 201, 70031 ANDRIA (Ba) - Italy
tel +39 0883 299744-8 fax +39 0883 299417
tel home +39 0883 695055


*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index