TITLE: Simulation Code for Tucker-Drob, Harden, & Turkheimer(2009; Behavior Genetics) GENERATING MODEL- NONLINEAR PSYCHOMETRIC PORTION, ADDITIVE BIOMETRIC PORTION MONTECARLO: NAMES ARE q1 r1 s1 q2 r2 s2 x; GENCLASSES = cg(2); CLASSES = cg(2); NOBS = 1000; SEED = 314; NREP = 50; REPSAVE = ALL; SAVE = xxx*.dat; ANALYSIS: TYPE = MIXTURE RANDOM; ALGORITHM IS INTEGRATION; MODEL IS NOCOVARIANCES; MODEL POPULATION: %OVERALL% !LINEAR COMPONENT OF LOADING FOR TWIN1 y1 by q1@1; y1 by r1*1(l2); y1 by s1*1(l3); !LINEAR COMPONENT OF LOADING FOR TWIN2 y2 by q2@1; y2 by r2*1(l2); y2 by s2*1(l3); !CREATE QUADRATIC ABILITY COMPONENTS yy1 | y1 xwith y1; yy2 | y2 xwith y2; !REGRESS TEST SCORES ON QUADRATIC COMPONENTS q1 on yy1*-.2(ll1); !-.2 for lower loadings at higher factor scores; .2 for higher loadings at higher factor scores q2 on yy2*-.2(ll1); !-.2 for lower loadings at higher factor scores; .2 for higher loadings at higher factor scores r1 on yy1*-.2(ll2); !-.2 for lower loadings at higher factor scores; .2 for higher loadings at higher factor scores r2 on yy2*-.2(ll2); !-.2 for lower loadings at higher factor scores; .2 for higher loadings at higher factor scores s1 on yy1*-.2(ll3); !-.2 for lower loadings at higher factor scores; .2 for higher loadings at higher factor scores s2 on yy2*-.2(ll3); !-.2 for lower loadings at higher factor scores; .2 for higher loadings at higher factor scores !TEST INTERCEPTS [q1*0] (i1); [q2*0] (i1); [r1*0] (i2); [r2*0] (i2); [s1*0] (i3); [s2*0] (i3); !RESIDUAL VARIANCES q1*.1 (v1); q2*.1 (v1); r1*.1 (v2); r2*.1 (v2); s1*.1 (v3); s2*.1 (v3); !RESIDUAL VARIANCE OF ABILITY = NONSHARED ENVIRONMENT y1-y2*.25(vy); !GENETIC FACTORS a1 BY y1*.7 (2); a2 BY y1@0;! (2); !SHARED ENVIRONMENT FACTORS c BY y1*.3 (3); c BY y2*.3 (3); !LATENT A AND C HAVE UNIT VARIANCES a1@1; a2@1; c@1; !MEANS [y1@0 y2@0 a1@0 a2@0 c@0 x@0]; !FAMILY LEVEL COVARIATE x@1; y1 on x*.6(my); y2 on x*.6(my); !GENETIC FACTORS ARE ISOMORPHIC FOR MZ TWINS a1 WITH a2@0; y2 on a1*.7(2); y2 on a2@0; %cg#1% !MZ TWINS %cg#2% !DZ TWINS y2 on a1@0; y2 on a2*.7; !DIFFERENT GENETIC FACTORS FOR DZ TWINS a1 WITH a2@.5; !GENETIC FACTORS CORRELATE AT .5 FOR DZ TWINS