Announcement

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

  • #16
    Thanks much Maarten. If you ever have incredible amounts of free time on your hands, you might see if you can get sheafcoef to work with factor variables. Getting it to work with margins would also be a nice bonus.
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    Stata Version: 17.0 MP (2 processor)

    EMAIL: [email protected]
    WWW: https://www3.nd.edu/~rwilliam

    Comment


    • #17
      I think the issue here should be phrased a bit differently. It's not whether the variable in question is "continuous," it's whether the effect of the variable on the outcome, given it's coding is linear,. Take income, which is often coded in a set of unequal intervals with an open ended category. In effect, the coding represents a transformation of the underlying variable which, ideally, would be measured in dollars. One can ask if the effect (forgive the causal terminology) of that variable on some outcome is linear in the sense that the conditional means of the outcome variable lie in a straight line. The traditional test for this was to compare R2 statistics between a model containing only the linear term and one allowing a completely non-linear specification which is easily achieved with factor variable notation. Rich decided to do it as an LR test. Sheaf coefficients have the added convenience of providing a measure of effect.
      Richard T. Campbell
      Emeritus Professor of Biostatistics and Sociology
      University of Illinois at Chicago

      Comment


      • #18
        Good clarification. Even variables with interval-level coding don't necessarily have linear effects. You may need to take logs, add squared terms, estimate spline effects... I think the issue is just a bit more obvious with ordinal variables because the number of possible values is limited and it is often questionable to believe that the categories are equally spaced.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        Stata Version: 17.0 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #19
          If anyone is interested, here is the handout I wrote up that incorporates many of the points made in this discussion,

          http://www3.nd.edu/~rwilliam/xsoc739...ndependent.pdf
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          Stata Version: 17.0 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #20
            There are a few implicit questions here:
            1. Is X a continuous variable? No. Is X an interval variable? It's hard to argue that it is.

            2. Does X have an approximately linear relationship with Y? If it doesn't, can the relationship be linearized by transforming X? These would be questions even if X were continuous and interval. Fortunately they can be assessed empirically.

            3. How do you interpret the coefficient of X? That's a tricky question. I don't think the interpretation of X is clear unless you break X into dummies, and then interpretation, though perhaps clear, gets complicated. If X is a "control" variable, or you're only constructing your model to make predictions, then the coefficients of X may not need interpretation.
            Question (2) is something that statistics can answer and Stata can implement. But the other questions seem more conceptual.

            Comment


            • #21
              It's hard to justify a blanket statement that ordinal Xs can be treated as interval. It really depends on the ordinal X, the Y, and what you're trying to do.

              Comment


              • #22
                I do like the sheaf idea, which I hadn't heard about before. The idea that there's an latent continuous variable but we only observe ordered categories is similar to the latent-variable interpretation of ordinal logistic regression. Except in ordinal logistic regression the latent variable underlies Y; in the sheaf approach it underlies X.

                Comment


                • #23
                  I think the sheaf coefficients are like a MIMIC model, where the latent X variable is a linear composite. Building on my earlier example,

                  Code:
                  . gsem (i.agegrp -> Xage) ([email protected] -> diabetes), logit nolog
                  
                  Generalized structural equation model           Number of obs     =     10,335
                  Response       : diabetes
                  Family         : Bernoulli
                  Link           : logit
                  Log likelihood = -1830.4836
                  
                   ( 1)  [diabetes]Xage = 1.106507
                  ------------------------------------------------------------------------------
                               |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
                  -------------+----------------------------------------------------------------
                  diabetes <-  |
                          Xage |   1.106507  (constrained)
                         _cons |  -5.034785   .2590376   -19.44   0.000    -5.542489   -4.527081
                  -------------+----------------------------------------------------------------
                  Xage <-      |
                               |
                        agegrp |
                     age30-39  |    .634586    .306934     2.07   0.039     .0330063    1.236166
                     age40-49  |   1.500331   .2737094     5.48   0.000      .963871    2.036792
                     age50-59  |   1.994842   .2584948     7.72   0.000     1.488202    2.501483
                     age60-69  |   2.384457   .2419686     9.85   0.000     1.910208    2.858707
                      age 70+  |   2.685238   .2511917    10.69   0.000     2.192912    3.177565
                  -------------+----------------------------------------------------------------
                    var(e.Xage)|   6.77e-30   2.16e-15                             .           .
                  ------------------------------------------------------------------------------
                  The coefficients are identical to what I got before. I did have to cheat a bit because I couldn't figure out how to get gsem to fix the variance of Xage at 1, like sheafcoef does. So, I fixed the effect of Xage on diabetes at 1.106507, which is what sheafcoef gave. But, there is nothing that says you have to do things the same way sheafcoef does. If you are just trying to create a linear composite without assuming that the intervals are evenly spaced then you can normalize the model however you want, e.g. fix the effect of Xage on age30-39 at 1. (At least if Stata will let you; sem and gsem can get fussy when you try to do unconventional things.)

                  The help for sheafcoef says " The assumption that the effect of a block of variables occurs through a latent variable is not a testable constraint; it is just a different way of presenting the results from the original model. Its main usefulness is in comparing the relative strength of the influence of several blocks of variables." But, I think it would become testable if you had multiple dependent variables.
                  -------------------------------------------
                  Richard Williams, Notre Dame Dept of Sociology
                  Stata Version: 17.0 MP (2 processor)

                  EMAIL: [email protected]
                  WWW: https://www3.nd.edu/~rwilliam

                  Comment


                  • #24
                    The sheaf coefficient is indeed closely related to the MIMIC model. See e.g. http://maartenbuis.nl/wp/prop.html .
                    ---------------------------------
                    Maarten L. Buis
                    University of Konstanz
                    Department of history and sociology
                    box 40
                    78457 Konstanz
                    Germany
                    http://www.maartenbuis.nl
                    ---------------------------------

                    Comment

                    Working...
                    X