Hi all,
I am working with a binary variable "CareHome" that defines whether a patient lives in a nursing home or not (1=yes 0=no). In order to create a dummy variable that contains the proportion of patients living in a nursing home I have used this Code:
However now if I tabulate the variable pc_CareHome it contains valuse >1 and I am wondering why because I supposed that pc_CareHome would now only contain values between 0 and 1 showing me the proportions?
Thanks in advance
I am working with a binary variable "CareHome" that defines whether a patient lives in a nursing home or not (1=yes 0=no). In order to create a dummy variable that contains the proportion of patients living in a nursing home I have used this Code:
Code:
by Hosptial_Code, sort: egen pc_CareHome=mean(100*CareHome)
Thanks in advance
Comment