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
Test difference between estimated coefficientsHello, I am running a regression on two subsamples (s2=0 and s2=1). I would like to test whether th…
Table with quartilesI want to create a table showing basic characteristics with the quartiles of a dependent variable, I…
Adding Log-rank test p-value to the Kaplan Meier graphHello everyone, I am trying to add Log-rank test p-value to my Kaplan Meier graph, but I cannot fin…
Counting concurrent use of three or more types of medication within an administrative claims databaseDear Statalist, I am working to count a range of medication-related problems using an administrativ…
Number format: only display digits if non-intengerI let STATA display summary statistics for me using esttab, as follows: Code: sysuse auto, clear …
Subscribe to:
Post Comments (Atom)
0 Response to Adding the scores of imputed group variable
Post a Comment