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
Related Posts with Generating a variable that is gives average score based on 'yes' responses on a bunch of variables
Kaplan Meyer CurveHello, I am working on a survival analysis paper and one of the reviewers has asked me to add censor…
Regression discontinuity, revising/improving code from version 8.2 for version 15.1I came across a clear introduction to regression discontinuity in chapter 16 of Khandker, Shahidur R…
Type mismatchI keep getting a 'type mismatch' error and I'm stumped. All feedback would be greatly appreciated! …
Need help on comparing variables accross t-testsI need help conducting t-tests with variables that have 2 things inside of them. For example, If I t…
merge when value of one variable in dataset 1 matches either value of two variables in dataset 2Hi, I'm trying to merge two datasets by phone number. In dataset 1, each observation only has one ph…
Subscribe to:
Post Comments (Atom)
0 Response to Generating a variable that is gives average score based on 'yes' responses on a bunch of variables
Post a Comment