

Equivalence of script lines 

Message/Author 

Jas Wer posted on Monday, August 24, 2015  5:15 am



Hi, 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 a11=x11**2; 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: h1=a11/v11; 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 


You can write it either way and it makes no difference. Double asterisk means "to the power of 2". 

Back to top 

