# error in Latent Growth Curve script

8 posts / 0 new
Offline
Joined: 06/08/2010 - 00:15
error in Latent Growth Curve script

Hello -
I'm trying to alter script from theworkshop and am receiving the errors below. I am not including sex in my model so I made what I believe are the required changes in the script to eliminate these effects (I also included sex in the text file as '1' for everyone in case I missed something in the script). I'm not sure why I am receiving these errors (particularly the one indicating I have an illegal name as I did not give anything that name so I'm not sure where it is coming from in the script). Any help would be GREATLY appreciated. I attached the script and the text file. Thanks so much!
Jen

Error: The name 'TS11_1.1' is illegal because it contains the '.' character
>
> lgcACEFit <- mxRun(lgcACEModel) # Run Latent Growth Curve ACE model
Error in cat("Running", model@name, "\n") :
> lgcACESumm <- summary(lgcACEFit)
Error in summary(lgcACEFit) :
error in evaluating the argument 'object' in selecting a method for function 'summary'
> lgcACESumm
>
> parameterSpecifications(lgcACEFit)
Error in .collectParameterSpecifications(model) :
> expectedMeansCovariances(lgcACEFit)
Error in .collectExpectedMeansCovariances(model, model) :
> tableFitStatistics(lgcACEFit)
Error in summary(reference) :
error in evaluating the argument 'object' in selecting a method for function 'summary'
>
>

Offline
Joined: 07/31/2009 - 15:24
I think the script wasn't

I think the script wasn't attached to the post?

Offline
Joined: 06/08/2010 - 00:15
I'm trying the attachment

I'm trying the attachment again! I also forgot to mention that I only altered the beginning part of the script so far. I didn't change the rest of it b/c I wanted to make sure I had the first part working.
Thanks!
Jen

Offline
Joined: 07/31/2009 - 15:24
The call to

The call to data.frame(mzData,mzDefs) combines the two data frames. They have overlapping column names, and R's default is to add ".1" to the duplicate column names. The is unfortunate, because the "." is a special character in OpenMx and cannot be used in column names. I think the easiest change to the script is to manually change the column names after creating the new data.frame object. To track down errors like these, use the R function traceback() after the first error message is received. It will show the sequence of calls that lead to the error. When you are debugging, it is safest to ignore all the functions that are internal to the OpenMx library, and just focus on the first user-level function that is called: like mxData, mxMatrix, or mxAlgebra for example. This will help in identifying the source of the error. I'll mess around with the OpenMx code to see if we can get a more specific error message next time.

The error message in the next binary release will be:
Error: The name 'TS11_1.1' is illegal because it contains the '.' character in mxData(data.frame(mzData, mzDefs), type = "raw")

Offline
Joined: 06/08/2010 - 00:15

Best,
Jen

Offline
Joined: 10/13/2009 - 01:27
I am receiving the same

I am receiving the same error, and have not been able to successfully change the script as you suggested. Could you please direct me to any documentation on how to implement this change?

Thanks!
Jamie

Offline
Joined: 07/31/2009 - 15:24
Try rownames() and colnames()

Try rownames() and colnames() on your data sets. If you see they have the '.' character, then you must rename those row or column names to remove the illegal '.' character.

Offline
Joined: 10/13/2009 - 01:27
Thank you so much for all of

Thank you so much for all of your help (and patience) this week! I was able to alter my script and remove the error. Learning the rownames() and colnames() commands was very helpful.

Cheers!