Announcement

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

  • tetrachoric correlations with noninterger weights

    I need to compute a correlation matrix of binary variables. The tetrachoric command only allows fweights, however, my dataset contains noninteger weights. Does anyone know how to proceed?
    Thanks!

  • #2
    I don't think you can do this with the -tetrachoric- command. But it might be possible to do this with -cmp- (which is a user-written program you can get from SSC). I'm not sure, but it's worth a try.
    Last edited by Clyde Schechter; 29 Aug 2014, 13:06. Reason: Correct typo.

    Comment


    • #3
      Thanks! It works with the cmp command.

      Comment


      • #4
        I actually just posted the same question about tetrachoric correlation with non-integer weights. Can you please share your syntax for using the cmp command?

        Comment


        • #5
          I am currently searching for the same answer. Could someone help by sharing how to solve this using the cmp command?

          Comment


          • #6
            Originally posted by Markus Stratmann View Post
            I am currently searching for the same answer. Could someone help by sharing how to solve this using the cmp command?
            You can use official Stata gsem to compute tetrachoric correlation coefficients and their standard errors. And gsem allows iweights and pweights.
            Code:
            version 19
            
            clear *
            
            quietly webuse familyvalues
            keep RS074 RS075
            rename *, lower
            
            tetrachoric rs074 rs075
            
            *
            * Begin here
            *
            gsem ///
                (rs074@1 <- F1, probit) ///
                (rs075@1 <- F2, probit), ///
                    variance(F1@1 F2@1) ///
                    nocnsreport nodvheader nolog
            
            lincom _b[/:cov(F1, F2)] / 2 // <= here
            
            exit

            Comment

            Working...
            X