No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with betamix

    I am having a problem with betamix. Our dependent variable has a distribution whose characteristics are similar to the ones described in Pereira, Botter and Sandoval (2013) ( with a fixed threshold (c): values in the range (0, 0.333) have been replaced by zero, so an inflation in zero occurs. Then we observe values in the interval [0.333,1], with a distribution skewed to the right.
    We need to estimate:
    1. the discrete change in the probability of the dependent variable acquiring a value of zero (and its significance), given the values of a dummy variable (DUM). We attempted to use the mchange command, but it is invalid for betamix. The command does provide the odds ratio, but this is not the result we need.
    2. The difference in the mean value of the beta mixture part of the model strictly (without taking into account the zeros) conditional on DUM, and its significance. We attempted to calculate margins, but the mean we obtain takes into account the zeros in the lower bound, so it is not the information we need.
    3. The difference in the predicted value of the dependent variable as a whole, conditional on DUM. We are using the command “margin r.DUM” and we obtain the desired results and corresponding significance.
    In our estimation, we include DUM as follows (where a=0.333):
    betamix depvar, muvar(i.DUM …covariates…) pmvar(i.DUM …covariates…) lbound(0) ubound(1) trun(bottom) tbound(`a') pmass(0 0 1) vce(cluster var)
    Can anyone please suggest some alternative command we can use to extract results (1) and (2) from the estimated model?

  • #2
    We also consulted directly with Laura Gray and Monica Hernandez, authors of the betamix command and of the article “A command for fitting mixture regression models for bounded dependent variables using the beta distribution” (

    They were kind enough to respond the following:

    I'm afraid the command was written to give the marginal overall effect only. All the quantities that you mention are computed within the predict command as the overall prediction is made up of those but margins only returns the overall effect. You could write your own procedure to calculate the bits that you are interested in (it should be straightforward from the predict ado file to pick those quantities) and then compute their margins. Or you might be able to use the expression() option in margins directly depending on what you want to get.
    This might be something that we could implement in a future update of the command but we don't have one planned in the near future I'm afraid...


    • #3
      Thanks for posting #2, which could help others too.