Hi,
I have a a dataset such as below
input str3(A B C) str3(X Y Z)
Yes No No Yes No No
No No No Yes Yes Yes
No Yes No Yes No No
Yes No Yes No Yes No
Yes Yes No No No No
Yes No No No Yes Yes
Yes No No No
No No No No No No No
No No No No No No No
Yes No Yes No Yes No
Yes No No No No Yes
end;
i would like to count the number of "Yes" out of (A B C) columns in to count_ABC columns, which should be contain value 1 for the ist case, for 2nd case the value should be 0. Similarly count_XYZ should be 1 for the ist case and 3 for the second case.
Please guide how to go about solve this handle this with handling missing datas?
Related Posts with count categorical values by using conditions row wise
plotting distribution of variable with concentration at 0Hi everyone, I am trying to make a distribution plot for my variable expenditure that has a really h…
Combining results from different collections and export results in excel sheetDear STATA 17 users, I am new on STATA 17 and I want to use new feature for customizable tables to e…
Changing probability cutoff in binary logistic regressionHello everyone? I am running binary logistic regression. After running it, I used the lstat command…
Need help calculating an "isomorphism index"Dear Stata users, I am currently working on a minor research paper about isomorphic behavior within…
Removing third bracket from*a column which is numericHello everyone, How I can remove the third bracket from a column ( which is numeric and gives count…
Subscribe to:
Post Comments (Atom)
0 Response to count categorical values by using conditions row wise
Post a Comment