Greetings,
I have the code below and I want to know how I can add the sample weight variable (I only have fweight in my dataset) to this code?
egen pc_immig = mean(100 * inlist(immig, 1, 2)), by(prov)
egen tag = tag(prov)
twoway bar pc_immig prov if tag & inlist(prov, 10, 11, 12, 13) || scatter pc_immig prov if tag & inlist(prov, 10, 11, 12, 13), mlabel(pc_immig) msym(none) mlabpos(12) ||, xla(10/13, valuelabel) ytitle(% of immigrants)
I have the code below and I want to know how I can add the sample weight variable (I only have fweight in my dataset) to this code?
egen pc_immig = mean(100 * inlist(immig, 1, 2)), by(prov)
egen tag = tag(prov)
twoway bar pc_immig prov if tag & inlist(prov, 10, 11, 12, 13) || scatter pc_immig prov if tag & inlist(prov, 10, 11, 12, 13), mlabel(pc_immig) msym(none) mlabpos(12) ||, xla(10/13, valuelabel) ytitle(% of immigrants)
Comment