The OpenMx script in the tutorial does not work

I'm trying to run line-by-line through the tutorial under Documentation -> Quick-Start tutorial (1st page). The "More in-depth Example" does not work. (by the way, it would be helpful to have the tutorial be self-contained (i.e., no need for external data) so that anyone can actually run it. So simulation of twin data would be much more useful than calling up some old 'myTwinData.txt' file that can't be downloaded).
Anyway, I simulated my own twin data and tried running through the example. At the twinSatModel step, I run into problems:
> twinSatModel <- mxModel("twinSat",
+ mxModel("MZ", .... ),
+ mxModel("DZ", .... ),
+ mxAlgebra(MZ.objective + DZ.objective, name="twin"),
+ mxAlgebraObjective("twin"))
Error in mxModel("MZ", ....) : object '....' not found
I can take away the "...." and it runs but it chokes on the 2nd line after this:
> twinSatModel <- mxModel("twinSat",
+ mxModel("MZ" ),
+ mxModel("DZ"),
+ mxAlgebra(MZ.objective + DZ.objective, name="twin"),
+ mxAlgebraObjective("twin"))
> twinSatFit <- mxModel(twinSatModel)
> ExpMeanMZ <- mxEval(MZ.expMeanMZ, twinSatFit)
Error in eval(expr, envir, enclos) : object 'MZ.expMeanMZ' not found
Also, should this line be using the mxModel command or the mxRun command?:
> twinSatFit <- mxModel(twinSatModel)
In general, a tutorial is a great idea, but I've encountered several errors in the one posted in addition to those above, which is making progress in learning quite laborious. Of course, this is to be expected in a pre-beta version of software, but would it be possible for someone to run through the code in the tutorial as written and make sure that it works?
Help with the above errors (or just a simple ACE code emailed to me) would be very helpful! Thanks!
Matt
hi Mat: hope all is
There are some tickets in on the issues you mention regarding the documentation.
To get started, there are well-commented and self-contained uni- and multi-variate ACE models and a common path model included with the download: best to go there to learn how OpenMx works.
http://openmx.psyc.virginia.edu/wiki/faq-openmx#Where_are_the_example_scripts_and_demo_data_files
Open the relevant .R file in your favorite editor and paste the examples in chunk by chunk so you can catch any errors (there should be none - all those scripts run for me) and also see how OpenMx builds up a model piece by piece.
Let us know if you have trouble.
t
Log in or register to post comments
In reply to hi Mat: hope all is by tbates
Could we update
Log in or register to post comments
In reply to Could we update by mspiegel
yes, good to get rid of those
Log in or register to post comments
In reply to yes, good to get rid of those by tbates
a lot of this would go away
All easy fixes.
Log in or register to post comments
In reply to a lot of this would go away by tbates
Thanks for the help Tim. Yes,
Log in or register to post comments