Hello everyone,
I am working with cohort data from a DSS. I have time-variant variants such as household or education (people can change were they live or their educational status with time). The database is structued in a way that I have several lines for each individual, with different entry and exit dates.
I want to create a variable capturing the "number of co-habitants" as a time-variant variable. This is not simple, as each individual in each household have different entry and exit dates. I want to caputure the number of co-habitants for each individuals in a time changing manner. Which code would you use?
Attached a simplified example of how the data could look like for one household:
Thank you very much in advance!!
Related Posts with Create a time-variant variable reflecting number of co-habitants
Keep the duplicate observation based on the highest value of a variableDear Statalist, I recently combined multiple files (filename_v1, filename_v2, etc.) into a single d…
need equal spaces for unequal time points in x-axis of graphI'm trying to create a line graph showing trends in religiosity across five waves of survey data (2,…
Creating age-range variableHello! I would like to create a new age-range variable, which will be a breakdown of already existin…
random number generationusing stata 13 I have set a seed value and using gen random=runiform() generated random numbers. Whe…
Displaying symbols in value labelsHi, is there a way to display math symbols like "greater than or equal to" as value labels and have …
Subscribe to:
Post Comments (Atom)
0 Response to Create a time-variant variable reflecting number of co-habitants
Post a Comment