Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Help with predicting medians using quantile regression


From   I M <[email protected]>
To   [email protected]
Subject   st: Help with predicting medians using quantile regression
Date   Wed, 14 Jan 2009 10:29:52 -0800

Hello,



Thank you in advance.

I have run some analyses on my data using quantile 
regression (essentially, quite similar to linear regression, except that 
it uses least absolute values to calculate the medians rather than means.)



Suppose I have a categorical variable in my models (e.g. female versus 
male), and in the regression models, the coefficients are not 
significant (i.e. Female gender is not significantly associated with 
worse outcomes compared to males, p-value is greater than 0.05).



Now, I then ran the predict command to give me the adjusted values for 
this regression model. When I determine the 95% confidence intervals of 
the median for these predicted values, I find that the 95% confidence 
intervals do not overlap.



First off, am I correct to assume that the 95% confidence intervals 
should overlap if the predicted medians are not significantly different? 
Or can a non-significant variable have 95% confidence intervals that 
don't overlap (i.e. even though gender was not significant, the 95% confidence intervals can still NOT overlap)?


If I am doing things wrong completely, then please correct me!



---------------



What I did:

qreg [outcome variable] [predictor 1, e.g. female versus male] 
[predictor2] [predictor3]       // this was my quantile regression model 
including my covariates

predict, xb           // this is the linear prediction command that gave me my 
adjusted values for the outcome variable

by [predictor1], sort: centile xb           // this gave the median and 95% CI for 
my adjusted values for the outcome variable, sorted by predictor 1 (e.g. 
by female versus male)



Interpretation:

the qreg command gave me the preregression model and coefficients. 
Assume that predictor1 (e.g. female versus male) was not significant.

the predict command gives me the adjusted medians.



Is this the correct way to obtain adjusted values according to my 
regression model, and the correct way to obtain 95% CI?



Thank you immensely!

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index