Hello experts,
I have been facing a challenge in producing an output that is based on average scores based on a particular category of a list of variables that explain one domain. For example,
there are n1, n2, and n3 domains each is comes with a particular list of variables and each variable in n1, n2, n3 domains is with three categories: 1=Yes, 0=No, and 99= Don't know.
n1
variable n1_1: 'var label':
No --> 20%
Yes --> 60%
Dont know --> 20%
variable n1_2: 'var lable': No --> 10%
Yes --> 70%
Dont know --> 20%
.
.
.
______
n2
variable n2_1: 'var label': No --> 20%
Yes --> 60%
Dont know --> 20%
variable n2_2: 'var lable': No --> 10%
Yes --> 70%
Dont know --> 20%
.
.
.
The required variable or output is an average percentage based on all variables of n1, n2, and n3 (separately) and the result should be based only on 'Yes' category responses.
How is this possible in Stata?
Many thanks in advance!
Nadeem
0 Response to Generating a variable that is gives average score based on 'yes' responses on a bunch of variables
Post a Comment