Hello Statalist,
I have a multiply imputed dataset that looks like this
Country A B C _mi_m
1 2 2 1 0
1 2 2 1 0
1 2 2 1 0
3 5 3 5 0
3 5 3 5 0
3 5 3 5 0
1 8 8 8 1
1 8 8 8 1
1 8 8 8 1
3 4 4 4 1
3 4 4 4 1
3 4 4 4 1
(note that the real dataset has more per Country observations and number of imputations. What is given above is just to show the format)
I'd like to generate a new variable X by adding the value of C in country1, country3, and etc together. According to the example above, I basically would like to have X=1+5 for the dataset _mi_m=0 and X=1+1 for the dataset _mi_m=1. Please how can I achieve this?
I use Stata 16.0
Best
Ikenna Egwu
Related Posts with Adding the scores of imputed group variable
Contents of c(seed) in Stata 5.1I have recently upgraded from Stata 13.1 to Stata 15.1, and I am noticing a difference when I am doi…
Estimating Incidence Rate using poisson regressionHi All, Up to now I have benefitted a lot from this forum. One question I can’t get my head around …
Help with creating a dummy variable that depends on the last integer of a dateHey y'all. I've been stuck on creating a dummy variable called summer that's 1 when the integer end…
Direction of Bias in OLS when using Instrumental VariablesHi all, Just a general question: If when using an instrumental variable it increases the size of t…
local directory not workingHello all, I created a local directory and when I call the dataset (straight after defining the loca…
Subscribe to:
Post Comments (Atom)
0 Response to Adding the scores of imputed group variable
Post a Comment