Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: reproducing published CFA results using -ssd- / -sem-


From   Dirk Enzmann <dirk.enzmann@uni-hamburg.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: reproducing published CFA results using -ssd- / -sem-
Date   Wed, 13 Mar 2013 13:12:11 +0100

The algorithm Stata uses to set initial values I don't know. Perhaps you know already, but in any case: You can inspect them at least by using the combination of

trace iterate(0) coefl

as options of the -sem- command (note that -coefl- and -stand- can't be used simultaneously.

Dirk

Am 13.03.2013 04:26, schrieb Dirk Enzmann:
Stas,

You should specify starting values of the covariances within the
methods- and traits factors, as well. The following commands converge.

Unfortunately, I found no way to tell Stata to free the constraints of
the first indicator per latent variable (in order to fix the variances
of the latent variables to 1, instead).

The results correspond to results obtainable using MPlus. They do not
reproduce all coefficients in Lorenz et al. (2007), however. There seems
to be an error in Table 6 of Lorenz et al. (2007).

Other modifications are not substantial, they only help to improve the
legibility / comprehensibility of the model commands:

* --- Start Stata Syntax: ----------------------------

clear

/* Reproducing CFA of Lorenz et al. (2007)

Lorenz, F.O., Melby, J.N., Conger, R. D., & Xu, X. (2007). The effect
of context on the correspondence between observational ratings and
questionnaire reports of hostile behavior: A multitrait, multi-
method approach. Journal of Family Psychology, 21, 498-509.
*/

#delimit ;

ssd init host_or angc_or antb_or
crit_so angr_so argu_so shou_so
crit_sp angr_sp argu_sp shou_sp
crit_po angr_po argu_po shou_po
crit_pp angr_pp argu_pp shou_pp;

ssd set obs 292;

/*
ssd set means 4.13 2.14 5.33
2.27 1.70 1.87 1.21
1.26 1.61 1.86 1.18
2.41 1.76 2.11 1.30
1.42 1.64 1.95 1.22;
*/

ssd set sd 2.36 1.70 1.87
1.37 1.05 1.23 0.52
0.98 0.96 1.38 1.06
1.43 1.07 1.27 0.68
1.17 1.07 1.36 1.23;

ssd set correlations
1.00 \
.73 1.00 \
.79 .58 1.00 \
.37 .28 .38 1.00 \
.39 .34 .42 .57 1.00 \
.39 .29 .42 .61 .78 1.00 \
.19 .24 .30 .39 .59 .58 1.00 \
.11 .02 .11 .35 .25 .35 .21 1.00 \
.26 .20 .21 .34 .31 .35 .21 .53 1.00 \
.30 .21 .23 .32 .30 .35 .12 .52 .65 1.00 \
.26 .19 .20 .35 .36 .34 .32 .60 .70 .64 1.00 \
.48 .31 .39 .37 .35 .37 .15 .16 .24 .20 .18 1.00 \
.44 .35 .38 .35 .49 .46 .25 .25 .29 .24 .30 .62 1.00 \
.50 .42 .47 .40 .51 .53 .30 .24 .32 .28 .32 .62 .74 1.00 \
.26 .28 .24 .25 .30 .26 .27 .16 .19 .18 .19 .26 .44 .44 1.00 \
.31 .21 .28 .34 .29 .34 .24 .33 .42 .34 .42 .46 .45 .44 .22 1.00 \
.34 .24 .25 .34 .31 .28 .20 .22 .44 .31 .46 .38 .43 .39 .19 .65 1.00 \
.28 .17 .24 .32 .27 .31 .17 .20 .45 .32 .43 .34 .38 .44 .23 .54 .63 1.00 \
.32 .17 .28 .33 .30 .29 .20 .26 .46 .33 .50 .44 .46 .42 .25 .68 .77 .64
1.00;

ssd status;

foreach method in OR_Fac SO_Fac SP_Fac PO_Fac PP_Fac {;
foreach trait in Crit_Fac Angr_Fac Argu_Fac Shou_Fac {;
local c_cov `c_cov' `method'*`trait'@0;
};
};
di "cov( `c_cov' )";

foreach factor in OR_Fac SO_Fac SP_Fac PO_Fac PP_Fac
Crit_Fac Angr_Fac Argu_Fac Shou_Fac {;
local v_opt `v_opt' (`factor', init(1));
};
di "var( `v_opt' )";

foreach factor in SO_Fac SP_Fac PO_Fac PP_Fac {;
local c_cov `c_cov' (OR_Fac*`factor', init(0.2));
};
foreach factor in SP_Fac PO_Fac PP_Fac {;
local c_cov `c_cov' (SO_Fac*`factor', init(0.2));
};
foreach factor in PO_Fac PP_Fac {;
local c_cov `c_cov' (SP_Fac*`factor', init(0.2));
};
local c_cov `c_cov' (PO_Fac*PP_Fac, init(0.2));
foreach factor in Angr_Fac Argu_Fac Shou_Fac {;
local c_cov `c_cov' (Crit_Fac*`factor', init(0.2));
};
foreach factor in Argu_Fac Shou_Fac {;
local c_cov `c_cov' (Angr_Fac*`factor', init(0.2));
};
local c_cov `c_cov' (Argu_Fac*Shou_Fac, init(0.2));
di "cov( `c_cov' )";

sem (OR_Fac@1 -> host_or@1)
(OR_Fac -> (angc_or, init(1))
(antb_or, init(1))
)
(SO_Fac@1 -> crit_so)
(SO_Fac -> (angr_so, init(1))
(argu_so, init(1))
(shou_so, init(1))
)
(SP_Fac@1 -> crit_sp)
(SP_Fac -> (angr_sp, init(1))
(argu_sp, init(1))
(shou_sp, init(1))
)
(PO_Fac@1 -> crit_po)
(PO_Fac -> (angr_po, init(1))
(argu_po, init(1))
(shou_po, init(1))
)
(PP_Fac@1 -> crit_pp)
(PP_Fac -> (angr_pp, init(1))
(argu_pp, init(1))
(shou_pp, init(1))
)
(Crit_Fac@1 -> crit_sp)
(Crit_Fac -> (crit_so, init(1))
(crit_po, init(1))
(crit_pp, init(1))
)
(Angr_Fac@1 -> angr_sp)
(Angr_Fac -> (angr_so, init(1))
(angr_po, init(1))
(angr_pp, init(1))
)
(Argu_Fac@1 -> argu_sp)
(Argu_Fac -> (argu_so, init(1))
(argu_po, init(1))
(argu_pp, init(1))
)
(Shou_Fac@1 -> shou_sp)
(Shou_Fac -> (shou_so, init(1))
(shou_po, init(1))
(shou_pp, init(1))
), cov( `c_cov' ) var ( `v_opt' ) noconstant stand;

#delimit cr


* --- End Stata Syntax. ------------------------------

Dirk

Tue, 12 Mar 2013 09:38:04 -0500, Stas Kolenikov <skolenik@gmail.com> wrote:

http://hsphsun3.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.1303/date/article-544.html



========================================
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Rothenbaumchaussee 33
D-20148 Hamburg
Germany

phone: +49-(0)40-42838.7498 (office)
+49-(0)40-42838.4591 (Mrs Billon)
fax: +49-(0)40-42838.2344
email: dirk.enzmann@uni-hamburg.de
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html

========================================

--
========================================
Dr. Dirk Enzmann
Institute of Criminal Sciences
Dept. of Criminology
Rothenbaumchaussee 33
D-20148 Hamburg
Germany

phone: +49-(0)40-42838.7498 (office)
       +49-(0)40-42838.4591 (Mrs Billon)
fax:   +49-(0)40-42838.2344
email: dirk.enzmann@uni-hamburg.de
http://www2.jura.uni-hamburg.de/instkrim/kriminologie/Mitarbeiter/Enzmann/Enzmann.html
========================================
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index