Hey all,
Newish to STATA - longtime SAS user - sorry for the basic question. I have a dataset of cases and controls. Trying to split them into two datasets based on the value of the variable casecontrol. It would be something like this in SAS:
data cases controls; set have;
if casecontrol=1 then output cases;
if casecontrol=2 then output controls;
run;
I guess I am confused since we dont have to specify datasets in STATA - so it seems like if I keep cases - then I lose the controls?
Am I missing something?
Thanks!
nick
Related Posts with Splitting a dataset into multiple datasets
Create a control group matching categorical and continuous variablesDear all, I am analyzing whether a CEO turnover (c. 600 events) has a long-term impact on operating…
Interpretation of the interaction terms of two categorical variables in Non Linear modelsHi, I have been searching online but cant find much. I need help in understanding the interpretatio…
Running a regression and variables are omitted due to collinearity but i don't know whyHi i was wondering if anyone could help me I am running the following tobit regression: Code: to…
Trivial question: what does f. stand for?Sorry if this is obvious, but I cannot find an answer As an example gen treatment=0 if (expectatio…
How to Esttab SHOWING THE FIRST STAGE ONLY (Without Showing the Second Stage) with ivreg2?Hi! My question is how to use Esttab to show the first stage WITHOUT Showing the Second Stage with i…
Subscribe to:
Post Comments (Atom)
0 Response to Splitting a dataset into multiple datasets
Post a Comment