Dear All,

I am trying to calculate the ratio of caesarean section rate in public versus private facility and this is what I have done so far:

Code:
gen publiccaesar=.
replace publiccaesar=1 if birth_place==0 & caesar==1 & alive==1 & last_birth==1
replace publiccaesar=0 if birth_place==0 & caesar==0 & alive==1 & last_birth==1

gen privatecaesar=.
replace privatecaesar=1 if birth_place==1 & caesar==1 & alive==1 & last_birth==1
replace privatecaesar=0 if birth_place==1 & caesar==0 & alive==1 & last_birth==1

ratio myratio: publiccaesar/privatecaesar
However the following error message appeared:

Code:
. ratio myratio: publiccaesar/privatecaesar
no observations
r(2000);

end of do-file

r(2000);
Does anyone have any idea why this could occur? And how do we solve this issue?

Thank you.