Announcement

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

  • Convergence not achieved with quantile regression (qreg)

    I am using Stata/SE 12.1 for Mac. I have a sample of mother-birth pairs, including data from each month in the year before and after the birth (N ~= 150,000 mother-birth-month observations). The dependent variable is a month-level variable giving the percent change in family income from the pre-pregnancy period.

    I want to regress the dependent variable on 24 dummy variables indicating the distance (in months) from the birth month. Because the dependent variable has many extreme values, I want to use quantile regression to estimate the median percent change in family income associated with each month. Here’s my code:

    qreg pcg_faminc $monthdummies, wlsiter(100)

    When I run this code, I get the error message:

    convergence not achieved.
    VCE cannot be computed possibly due to a small sample size; try bsqreg
    r(498);

    Increasing the wlsiter option to 500 gives the same error. bsqreg gives the error "convergence not achieved"

    Any suggestions would be very helpful. Thank you!

  • #2
    Have you tried what Stata suggested (bsqreg)?

    You've dropped one of the indicator variables that you generated for month, right?

    Because you have the month (time) as a predictor already in the model, do you need to use the change in family income as the outcome variable?

    Have you considered logarithmic transformation of the income and using conventional regression techniques, for example, something like the following?
    Code:
    xtreg log_faminc i.month, i(mother_birth_pair) fe
    or
    Code:
    xtgee faminc i.month, i(mother_birth_pair) family(gaussian) link(log) corr(independent) robust

    Comment


    • #3
      Thank you for your reply!

      I did try bsqreg. I got the error message "convergence not achieved"

      I do drop one of the month indicator variables.

      I am using the percent change variable because I want to compare the magnitude of income declines around a birth across mother's education. I will try the logarithmic transformation of the DV and the code you provide.

      If possible, I would still like to run the quantile regression since I am trying to replicate a method from another paper. Any other ideas to get the quantile regression to converge?

      Thanks again!

      Comment


      • #4
        I would start with just

        qreg pcg_faminc , wlsiter(100)

        i.e. use qreg to compute the median. That is obviously overkill, but it allows you to see whether there is a problem in the dependent variable, by comparing the number of observations reported by qreg and the number of observations you think it should be, and see if there is something weird about the median.

        I would then inspect the month indicator (dummy) variables, by using the user written fre command (which you can install by typing in Stata ssc install fre):

        fre
        $monthdummies

        I would look at: are the indicator variables correctly coded (0 or 1), are there any months in which there is only 1 observation, what about missing values.
        Last edited by Maarten Buis; 30 Sep 2014, 01:59.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Thank you both for your help. I still can't get qreg to converge, but am happy with the log transformation of the dependent variable.

          Comment


          • #6
            I've used Mr. Buis approach, e.g., I used the centile command to compute Q1, Q2 and Q3 for a certain variable y and then attemped to do so using the qreg command with q(25), q(50) and q(75). In none o f the three cases I obtained a message other than "convergence not achieved" r(430); I'm trying to figure out what could be happenning particularly while other software packages can solve the LAD problems fastly and easily (for example the EViews). What I'm doing wrong?

            Comment


            • #7
              Dear Juan,

              There may be several problems here. Is your data continuous? If it is not -qreg- will struggle. Also, what are the sort of values of your objective function? If it is not in the range 100 to 1000, try rescaling the variable so that the objective function has values in this range. Finally, you may try to use the wls option.

              Good luck,

              Joao

              Comment

              Working...
              X