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

tbates's picture
Project:OpenMx
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

Comments

mspiegel's picture

#1

Version:Unknown» <none>

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

neale's picture

#2

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"

tbates's picture

#3

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)

tbates's picture

#4

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)

jpritikin's picture

#5

Status:active» closed

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