Dear all,
I am working on creating a simulation code for panel data. I need to create a variable that is constant over time from a given distribution function (which is not a problem), then this variable needs to be constant for a given individual over time (also not a problem, just use A=l.A if year==2 e.g.). Now I also need this variable to be the same across a specified group of individuals, for example individuals 1 - 5 have variable A ==5 (for all years) and individuals 6 - 10 have variable A==6, where the exact value of A would depend on the distribution function.
What code would be useful for this problem?
Help would be greatly appreciated!
I am working on creating a simulation code for panel data. I need to create a variable that is constant over time from a given distribution function (which is not a problem), then this variable needs to be constant for a given individual over time (also not a problem, just use A=l.A if year==2 e.g.). Now I also need this variable to be the same across a specified group of individuals, for example individuals 1 - 5 have variable A ==5 (for all years) and individuals 6 - 10 have variable A==6, where the exact value of A would depend on the distribution function.
What code would be useful for this problem?
Help would be greatly appreciated!