Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

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

From |
Maarten Buis <maartenlbuis@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Beta coefficients for GLM models? |

Date |
Wed, 21 Nov 2012 11:14:29 +0100 |

On Tue, Nov 20, 2012 at 10:59 PM, Scott Holupka wrote: > I'm currently using GLM (Stata 12) to analyze some expenditure data and I > would like to compare the effects of different coefficients in the model. > If this were an OLS I would look at the beta coefficients, but I can't > figure how to compute a beta or beta-like coefficient for a GLM model. Beta coefficients standardize both the dependent/explained/left-hand-side/y variable and the independent/explanatory/right-hand-side/x-variables. This is a bit overkill if all you want is to compare coefficients in the same model. In that case it is enough that the scale of the independent variables you want to compare have a comparable scale. For continuous variables this is often done by standardizing it, i.e. subtract the mean and divide by the standard deviation. This assumes that a standard deviation change in one variable is comparable to a standard deviation in another variable, which is not always true. Moreover, this standardization is only necessary if the variables whose effect you want to compare have different units, e.g. if both are measured in some (the same) currency you should not standardize; standardizing would in that case only lead to a loss of interpretability without any gain. If you have a categorical variable than that becomes a bit more of a challenge. In that case you can use sheaf coefficients (-ssc desc sheafcoef- and <http://www.maartenbuis.nl/wp/prop.html>) *-------------------------- begin example ------------------------ // data preparation sysuse nlsw88, clear gen byte lower = inlist(occupation, 9, 10, 11, 12, 13) /// if occupation < . gen byte middle = inlist(occupation, 3, 4, 5, 6, 7, 8) /// if occupation < . // standardize grade and ttl_exp sum grade if !missing(occupation,married, never_married, /// grade, ttl_exp, wage) gen z_grade = ( grade - r(mean) ) / r(sd) sum ttl_exp if !missing(occupation,married, never_married, /// grade, ttl_exp, wage) gen z_ttl_exp = ( ttl_exp - r(mean) ) / r(sd) // estimate model glm wage lower middle married never_married z_grade z_ttl_exp, /// link(log) // compute sheaf coefficients for class and marital status sheafcoef, latent(class: lower middle; /// marital: married never_married) /// post eform // class, and z_ttl_exp seem to have similar effects // but we can test whether the effects are the same test class_e = z_ttl_exp_e *--------------------------- end example ------------------------- Hope this helps, Maarten --------------------------------- Maarten L. Buis WZB Reichpietschufer 50 10785 Berlin Germany http://www.maartenbuis.nl --------------------------------- * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**Re: st: sem with mean structures, latent interactions** - Next by Date:
**st: exploratory factor analysis with dichotomous and continuous data** - Previous by thread:
**RE: st: Beta coefficients for GLM models?** - Next by thread:
**st: Specify omitted group in regression** - Index(es):