I am trying to compare two Stata variables "yBestPred" and "compliance" and try to come up with the accuracy score.
To compute the accuracy score, I need to divide the number of observations that shares the same value (either 0 or 1) for both yBestPred and compliance by the total number of observation.
Let's say that my variables look something like below:
Code:
>> list yBestPred 1. 1 2. 1 3. 1 4. 0 5. 1 >> list compliance 1. 1 2. 0 3. 1 4. 1 5. 1
Thanks,
0 Response to Computing accuracy score on Stata
Post a Comment