I don't know if Stata can do this but I use the tabulate
command a lot in order to find frequencies. For instance, I have a success variable which takes on values 0 to 1 and I would like to know the success rate for a certain group of observations ie tab success if group==1
. I was wondering if I can do sort of the inverse of this operation. That is, I would like to know if I can find a value of "group" for which the frequency is greater than or equal to 15% for example.
Is there a command that does this?
Thanks
As an example
sysuse auto
gen success=mpg<29
Now I want to find the value of price such that the frequency of the success variable is greater than 75% for example.
if
can interpret using known variables and/or constants. So, you need to be able to do that. Usually some data manipulations would be required to get to that point. Depending on details, there may be partial exceptions e.g. check outgroups
from SSC. – Nick Coxgroups
from SSC" did you not understand? – Nick Coxhelp ssc
. – Nick Cox