Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72787

creating time-constant variable across individuals

$
0
0
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!

Viewing all articles
Browse latest Browse all 72787

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>