Hello;
I am trying to merge some variables to create a new variable.
To expand, I am trying to create a dummy variable about child care, where 0=non-regulated childcare and 1=regulated child care. The problem is that one variable lists the child care used, and others determine whether that child care is regulated or not.
How do I create a variable that uses values from the three variables I am looking at? See photos for example.
(nonrelativecare is related to value 1, 2 & 6 for variable ACRCD01 and relativecare is related to value 3,4,5 for ACRCD01)
Related Posts with Creating new variable from other variables
Operations over lagsHello, I need to do some operations over all the lags up to the current value, but the loop I wrote…
Asdoc "conformability error"Dear Statalist, I am getting an error message when running the asdoc command. The first code works …
Writing a LoopDear Statalist Users, I have multiple txt files and I want to convert them into stata files so that…
Best command for cross-classified modelsI'd like to fit a model with student and teacher random effects. The ID variables for students and t…
mixed vs. xtreg, reHere are four ways to estimate the same model (I think): Code: xtreg absent ib(2).classtype ib("k"…
Subscribe to:
Post Comments (Atom)
0 Response to Creating new variable from other variables
Post a Comment