Equivalence of script lines PreviousNext
Mplus Discussion > Structural Equation Modeling >
 Jas Wer posted on Monday, August 24, 2015 - 5:15 am

My question is about using a script shortcut.

I'm using a bivariate Cholesky decomposition to examine genetic and environmental influences on the association between two variables. I would like to express the genetic and environmental influences on each variable as a proportion of the total variance, which entails dividing the genetic or environmental influence by the total variance for that variable.

The genetic influence on Variable1 is defined as
and the total variance on variable 1 as
v11 = x11**2 + y11**2 + z11**2;

So now, for obtaining genetic influences as a proportion of total variance, I'm using this line:

h1=x11**2/(x11**2 + y11**2 + z11**2);

However, I was wondering whether I could also just write it it like this:


Is there any reason why one should use the first version over the second? It does make quite a big difference in the time it takes to run the models and in the length of the script lines.

Also, related to this: what exactly does the double asterisk mean, anyway? I couldn't find this in the User's Guide.

Thanks and best wishes
 Bengt O. Muthen posted on Tuesday, August 25, 2015 - 7:27 am
You can write it either way and it makes no difference.

Double asterisk means "to the power of 2".
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message