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
Bug: Python Error in Stata Function Interface (sfi), Unicode-relatedBug in SFI? Running this Python code in Stata 16.1 Code: sysuse world-d, clear python: import sfi; …
Stationarity from effective federal funds rate (DFF) from FREDHello, First of all, I wish you a happy new year. I am using the effective federal funds rate in p…
Panel regression fixed effecs omittedDear all, I am currently conducting a panel regression in Stata with the following variables: Compa…
Smooth Curves in a Contour Plot?Hello! I've played around with the contour plot command and am wondering if there are ways to smooth…
Using loops to search string vars, then generate new indicator variablesI think this is a task that learning to write foreach loops will help me, but not sure how to start.…
Subscribe to:
Post Comments (Atom)
0 Response to Create a time-variant variable reflecting number of co-habitants
Post a Comment