I am trying to use box and whisker plots to determine averages of "payment" for variables that I defined, here is one example:
*define my new variable
generate pyp=(cpt=="78800"|cpt=="78803"|cpt=="78830")
*I have a variable "payment" which is the total sum of payments for a given number of variable "patients". I tried creating a new variable "payment_per_patient" defined as payments/patients then I used
graph box payment_per_patient if pyp_planar==1, over (year)
*but the numbers calculated do not make any sense. I suspect that I am not calculating the number correctly because I need to define my numerator as "payment" for each cpt code ((cpt=="78800"|cpt=="78803"|cpt=="78830")) and then define my denominator as "patients" for each of those codes.
Is this correct or is there a faster way to do this? This method would be very time consuming.
Thanks for the help
*define my new variable
generate pyp=(cpt=="78800"|cpt=="78803"|cpt=="78830")
*I have a variable "payment" which is the total sum of payments for a given number of variable "patients". I tried creating a new variable "payment_per_patient" defined as payments/patients then I used
graph box payment_per_patient if pyp_planar==1, over (year)
*but the numbers calculated do not make any sense. I suspect that I am not calculating the number correctly because I need to define my numerator as "payment" for each cpt code ((cpt=="78800"|cpt=="78803"|cpt=="78830")) and then define my denominator as "patients" for each of those codes.
Is this correct or is there a faster way to do this? This method would be very time consuming.
Thanks for the help

Comment