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

st: case-cohort study

From   Enzo Coviello <[email protected]>
To   [email protected]
Subject   st: case-cohort study
Date   Wed, 23 Apr 2003 16:36:18 +0200

Dear Stata Users,

let me add a hint to previous Veit's posting:

If you have a dataset that already encompasses all cases and a sub-cohort of your total population than you "translate" the SAS program (relevant extract from the above webpage below) into Stata.

Some User pointed me this problem in using stcascoh: We already have a sample of original cohort and all cases. So how we can use stcascoh to prepare dataset for further analysis without sampling from cohort?

There is a trick.

We must have two files: a subcohort data file and a distinct data file for non-subcohort cases.

1) Let we start using subcohort data
use subcohort.dta
stset timevar, f(failvar) ecc. -> stset data before using stcascoh
stcascoh, a(.9999) ---> All members of subcohort are sampled and processed by stacascoh
save mycohort

2) Then use non-subcohort data
use casefile.dta,clear
stset timevar, f(failvar) ecc. -> stset data as before in subcohort.dta
stcascoh, a(0) ---> All cases are included and processed as non subcohort cases by stacascoh

3) append two files
append using mycohort

That's all.

So Stata Users have not the trouble to "translate" a SAS program.
They can simply use stcascoh with fewest further commands to reach all that they need.


Enzo Coviello, MD
Az. USL BA/1
via Barbera 27 - 70055 MINERVINO MURGE (Ba)
tel +39 0883 691053
fax +39 0883 691053
tel (home) +39 0883 695055

* For searches and help try:

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