Greetings all,
I'm trying to construct percentiles using the pctile command with Stata.
This is the code that works, with no weights:
pctile pct = (robot_pred), nq(722) genp(percent)
This is the code that does not work. It includes my attempt to introduce population weights:
pctile pct = (robot_pred) [ipums_pop_1990=weight], nq(722) genp(percent)
The error that is returned is:
weights not allowed
r(101);
Does anyone know what may be causing this error? I'm happy to indulge work-arounds, but am positively befuddled as to why pctile is generating everything fine, but not allowing weights to be introduced. My understanding is that pctile allows weights when used in this way.
For context: I'm trying to population-weight what is basically community-level data. The underlying unit of observation is the community (of which there are 722 in this dataset). And the weight would just be each community's population in 1990. All on Stata 17.
Related Posts with weight issue with pctile
Logistic and predict OR for a specific value of the IVHi listers, I am looking to see whether emotional well-being scores (continuous) are predictors of …
Optimal Matching vs Propensity Score MatchingHello Everyone! I am new to STATA and I am trying to run sample matching. Recently a friend of mine …
Tabout and missing dataDear all, I often use tabout to describe my data but I am now struggling with the presentation of mi…
create an indicatorHello Guys, I need to create a dummy variable which is equal to one if an individual is hit by a cr…
rpaxioms: new module on SSC for testing revealed preference axiomsWith thanks to Kit Baum, the module rpaxioms containing the three commands checkax, aei and powerps,…
Subscribe to:
Post Comments (Atom)
0 Response to weight issue with pctile
Post a Comment