Announcement

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

  • Censored quantile regression with MCMCCQREG

    Dear all,

    I am analysing merges and acquisition investments using a country level bilateral panel dataset. I would like to apply a quantile regression, using the approach proposed by Chernozhukov and Hong (2003) "An MCMC approach to classical estimation", Journal of Econometrics 115, pp. 293-346. So far so good, thanks to the mcmccqreg command by STATA. What I am interested in is the trend of the coefficients of my two explanatory variables of interest across different quantiles of my dependent variable.

    My typical regression takes the following form (I take the median as reference quantile in my example)

    Code:
        xi: mcmccqreg log_inv_resc_censored ln_cul_imp ln_cul_exp ln_dist colony comlang_ethno comrelig contig comleg_pretrans fta_wto i.origin_time i.dest_time, tau(.75) censorvar(min_uncensored_2)
    where my variable of interest are ln_cul_imp and ln_cul_exp. min_uncensored_2 is the censoring variable, defined as the minimum non censored value of investments' flow between two countries at time t. Following Head and Mayer (2014) "Gravity equations: Workhorse, toolkit, and cookbook." in the Handbook of international economics. Vol. 4. Elsevier, 2014. 131-195, the dependent variable (log_inv_resc_censored) is computed as the logarithm of the maximum between the censoring value and the actual value of investments.

    Code:
        
    * generate dependent variable
    gen min_uncensored_2 = .
    forvalues y = 1995(1)2011 {
            sum inv_rescaled if inv_rescaled > 0 & year == `y'
            replace min_uncensored_2 = r(min) if year == `y'
            scalar min_`y' = ln(r(min))
    }
    gen log_inv_censored = ln(max(tot_inv, min_uncensored))
    Nonetheless, I have a few question about this command output:
    1. I got this message at the beginning of the estimation: "Caution!!! Observations censored at tau-th percentile!\n. Interpret results with extreme caution... " . What does this imply?
    2. How should I interpret the final message returned once results are displayed: "Results are presented to conform with STATA conventions, but are summary statistics of draws, not coefficients estimates"? I guess that the outcomes should not be interpreted as coefficients. How could I do to get the coefficients? Or, alternatively, how could I safely interpret the outcomes?
    3. Finally, and related to point (2.), I would like to plot the coefficients estimates of two variables of interest at different quantiles of my dependent variables. Does any built in command exist? If it does not, any advice on how to do it?
    (I am aware that a stata log file would be appreciated instead of plain text, but I forgot to log on before running the regression and I am no longer able to recover it from my STATA output...and it would take hours to run again! Therefore, sorry for the improper posting, I will update this thread as soon as I will redo the computations!)

    Thanks in advance for any advice,

    Best

    Filippo

  • #2
    Filippo Santi

    Glad you are finding the command useful! In fact, it is a user-written command by myself. I describe the command and how it is implemented in detail in my Stata journal article. I'll try my best to answer your questions:

    1) In the process of writing the command, I noticed that there could be a problem if, say, you were trying to estimate a model with tau = .2 but .25 percent of the observations were censored. This is why the error message is being thrown. In these cases, I think you get the same estimate for all quantiles <.25. I'm not sure about this, but thought I would have the program at least alert the user as to what was going on. Question: do you get the error message for all quantiles or just really low (or high) ones?

    2) Basically, the estimates are presented as if they come from the usual analytical standard error computations, but this is not the case. What one does in an MCMC estimator is draws a sequence of values for a parameter, like a1, a2, a3, a4, a5, ..., an, and then takes the mean of this sequence as an estimate, and the standard deviation of this sequence as an estimate as the parameter's standard error. So, I am presenting estimation results as if they were obtained analytically, but they are really obtained by summarizing the sequence of draws. I think my article explains some of this as well.

    3) I do not have any built in command to do this, unfortunately, so you would have to do it manually. Sorry!

    I hope that helps and please let me know if you have further questions.

    Best,

    Matthew J. Baker




    Comment


    • #3
      Matthew J. Baker

      Thank you vary much for your reply. I confess I did not properly read your article with the due care, but I will fill this gap immediately. Concerning the draws summary output, I will interpret them with caution. However, can I still safely claim that "significant" coefficient implies a significant impact of my explanatory variable (provided no endogeneity/reverse causality _ and so on and so forth _ issues are not at work)?

      About the plotting, no problem, I will do it manually...my question was for time saving purposes!

      Finally, concerning the warning message, I will reply as soon as I will get the results for the upper quantiles and I will let you know.

      Thank you very much for your comments and reply, and thank you for this command. It is definitely well done!

      Best,

      Filippo Santi
      Last edited by Filippo Santi; 21 Apr 2018, 08:19.

      Comment


      • #4
        Dear Matthew J. Baker ,

        I finally got a few more results. Concerning the censoring warning message (to close with this post) it appears only for below-median quantiles. Indeed, below this quantile all observations have zero-valued dependent variable.

        Thank you again for your reply,

        best,

        Filippo Santi

        Comment


        • #5
          Filippo Santi --

          I just peeked in at the list and saw you had made a bit of progress. Is there anything else I can do to help out? If so, just let me know.

          Best,

          Matthew J. Baker

          Comment


          • #6
            Dear Matthew J. Baker,

            Forgive me for resuming this old thread, and for addressing you directly.

            I have been asked to provide a test to support my claim, that the coefficients I obtained via MCMCCQREG are different across quantiles. In absence of censoring, I might have used the -sqreg command to compare them. In that case, I could have used the sqreg built in features, or I could have build up a Wald like test to do so, as suggested in a previous thread (https://www.statalist.org/forums/for...es-by-manually), but I don't know how to do in case of censored quantile. Moreover,I am not much aware of the implications of using MCMC estimation routines and of the potential issues in trying to build up a wald like test.

            Do you have any suggestion/recommendation?

            Best,

            Filippo

            Comment

            Working...
            X