I have several observations (individuals) with each belong to a household (so each has a household ID). That means there are cases where there are 3 or 4 observations sharing the same household ID meaning that they belong to the same household. I also have the variable ‘age’. Now I want to generate another variable which will say something like =1 ‘the individual belongs to a household with an individual below 5yrs) and =0 ‘the individual belongs to a household where there are no individuals below 5yrs’. What command should I use? Thanks.
Related Posts with stata command
Vertical lineDear, Do you know if you can signal by vertical line the variables _b_price_ultimo and _b_price_ulti…
Mediation "constrained" by indirect effctsHey everyone, I want to conduct a mediation effects in my research and my indirect effect say "const…
Minimum number of groups for conducting multilevel latent class analysisHi Statalisters, My question is as the title. I am working on a survey data that has around 9,000 o…
Coefplot for multiple regressionHello and good day, I estimate through a cross-sectional model and I did one by one estimation . I w…
Limit calculationIs there any way to code (calculate) limits ( of the kind f(x)=?? as x approaches 0) in Stata? Neede…
Subscribe to:
Post Comments (Atom)
0 Response to stata command
Post a Comment