Announcement

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

  • CMP: Restricting and Adding Correlations

    I am estimating a recursive triangular system with CMP with four equations, reflecting two Tobit Type-II models. In my current specification, the model estimates all possible error term correlations.
    Code:
     
     cmp (Y3 = X3 || user_id:) (Y1 = X1 || user_id:) (Y4 = X4 Y3 || user_id:) (Y2 = X2 Y3 || user_id:), indicators(Y2 $cmp_probit Y4 $cmp_probit) quietly
    1. How can I restrict the error term correlations, such that it only estimates the error term correlation within each Tobit II model (i.e. between the selection equation and the conditional outcome equation; so 2 correlations in total) but not the correlations between Tobit II models.
    2. How can I correlate the individual-level intercepts (indicated by || user_id across the four equations?

    Thanks in advance.


  • #2
    The command accepts covariance() (or "cov()") options within equation specification, which would here affect the correlation between the random effect and user_id-level random coefficient. And it accepts a cov() option after the main comma, to control cross-equation correlations. However, it looks like you want to customize the restrictions on these covariances in ways that are more complicated than those options allow.

    You can use constraints to exercise finer control. The key is to understand how the various "atanhro" (arctangent rho) parameters correspond to the correlations in your model. The naming system is a bit complicated because it needs to index over equations (you have 4), levels (you have 2), and random effects/coefficients in each equation (you have 2); and in fact in needs to index pairs of those things that could be correlated. Also, the user might use a cov() option to specify that a group of correlations is "exchangeable"--all the same--so which are represented with one parameter rather than several, and which the naming system also needs to accommodate. Some documentation is here. For example, I think /atanhrho_1_2_1_1 would be the correlation between the random effect and user_id random coefficient in equation 1--but it's been years since I implemented this, so that might not be quite right.

    To understand the naming, I suggest running the cmp command with iter(0) or iter(1) to quickly stop estimation, or to use the noest option to prevent estimation altogether. Then type "mat list e(b) to see how the entries in the parameter vector are named. Then you can define constraints referring to these parameters and include them in a new cmp command line, in a constraints() option. For example, "constraint 1 /atanhrho_1_2_1_1" would express that that correlation should be 0. A "constraints(1)" option in the cmp command line would impose it on the model. Also consider starting with a smaller model, so the complexity isn't overwhelming at first.

    Comment


    • #3
      Thank you, David.

      Based on your comment, I was wondering whether the current specification is doing what I want. I only want a random intercept in each of the 4 equations, so 4 random effects in total (one per equation), and you write that I have "random effects/coefficients in each equation (you have 2)".

      For restricting certain error term correlations: Can't I just set the correlations that I want to restrict to a certain value, for instance:
      constraint 1 [atanhrho_13] = 0
      constraint 2 [atanhrho_14] = 0
      constraint 3 [atanhrho_23] = 0
      constraint 4 [atanhrho_24] = 0

      Comment


      • #4
        Apologies: yes, you're right, this has no random coefficients. Another query recently had random coefficients.

        Those constraints will apply to the observation-level errors. The corresponding cross-equation correlations in the user_id-level random intercepts will still be allowed to be non-zero. If that's what you want, great. In general, without a large sample, cmp can struggle to identify parallel correlations at two different levels, and it often is necessary to constrain some to 0.

        I think that constraint syntax isn't quite right. Try something like "constraint 1 /atanhrho_13=0". Check the help for constraint for more.

        Comment

        Working...
        X