I'd like to make an assertion about whether individuals in my dataset exceed legal standards for commitment, which is largely determined by estimated risk of recidivism. I have estimated a logit model predicting recidivism. Here is sample code written trying to determine what percentage of individuals had predicted recidivism of at least 75% with 75% confidence:
.logit sexrecS [INDEPENDENT VARIABLES]
.predict sr1
.predict stdsr1, stdp
.gen byte sr1C1R1=0
.replace sr1C1R1=1 if 1/(1 + exp(ln((1-sr1)/sr1) - 0.67448975*stdsr1)) > .75
.sum sr1C1R1 if sr1!=. & sexrecS!=.
I later replace 0.67448975 with 1.281551566 to reflect a higher legal standard of proof, but the code generates more, not fewer, hits, so I know I've done something wrong.