Announcement

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

  • SEM and the predicted latent variable

    Hello

    I am doing a confirmatory factor analysis, using SEM, to construct three latent variables for subsequent use in a regression analysis.

    I use the following command

    Code:
    sem (Visual -> v1, ) (Visual -> v2, ) (Visual -> v3, ) (Verbal -> v4, ) ///
    (Verbal -> v5, ) (Verbal -> v6, ) (Speed -> v7, )(Speed -> v8, ) ///
    (Speed -> v9, ), covstruct(_lexogenous, diagonal) vce(sbentler) ///
    standardized latent(Visual Verbal Speed) ///
    cov( Visual*Verbal Visual*Speed Verbal*Speed) nocapslatent
    
    foreach v in Visual Verbal Speed {
        predict `v', latent(`v')
        egen std_`v'= std(`v') // standardized values
        }
    
    sum Visual Verbal Speed std_Visual std_Verbal std_Speed
    and I get the following output
    PHP Code:

    Endogenous variables

    Measurement
    :  v1 v2 v3 v4 v5 v6 v7 v8 v9

    Exogenous variables

    Latent
    :       Visual Verbal Speed

    Fitting target model
    :

    Iteration 0:   log pseudolikelihood = -4554.5345  
    Iteration 1
    :   log pseudolikelihood = -4549.0267  
    Iteration 2
    :   log pseudolikelihood = -4548.3346  
    Iteration 3
    :   log pseudolikelihood = -4548.3322  
    Iteration 4
    :   log pseudolikelihood = -4548.3322  

    Structural equation model                       Number of obs     
    =        145
    Estimation method    
    ml
    Log pseudolikelihood 
    = -4548.3322

     
    1)  [v1]Visual 1
     
    2)  [v4]Verbal 1
     
    3)  [v7]Speed 1
    -----------------------------------------------------------------------------------
                      |           
    Satorra-Bentler
         Standardized 
    |      Coef.   StdErr.      z    P>|z|     [95ConfInterval]
    ------------------+----------------------------------------------------------------
    Measurement       |
      
    v1              |
               
    Visual |     .67665   .0860549     7.86   0.000     .5079856    .8453145
                _cons 
    |   4.293115   .2497337    17.19   0.000     3.803646    4.782584
      
    ----------------+----------------------------------------------------------------
      
    v2              |
               
    Visual |   .5165186   .0684681     7.54   0.000     .3823235    .6507137
                _cons 
    |   5.598598   .3782855    14.80   0.000     4.857172    6.340024
      
    ----------------+----------------------------------------------------------------
      
    v3              |
               
    Visual |   .6935859    .069044    10.05   0.000     .5582622    .8289096
                _cons 
    |   1.926279   .0893687    21.55   0.000      1.75112    2.101439
      
    ----------------+----------------------------------------------------------------
      
    v4              |
               
    Verbal |    .865565   .0332882    26.00   0.000     .8003213    .9308087
                _cons 
    |   2.958508   .1669357    17.72   0.000      2.63132    3.285696
      
    ----------------+----------------------------------------------------------------
      
    v5              |
               
    Verbal |   .8293273   .0308301    26.90   0.000     .7689013    .8897533
                _cons 
    |   4.068081   .2698725    15.07   0.000     3.539141    4.597022
      
    ----------------+----------------------------------------------------------------
      
    v6              |
               
    Verbal |   .8263318   .0355554    23.24   0.000     .7566445     .896019
                _cons 
    |   2.182157   .1137125    19.19   0.000     1.959285    2.405029
      
    ----------------+----------------------------------------------------------------
      
    v7              |
                
    Speed |   .6591327   .0578271    11.40   0.000     .5457937    .7724717
                _cons 
    |   3.805027   .2013456    18.90   0.000     3.410397    4.199658
      
    ----------------+----------------------------------------------------------------
      
    v8              |
                
    Speed |   .7958731   .0501476    15.87   0.000     .6975856    .8941605
                _cons 
    |   5.246285   .3948288    13.29   0.000     4.472435    6.020136
      
    ----------------+----------------------------------------------------------------
      
    v9              |
                
    Speed |    .700846   .0517622    13.54   0.000     .5993938    .8022981
                _cons 
    |   5.196225   .3564262    14.58   0.000     4.497643    5.894808
    ------------------+----------------------------------------------------------------
             var(
    e.v1)|   .5421447   .1164581                      .3558514    .8259653
             
    var(e.v2)|   .7332085   .0707301                       .606897    .8858089
             
    var(e.v3)|   .5189386   .0957759                      .3614243    .7451002
             
    var(e.v4)|   .2507973   .0576262                      .1598602    .3934642
             
    var(e.v5)|   .3122162   .0511366                      .2264857    .4303979
             
    var(e.v6)|   .3171758   .0587611                       .220599    .4560333
             
    var(e.v7)|   .5655441   .0762315                      .4342405    .7365506
             
    var(e.v8)|   .3665861   .0798222                      .2392386    .5617211
             
    var(e.v9)|   .5088149   .0725547                      .3847533    .6728796
           
    var(Visual)|          1          .                             .           .
           var(
    Verbal)|          1          .                             .           .
            var(
    Speed)|          1          .                             .           .
    ------------------+----------------------------------------------------------------
    cov(Visual,Verbal)|   .5406683   .0896913     6.03   0.000     .3648765    .7164601
     cov
    (Visual,Speed)|   .5233425   .0942191     5.55   0.000     .3386766    .7080085
     cov
    (Verbal,Speed)|   .3361288   .1131726     2.97   0.003     .1143146     .557943
    -----------------------------------------------------------------------------------
    LR test of model vssaturatedchi2(24)  =     51.54Prob chi2 0.0009
    Satorra
    -Bentler scaled test:    chi2(24)  =     50.29Prob chi2 0.0013


    . foreach 
    v in Visual Verbal Speed {
      
    2.         predict `v', latent(`v')
      3.         egen std_`v'
    std(`v') // standardized values
      4.         }


    . sum Visual Verbal Speed std_Visual std_Verbal std_Speed

        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
          Visual |        145   -4.32e-09    4.000018  -9.592437   12.42246
          Verbal |        145   -1.23e-09    2.746986  -7.786823   7.084102
           Speed |        145    3.21e-08    13.91826   -40.7785   43.87231
      std_Visual |        145    2.20e-09           1  -2.398098   3.105601
      std_Verbal |        145   -1.70e-10           1  -2.834679   2.578864
    -------------+---------------------------------------------------------
       std_Speed |        145   -1.02e-09           1  -2.929857   3.152141 
    Now my question is that:
    1- Although I specified the standardized option, I still get the predicted variables with standard deviations more than 1, and I Why?
    2- The mean of the predicted latent variables is always close to zero? If that is so, are we assuming the kappa; associated intercept in estimating the latent KSI, in the formula is equal to zero? Or in other words what kind of distribution for the latents Ksi in this model is assumed?

    Bests,
    Emma
    Last edited by Emma Zandi; 12 Mar 2019, 09:50.

  • #2
    Emma,

    I'm not 100% sure why you get a predicted latent variable SD > 1 when you use the standardize option, but my guess is that the option only affects how the coefficients are reported, not how the underlying mathematics are calculated.

    You can constrain the variance of the latent trait to one, and you'll get an approximately standard normal distribution when you predict the latent trait, e.g.

    Code:
    use http://www.stata-press.com/data/r15/sem_1fmm
    sem (x1 x2 x3 x4 <- X), variance(X@1)
    predict p_x_std, latent
    sum p_x_std
        Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
         p_std_x |        500   -1.87e-09    .9872921  -2.959064   2.869629
    I omitted model output, but if you recorded the log likelihood (-8487.2337), then you went back and fit the same model without the constraint on the variance, you'd see the same log-likelihood, so it's fundamentally the same model (and you'd see the same if you fit the SEM model with the standardize option).

    If you plotted a histogram of the predicted latent trait after any model, you'll see it's approximately normal. I'm pretty sure that SEM in general assumes the latent traits are normally distributed.
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment


    • #3
      Thank you very much Weiwen.
      I think that as you said the standardized option only affects how the factor loadings are reported, and to standardize the latents one need to constriant vairance to one, or standardize the variables manually.

      However, I did not get the answer to my second question:

      2- The mean of the predicted latent variables is always close to zero? If that is so, are we assuming the kappa; associated intercept in estimating the latent KSI, in the formula is equal to zero? Or in other words what kind of distribution for the latents Ksi in this model is assumed?

      Best,
      Emma

      Comment


      • #4
        Originally posted by Emma Zandi View Post
        Thank you very much Weiwen.
        I think that as you said the standardized option only affects how the factor loadings are reported, and to standardize the latents one need to constriant vairance to one, or standardize the variables manually.

        However, I did not get the answer to my second question:

        2- The mean of the predicted latent variables is always close to zero? If that is so, are we assuming the kappa; associated intercept in estimating the latent KSI, in the formula is equal to zero? Or in other words what kind of distribution for the latents Ksi in this model is assumed?

        Best,
        Emma
        I'm not familiar with the latent variable notation you're referencing. However, my understanding is that the predicted mean of the latent variable should be close to 0 - as if it were following a normal distribution centered at 0.
        Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

        When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

        Comment


        • #5
          Thank you Weiwen.

          Emma
          Last edited by Emma Zandi; 12 Mar 2019, 15:36.

          Comment

          Working...
          X