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

2 posts / 0 new
Offline
Joined: 07/31/2009 - 14:25
Is it possible to mix definition variables and constants in an mxMatrix?

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
Offline
Joined: 03/01/2013 - 14:09
Sure it is

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.