Hello,
I am trying to save the probability distribution of a variable under certain conditions so that I can then assign a random value from that distribution to some individuals in my sample who have a missing value for the variable. More specifically, I need to use bins of four different variables where I match those with a missing value of a variable I have called age1b to those with a non-missing value of the variable according to their age, education level, sex and survey year and then assign them a random value of age1b from that distribution. I am not familiar with Mata at all, so I'm not sure of the best way to do this.
Any help is appreciated!
Related Posts with Saving probability distribution of variable under certain conditions and assigning random value from distribution
Keeping variables from a listHello everyone, I'd like to know if there's a way to keep in my dataset, the observations that are …
GMNL change distribution of random parameter to log-normalI am using the gmnl model in STATA and I am trying to change the distribution of one of the random p…
Error in Difference-in-Difference methodHi everyone, I have panel data Array When I run the DID estimator, Array I get the following message…
Multiple observations per id. How to filter observations if within a number of days of episodeHi! I'm working with a large data set that has multiple observations per id. Basically, there's one …
Keeping variables from a listHello everyone, I'd like to know if there's a way to keep in my dataset, the observations that are …
Subscribe to:
Post Comments (Atom)
0 Response to Saving probability distribution of variable under certain conditions and assigning random value from distribution
Post a Comment