I need to get the 75th percentile for weighted prices for 560 zip codes. Is there a workaround for this code that will allow me to do this?
This is what i can do:
[CODE
_pctile rate_tod_hr if mps_typeofcare == 1 [pweight = finalcapacity], p(75)
gen r1 = (r(r1)) // create a variable for 75th percentile weighted price
rename r1 W75pct_smfamH // rename this variable - this is the 75th perentile weighted price for small family provider hourly child care[/CODE]
[/code]
and this is what i want to do but _pctile may not be combined with by :
[CODE
_pctile rate_tod_hr if mps_typeofcare == 1 [pweight = finalcapacity], p(75)
gen r1 = (r(r1)) // create a variable for 75th percentile weighted price
rename r1 W75pct_smfamH // rename this variable - this is the 75th perentile weighted price for small family provider hourly child care
[/CODE]
here is a short sample of my data:
This is what i can do:
[CODE
_pctile rate_tod_hr if mps_typeofcare == 1 [pweight = finalcapacity], p(75)
gen r1 = (r(r1)) // create a variable for 75th percentile weighted price
rename r1 W75pct_smfamH // rename this variable - this is the 75th perentile weighted price for small family provider hourly child care[/CODE]
[/code]
and this is what i want to do but _pctile may not be combined with by :
[CODE
_pctile rate_tod_hr if mps_typeofcare == 1 [pweight = finalcapacity], p(75)
gen r1 = (r(r1)) // create a variable for 75th percentile weighted price
rename r1 W75pct_smfamH // rename this variable - this is the 75th perentile weighted price for small family provider hourly child care
[/CODE]
here is a short sample of my data:
|
Comment