You are here

genepi library: move into OpenMx, or keep on googlecode?

I put a version of the helper functions up on googlecode back at the workshop, renaming the functions with the prefix "genEpi_" so they are easier to pick out in a script.

As these are things that were very popular with users, can we figure out which (all?) of these to move into OpenMx and document (happy to help)? And how they will be named if they are part of the OpenMx distro itself: Perhaps mxl for library (misreadable as upper case i) or mxh for "Helper" or just genEpi_ for the sake of the guinea pigs :-)

  1. mxhLabeler()
  2. mxh_Labeler()
  3. genEpi_Labeler()

The current functions are:

genEpi_Labeler(mxMatrix(), baseName=NA)

genEpi_EvalQuote

genEpi_ExpectedMeansCovariances(model)

genEpi_FormatMatrix(matrix, dimnames, digits)

genEpi_FormatOutputMatrices(fittedModel,matricesList,labelsList,vars,digits)

genEpi_FormatOutputMatrix(matrix,label,vars,digits)

genEpi_Labeler(mxMatrix(), baseName=NA)

genEpi_ParameterSpecifications(model)

genEpi_TableFitStatistics(reference, compare)

To see the current It is pretty straight forward:

to USE ME IN YOUR SCRIPTS SAY:

source("http://openmxhelpers.googlecode.com/svn/trunk/genEpi.lib.R")

To access me via svn

svn checkout https://openmxhelpers.googlecode.com/svn/trunk/ openmxhelpers --username yourGmailName

Access on google code base as

http://code.google.com/p/openmxhelpers/source/checkout

I have renamed the functions with the prefix "genEpi_" so they are easier to pick out in a script.
I reordered the code so that all the .Helper functions are collected at the bottom, added some comments

Reporter: 
Created: 
Thu, 03/25/2010 - 07:22
Updated: 
Thu, 05/08/2014 - 12:02

Comments

We talked about moving the model comparison functionality from genepi into a new mxCompare() function for the OpenMx 1.0 release.

No problem with svn:
Michael-Neales-2011-Macbook-Pro% svn checkout https://openmxhelpers.googlecode.com/svn/trunk/ openmxhelpers --username xxx

A openmxhelpers/GenEpiHelperFunctions.R
A openmxhelpers/fit indices.R
A openmxhelpers/se.test.R
A openmxhelpers/mxRowObjectiveHelper.R
A openmxhelpers/testSuite.R
A openmxhelpers/genEpi.lib.R
A openmxhelpers/update_scripts.html
A openmxhelpers/5 group dummy.R
Checked out revision 160.
Michael-Neales-2011-Macbook-Pro%

In R, no problem sourcing:

> source("openmxhelpers/GenEpiHelperFunctions.R")

However, I could not get ahold of the function as suggested with genEpi_ prefix:

> genEpi_TableFitStatistics(rgcmmFit,rgcmmDiffTFit)
Error: could not find function "genEpi_TableFitStatistics"
> genEpi_tableFitStatistics(rgcmmFit,rgcmmDiffTFit)
Error: could not find function "genEpi_tableFitStatistics"

hi mike,
I've made dozens of changes in that file: I guessed no one else was using it, except students here at Edinburgh.

So it has morphed a lot, and is big collection of private helpers including 1-line wrappers to make twin models etc.
It might not be reliably doing what it used too :-)

Anyhow, this works for me:

genEpi_TableFitStatistics(reference,compare,extended=F)

OK: I see what the problem was... there was an unmodified version of helpers in the project: I've cleaned out my mods, and updated that original file with the genEpi names.

So this now works as expected:
source("http://openmxhelpers.googlecode.com/svn/trunk/GenEpiHelperFunctions.R")
genEpi_TableFitStatistics(reference, compare)

Close with permission from Tim Bates. This is not really an issue but an ongoing discussion that will likely never end.