Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: data structure for case control


From   Adam Olszewski <[email protected]>
To   [email protected]
Subject   Re: st: data structure for case control
Date   Mon, 10 Dec 2012 16:38:42 -0500

Hi Paul,
The easy way would be to have one row per observation/patient and each
variable as one column. There would be one column AGE and one column
CASECONTROL, which you can assign 1 for cases and 0 for controls. This
way you can do "standard epidemology table" commands such as -cc- or
survival analysis with single-line commands using your "casecontrol"
variable as an indicator of the arm.
Good luck,
Adam Olszewski


On Mon, Dec 10, 2012 at 2:59 PM, Sacamano, Paul L. <[email protected]> wrote:
> Hi,
>
> I am very new to Stata, very much a beginner.
>
> I have a case-control study and am not sure how to setup the structure of the data file.
>
> Using the variable age as an example, would I have:
> 1) a variable for CASE_AGE and CONTROL_AGE, or
> 2) have just one AGE variable, and include a CASE variable and a CONTROL variable?
>
> Really appreciate any help you might have.
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index