Dear StataList:
I am wishing to estimate age-adjusted median concentrations and 95% CIs of a laboratory measure across categories of participant characteristics (to use in a descriptive table). I have read that quantile regression estimates medians, but I cannot figure out the post-estimation commands to obtain the age-adjusted median concentrations and accompanying 95% CIs by categories of another variable.
For example, I would like to estimate the age-adjusted median concentration of a laboratory measure across categories of education. I started with the coding:
qreg [lab measure] [age] [age^2] [categorical education] if pop1==1 [pw=wt], vce(robust) /* I am using data with sample weights */
predict median if e(sample), xb
bysort education: centile median if pop1==1
The values I obtained for the age-adjusted median lab measure and 95% CI across categories of education are vastly different than the crude medians. I suspect my post-estimation commands are incorrect. I also wonder if education should be included in the quantile regression model, or just age and age^2.
I am grateful for any coding advice you can provide.
Sincerely,
Kristen Upson
Related Posts with Estimating adjusted medians and 95% CI using quantile regression
Help with calculations based on conditions and groupsHello all, I have a dataset that looks something like this (but with over 70k observations and over…
Comparing means across groups using svy commands and esttabDear STATA users I hope someone can help me. I am having a really hard time making a - what I thoug…
MarginsplotHello, I have a quick question on the command "marginsplot" I have the following codes: regress y…
merging Compustat Fundamentals annual data and daily security dataDear Statalist members, For my thesis, I need to merge daily security data to Fundamentals annual d…
How to generate a new variable as a non-algebraic combination of valuesHi, I have the following data and v6 has years and v7 has months. I want to overwrite v6 whose value…
Subscribe to:
Post Comments (Atom)
0 Response to Estimating adjusted medians and 95% CI using quantile regression
Post a Comment