The variables are biological_timeA, biological_timeB, biological_timeC, adopted_timeA, adopted_timeB, adopted_timeC, step_timeA, step_timeB, and step_timeC. Use a loop to generate a new indicator variable for each time point that takes the value of 1 if the participant had any children living with them and 0 otherwise.
How do I go about this?
Related Posts with Stucked with generating a loop of dummy variables using an indicator variable
Multilevel model with olog?I usally use the command: mixed dep_var || country_var: Problem is that my dependent variable is o…
Replicating Excel Intercept/SlopeI have four variables, y1-y4 that I would like to regress on four fixed x's, x1-x4. (I have taken th…
Creating space between bar chartsHi, I am using Stata 17 and need help in bar charts. Below is an example of my dataset: Code: * E…
how to calculate pseudo-R2 using imputed data in a multinomial logistic regressionDear all, I would like to calculate the pseudo-R2 for my multinomial logistic regression in multipl…
parsing a variable based on digitsDear All, I try to create a new variable (let's say caseid_copy) based on the original caseid. Howe…
Subscribe to:
Post Comments (Atom)
0 Response to Stucked with generating a loop of dummy variables using an indicator variable
Post a Comment