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
Three-way InteractionsI am working with following panel data linear regression model: y = f(x,y,z) + other control variabl…
Tabulating the number of observations of differences between level of education within couplesHi Statalist. I want to obtain the number of observations for a couple where the level of education…
replacing missing values with a specific year observationHello everyone, I need some help in composing a code for replacing missing values with the value of …
Generating a financial year variable using nested loop Hi, My dataset has both 'year' and 'month' information for some variables. I want to generate a 'fi…
Add same extension to existing variable labelsI'm not sure how to phrase this question but I want to use all the existing variable labels but add …
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