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
How to fix when option is not allowed (r198)?Hello, I am currently using Stata/SE14.1 and I simply tried the following codes metan ln_HR ln_LCI …
Create new variable using coefficient from a variable containing time dummyHello everyone, I'm using Stata version 14.0. I'm actually trying to estimate the natural rate of un…
Weights not workingHi everyone, I've been trying to run a regression analysis with weights, but Stata keeps telling me…
Regress in fixed time periodI have a dataset from 2004-2022 and want to form a regression every rolling 6 months so jan 2004-jun…
converting modate format string to numericDear All, I have the data which is in the following format. The modate is in string format. The dat…
Subscribe to:
Post Comments (Atom)
0 Response to Create a time-variant variable reflecting number of co-habitants
Post a Comment