Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 73268

Applying ologit and fixed error rates to sem.

$
0
0
In short, I am trying to take this functioning SEM model

Code:
qui: sem ///
    (post_att_tot                 <- pre_att_tot ASykKmTransp_sqrt_cat4) ///
    (CSykKmTransp_sqrt_cat4     <- ASykKmTransp_sqrt_cat4 pre_att_tot) ///
        , nocapslatent  ///
        cov(pre_att_tot*ASykKmTransp_sqrt_cat4 e.post_att_tot*e.CSykKmTransp_sqrt_cat4)
        sem, standardized
and apply the following changes:
- Make the "CSykKmTransp_sqrt_cat4" treated as the ordinal variable it is, through applying ologit.
- Fix the error term of the summated attitude scores by (1-(Cronbach's alpha))*variance to account for the measurement error in this construct. The summated attitude scores are post_att_tot and pre_att_tot, and are the rowmean of 6 other variables.

To implement this, I am currently attempting to convert the model to gsem, adding ologit to the CSykKmTransp_sqrt_cat4 link, and adding the Cronbach's alpha through the reliability() option. The current code is this, but it is not working.

Code:
gsem ///
    (post_att_tot                 <- pre_att_tot ASykKmTransp_sqrt_cat4) ///
    (CSykKmTransp_sqrt_cat4     <- ASykKmTransp_sqrt_cat4 pre_att_tot, ologit) ///
        , nocapslatent reliability(pre_att_tot 0.7469 post_att_tot 0.7492) ///
        cov(pre_att_tot*ASykKmTransp_sqrt_cat4 e.post_att_tot*e.CSykKmTransp_sqrt_cat4)
There are two main errors i get, that I am struggling with.
1 ) "invalid reliability() option; pre_att_tot must be an observed endogenous gaussian variable with an identity link"
and of this reliability option is removed,
2) "invalid covariance specification; pre_att_tot does not identify a gaussian error or latent variable"

Which I do not completely understand, because pre_att_tot not being endogenous was not a problem in the SEM original model. However, I realize that I am currently working with model specifications way above my current SEM knowledge and would greatly appreciate help.

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float(pre_att_tot post_att_tot ASykKmTransp_sqrt_cat4 CSykKmTransp_sqrt_cat4)
 3.166667  3.833333 1 1
 6.666667         6 3 3
        6  5.666667 4 3
4.3333335 4.3333335 1 1
      3.5       3.5 3 3
 5.666667  6.333333 2 3
        6         7 4 4
4.6666665 4.6666665 3 3
      5.5         6 4 4
      3.5  4.833333 2 2
 3.166667         6 2 2
        5  3.833333 4 4
4.6666665  5.166667 4 4
 5.166667 4.3333335 1 1
      6.5       6.5 4 4
 4.833333 4.6666665 4 4
        4       4.5 3 3
 5.333333  5.666667 3 4
 6.666667  6.666667 4 4
 3.833333         3 1 2
      2.5 2.1666667 1 1
        6  6.666667 4 4
4.6666665       3.5 1 1
 3.333333 2.3333333 1 1
        5  5.333333 4 3
        6  5.833333 4 4
 6.166667  6.333333 4 4
 5.333333  5.166667 4 4
 6.166667  6.166667 4 4
 6.666667       6.5 3 4
 5.333333  4.833333 4 4
 5.833333         5 3 4
        7  6.333333 4 4
 5.333333         5 3 3
      5.5         6 2 2
 5.833333       5.5 4 3
      3.5  5.333333 3 2
 6.333333  6.666667 3 3
 3.166667  4.833333 4 1
        5       4.5 3 1
      4.5 4.3333335 4 4
        5  3.333333 3 2
 6.666667  6.333333 2 3
4.6666665         5 4 3
        7         6 2 3
      6.5  6.666667 4 4
 4.833333 2.3333333 1 3
        5  5.833333 4 4
 5.666667       4.5 1 1
      5.5         5 4 4
 6.333333         6 1 3
4.1666665 4.3333335 3 3
4.6666665         5 1 1
        7         7 4 4
 4.833333 4.1666665 4 4
 4.833333  4.833333 3 3
        6  6.166667 1 1
        5         7 4 4
4.6666665       5.5 4 3
 5.833333         5 4 4
        6         5 3 1
 3.833333  5.333333 . 2
 6.333333         5 4 3
      4.5 4.6666665 3 3
        6  5.833333 4 4
        5  2.833333 3 4
      4.5  3.833333 1 2
4.6666665  4.833333 1 3
 5.833333  5.666667 2 2
 6.833333       6.5 2 3
      3.5  3.333333 1 3
        5  6.333333 4 3
        7         5 1 1
 6.666667  5.833333 3 4
      4.5       3.5 1 1
        5  5.166667 2 2
4.1666665         4 3 2
      5.5  5.833333 4 4
        4  4.833333 1 1
      5.5         5 1 2
 5.833333         7 3 4
        5       5.5 4 4
        5       6.5 3 2
 3.666667 4.3333335 4 4
        5  5.166667 3 3
      4.5  4.833333 3 3
 5.166667         5 1 1
      5.5       6.5 2 3
 5.666667         6 3 4
        7         7 4 4
 5.333333  5.666667 1 2
      6.5         7 4 4
 2.833333         4 2 4
 4.833333  4.833333 3 3
4.3333335       4.5 3 3
        6         7 4 4
 5.666667       5.5 3 4
 5.333333       4.5 4 4
      3.5 4.6666665 1 1
 3.666667       4.5 2 2
end

Viewing all articles
Browse latest Browse all 73268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>