Hi all,
Stata 14.1 Mac OSX
Can I please get some help with interpreting the OR, when the dependent variable is a proportion and the model has been generated using a generalized linear model with a logit link and the binomial family.
Please consider the example and output below.
Is the following statement correct?
“In these caryards, a unit increase in mean displacement at the yard is associated with a 2.25% decrease in proportion of foreign cars at the yard”
Thanks
Mark
Stata 14.1 Mac OSX
Can I please get some help with interpreting the OR, when the dependent variable is a proportion and the model has been generated using a generalized linear model with a logit link and the binomial family.
Please consider the example and output below.
Is the following statement correct?
“In these caryards, a unit increase in mean displacement at the yard is associated with a 2.25% decrease in proportion of foreign cars at the yard”
Thanks
Mark
Code:
*Generate fake data with the proportion of foreign cars at 10 caryards, *and the mean displacement and price at each caryard sysuse auto, clear encode make, gen(Make) egen mpg_cat=cut(mpg), group(10) bys mpg_cat foreign: gen n=_N replace n=. if foreign ==0 collapse (count) Make (max) n (mean) displacement price length weight, by(mpg_cat) gen prop_for=n/Make replace prop=0 if prop==. drop Make n gen caryard=_n *Question: generate a model that can predict the proportion of foreign cars at a caryard *as a function of the mean displacement and price at the yard glm prop_for displacement price, link(logit) family(binomial) robust nolog eform /*Output ------------------------------------------------------------------------------ | Robust prop_for | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- displacement | .9751318 .0061639 -3.98 0.000 .9631253 .987288 price | 1.000442 .0001958 2.26 0.024 1.000058 1.000826 _cons | 2.802695 1.315976 2.19 0.028 1.116614 7.034748 ------------------------------------------------------------------------------ */ list prop_for displacement price +-------------------------------+ | prop_for displa~t price | |-------------------------------| 1. | 0 400 12,546 | 2. | .0833333 303.75 9,195.8 | 3. | .5 194.25 8,194 | 4. | .2222222 220.556 5,068.2 | 5. | 0 233.375 4,561.5 | |-------------------------------| 6. | .25 202.875 6,828.5 | 7. | .375 136.875 5,124.9 | 8. | .25 143 4,278.3 | 9. | .5454546 124.182 5,448.4 | 10. | .625 108.75 4,154.4 | +-------------------------------+
Comment