Announcement

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

  • Raykov composite reliability in stata?

    Hi,

    I estimated the cronbach alpha as a measure of reliability for a scale using the following commands:

    alpha x1 x2 x3 x4 x5 x6 x7 x8 x9 x10, std item

    However, a reviewer asked to report the raykov composite reliability instead.

    Any ideas how to do that in stata?

    Any suggestion is highly appreciated.

    Best wishes,
    Massao

  • #2
    Well, using the first example in this document by Tenko Raykov, you'd do something like that below.

    .ÿversionÿ14.1

    .ÿ
    .ÿclearÿ*

    .ÿsetÿmoreÿoff

    .ÿ
    .ÿquietlyÿssdÿinitÿy1ÿy2ÿy3ÿy4ÿy5

    .ÿquietlyÿssdÿsetÿobservationsÿ300

    .ÿquietlyÿssdÿsetÿcovarianceÿ1.322ÿ\ÿ0.878ÿ1.241ÿ\ÿ0.912ÿ0.886ÿ1.313ÿ\ÿ///
    >ÿÿÿÿÿÿÿÿÿ0.858ÿ0.807ÿ0.881ÿ1.240ÿ\ÿ2.670ÿ2.567ÿ2.668ÿ2.560ÿ8.243

    .ÿ
    .ÿsemÿ(y1-y5ÿ<-ÿF),ÿvariance(F@1)ÿnocnsreportÿnodescribeÿnolog

    StructuralÿequationÿmodelÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ300
    Estimationÿmethodÿÿ=ÿml
    Logÿlikelihoodÿÿÿÿÿ=ÿ-1954.2738

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿOIM
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    Measurementÿÿ|
    ÿÿy1ÿ<-ÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿFÿ|ÿÿÿ.9508349ÿÿÿ.0543566ÿÿÿÿ17.49ÿÿÿ0.000ÿÿÿÿÿ.8442978ÿÿÿÿ1.057372
    ÿÿ-----------+----------------------------------------------------------------
    ÿÿy2ÿ<-ÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿFÿ|ÿÿÿ.9134666ÿÿÿ.0528883ÿÿÿÿ17.27ÿÿÿ0.000ÿÿÿÿÿ.8098074ÿÿÿÿ1.017126
    ÿÿ-----------+----------------------------------------------------------------
    ÿÿy3ÿ<-ÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿFÿ|ÿÿÿ.9530369ÿÿÿ.0540701ÿÿÿÿ17.63ÿÿÿ0.000ÿÿÿÿÿ.8470615ÿÿÿÿ1.059012
    ÿÿ-----------+----------------------------------------------------------------
    ÿÿy4ÿ<-ÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿFÿ|ÿÿÿÿ.909055ÿÿÿ.0529553ÿÿÿÿ17.17ÿÿÿ0.000ÿÿÿÿÿ.8052646ÿÿÿÿ1.012845
    ÿÿ-----------+----------------------------------------------------------------
    ÿÿy5ÿ<-ÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿFÿ|ÿÿÿ2.798833ÿÿÿ.1213234ÿÿÿÿ23.07ÿÿÿ0.000ÿÿÿÿÿ2.561044ÿÿÿÿ3.036623
    -------------+----------------------------------------------------------------
    ÿÿÿÿvar(e.y1)|ÿÿÿ.4135064ÿÿÿ.0372984ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.3465002ÿÿÿÿ.4934703
    ÿÿÿÿvar(e.y2)|ÿÿÿ.4024421ÿÿÿ.0360094ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.3377071ÿÿÿÿ.4795862
    ÿÿÿÿvar(e.y3)|ÿÿÿÿ.400344ÿÿÿ.0366341ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.334613ÿÿÿÿÿ.478987
    ÿÿÿÿvar(e.y4)|ÿÿÿ.4094857ÿÿÿ.0363706ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.3440605ÿÿÿÿ.4873519
    ÿÿÿÿvar(e.y5)|ÿÿÿ.3820561ÿÿÿÿ.114871ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ.2119339ÿÿÿÿ.6887378
    ÿÿÿÿÿÿÿvar(F)|ÿÿÿÿÿÿÿÿÿÿ1ÿÿ(constrained)
    ------------------------------------------------------------------------------
    LRÿtestÿofÿmodelÿvs.ÿsaturated:ÿchi2(5)ÿÿÿ=ÿÿÿÿÿÿ2.30,ÿProbÿ>ÿchi2ÿ=ÿ0.8061

    .ÿ
    .ÿscalarÿdefineÿLÿ=ÿ0

    .ÿscalarÿdefineÿEÿ=ÿ0

    .ÿforvaluesÿiÿ=ÿ1/5ÿ{
    ÿÿ2.ÿÿÿÿÿÿÿÿÿscalarÿdefineÿLÿ=ÿLÿ+ÿ_b[y`i':F]
    ÿÿ3.ÿÿÿÿÿÿÿÿÿscalarÿdefineÿEÿ=ÿEÿ+ÿ_b[var(e.y`i'):_cons]
    ÿÿ4.ÿ}

    .ÿdisplayÿinÿsmclÿasÿtextÿ"Rhoÿ=ÿ"ÿasÿresultÿ%06.4fÿL^2ÿ/ÿ(L^2ÿ+ÿE)
    Rhoÿ=ÿ0.9550

    .ÿ
    .ÿ//ÿor
    .ÿ
    .ÿlocalÿLÿ_b[y1:F]

    .ÿlocalÿEÿ_b[var(e.y1):_cons]

    .ÿforvaluesÿiÿ=ÿ2/5ÿ{
    ÿÿ2.ÿÿÿÿÿÿÿÿÿlocalÿLÿ`L'ÿ+ÿ_b[y`i':F]
    ÿÿ3.ÿÿÿÿÿÿÿÿÿlocalÿEÿ`E'ÿ+ÿ_b[var(e.y`i'):_cons]
    ÿÿ4.ÿ}

    .ÿnlcomÿrho:ÿ(`L')^2ÿ/ÿ((`L')^2ÿ+ÿ`E'),ÿnoheader

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿrhoÿ|ÿÿÿ.9549676ÿÿÿÿ.004421ÿÿÿ216.01ÿÿÿ0.000ÿÿÿÿÿ.9463025ÿÿÿÿ.9636326
    ------------------------------------------------------------------------------

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .


    So, for yours, assuming that you don't contemplate covariance between indicator variables, it would be something like
    Code:
    sem (x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 <- F), variance(F@1) nocnsreport nodescribe nolog
    local L _b[x1:F]
    local E _b[var(e.x1):_cons]
    forvalues i = 2/10 {
        local L `L' + _b[x`i':F]
        local E `E' + _b[var(e.x`i'):_cons]
    }
    nlcom rho: (`L')^2 / ((`L')^2 + `E'), noheader

    Comment


    • #3
      Hi,

      Thank you very much. I got this in stata now.
      By the way, for some strange reason, I get a slightly different answer in MPlus. It's probably not the right forum to put out the Mplus code for this, but this is how it looks:

      Analysis:
      ESTIMATOR = ML;
      BOOTSTRAP = 2000;

      MODEL:

      X1 (resv1);
      X2( resv2);
      X3 (resv3);
      X4 (resv4);
      X5 (resv5);
      X6 (resv6);
      X7 (resv7);
      X8 (resv8);
      X9 (resv9);
      X10 (resv10);

      f by X1;
      f by X2(l2);
      f by X3(l3);
      f by X4(l4);
      f by X5(l5);
      f by X6(l6);
      f by X7(l7);
      f by X8(l8);
      f by X9(l9);
      f by X10(l10);


      f@1;

      MODEL CONSTRAINT:

      NEW(omega);
      omega =(1+l2+l3+l4+l5+l6+l7+l8+l9+l10)^2/
      ((1+l2+l3+l4+l5+l6+l7+l8+l9+l10)^2+
      resv1+resv2+resv3+resv4+resv5+resv6+resv7+resv8+re sv9+resv10);

      OUTPUT:
      CINTERVAL(BCBOOTSTRAP);

      Comment


      • #4
        Free your first factor loading.
        Code:
        F BY X1* (L1);
        and modify the constraint equation accordingly.

        Comment


        • #5
          Thanks :-)

          Comment


          • #6
            Hi,

            I am new to this forum as well as to using Stata for this type of analysis. In running your Stata codes using the Raycov example, I kept getting the error message saying "invalid syntax" for the last line, "
            nlcom rho: (`L')^2 / ((`L')^2 + `E'), noheader I couldn't figure out why as the previous lines ran without any hiccups. I'd appreciate your help.

            Comment

            Working...
            X