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
calculate annualized std.dev of weekly stock returns (volatility)Hi Statalisters, I need some guidance about the calculation of volatility. I have data of weekly cl…
calculate annualized std.dev of weekly stock returns (volatility)Hi Statalisters, I need some guidance about the calculation of volatility. I have data of weekly cl…
Tracking changes in dataset with conditionDear reader, I tracked executives across firms and retained those individual executives who were em…
Linear regression - error termDear all, I am trying to replicate the following variable as control for my dataset: Array After r…
Significance stars at 1%, 5% and 10%Hello, The STATA command "estimates table" produces output for all IVs with significance indicators …
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