Is it possible to mix definition variables and constants in an mxMatrix?

Posted on
Picture of user. tbates Joined: 07/31/2009
I'm adding covariates to the means of a model.

The value of each covariate is read from the data as a definition variable ( "data.cov1", "data.cov2" etc) in a matrix named "defCovs"

As the betas are all in one matrix, I'd like to also have an "intercept" column, fixed at 1 in the the defCovs matrix to simplify the arithmetic.

Question: Is it legal to include fixed values along with definition variables in an mxMatrix?

so:


$labels
"intercept" "data.age"
$values
1 0
$free: FALSE FALSE

Replied on Wed, 08/23/2017 - 09:24
Picture of user. AdminNeale Joined: 03/01/2013

This is effectively what is done when fitting a latent growth curve model using the actual ages at which participants were assessed instead of pretending that everyone was assessed on, e.g., their consecutive birthdays, which is known to bias parameter estimates if the reality is different. See Mehta & West 2000 for details.