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
Add text to figure?Hi everyone: I'm trying to add a couple of text labels to my figure, which shows two normal distribu…
How to keep quotation marks in syntax when giving a option two string argumentsHello, I am making a lot of graphs, and to keep things neater I would like to make a program. I am u…
Superimpose graph on eclplotDear Statalisters, I am using the user-written command eclplot to plot the estimates (and CI) of s…
Any idea about courses?Hi everyone, Does anyone have an idea about nice PhD level course in advanced STATA or basic R? ver…
Interpretation the footer of xtdpdsys command in GMM regressionHi all Statalists, I have used xtdpdsys command to run my model and receive this below result. Can a…
Subscribe to:
Post Comments (Atom)
0 Response to stata command
Post a Comment