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
Factor variables may not contain noninteger values (r452)Dear all, I have a longitudinal panel dataset and I am trying to add individual fixed effects to my…
Delete Observations that have no partners in panel dataHello.. i am new in here i got some problem in using STATA i am trying to make panel data but not…
Confusion About Reduced-Form EstimationI'm using Stata 14 for Mac and I'm exploring a data set. It was going well but I've hit a wall. The…
variable X not found in list of covariatesI have already read a lot of topic about this issue, but nothing has worked. I have my database wit…
Marginsplot not workingI would like to display a plot with the average marginal effect of nb_ygsibs5 with 95% CIs. This is…
Subscribe to:
Post Comments (Atom)
0 Response to stata command
Post a Comment