R Functions and User Interface

Posted on
Picture of user. tbates Joined: 07/31/2009

mxCI working?

hi, I have a model to which I add an mxCI as follows

model <- mxModel(fit1a, mxModel(fit1a@submodels$top,mxCI("top.a21")));
fit= mxRun(model, intervals=T); 

This runs fine without error, but summary(fit) does not show a CI

> summary(fit)
snip...
Information Criteria: 
     df Penalty Parameters Penalty Sample-Size Adjusted
AIC    887.2424           7439.242                   NA
BIC -14988.3563           7541.666              7474.97

CFI: Put CFI Forumla Here. 
TLI: Put TLI Forumla Here. 
RMSEA:  NA 
timestamp: 2011-05-26 16:52:47 
Posted on
Picture of user. tbates Joined: 07/31/2009

How to use SVN version of OpenMx with pre-release versions of R

Hi all,
Wanting to try R 2.13 [1], but the svn OpenMx install doesn't seem to find the new application library path. Is it me?

[1] http://r.research.att.com/R-2.13-branch-leopard.pkg

Posted on
Picture of user. mspiegel Joined: 07/31/2009

mxPath unexpected behavior with all = TRUE

Imagine I want to create the following model:

I try creating this model fragment using the following R code:

lVars <- c('a', 'b')
freeParams <- c('p1', 'p2', 'p3')

model <- mxModel('model', type = 'RAM',
   latentVars = lVars,
   mxPath(from = lVars, to = lVars, arrows = 2, 
      all = TRUE, labels = freeParams))

But this code generates the model:

Posted on
Picture of user. tbates Joined: 07/31/2009

omxGraphviz() model not type RAM

1. Run "IntroSEM-BivariateRaw.R" in trunk.models/passing

2. Send the output to omxGraphviz.

Despite this being a RAM model its type is not "MxRAMModel"

is(biRegModelRawOut)
# "MxModel"
# (which makes omxGraphviz() terminate with error )

Posted on
Picture of user. carey Joined: 10/19/2009

boundary conditions

(1) am trying to write R code to deal with boundary conditions. is there a SIMPLE way in which i can create an R object from a fitted MxModel that generates vectors of lower and upper bounds for the free parameters? ( i have code that does it, but it is pretty ugly).

(2) the documentation for MxBounds and mxBounds speak of a 'spec' matrix. the same term also appears in several documents when i do a search. anybody tell me what that is? suggest that you include an example of using a 'spec' matrix in the documentation for mxBounds.

greg

Posted on
Picture of user. mspiegel Joined: 07/31/2009

joint continuous/ordinal FIML optimization

We are implementing the joint continuous and ordinal piece for the FIML objective function. There was a long discussion at this week's developers meeting on how to match expected means/covariances and thresholds to the observed dataset. First, here is some background.

Posted on
Picture of user. mspiegel Joined: 07/31/2009

OpenMx library function names

Currently the functions named "omx*" consist of (A) uncommon functions that we intend to remain backwards compatible in all future versions of OpenMx, and (B) uncommon functions that may be helpful to advanced OpenMx users but whose interface might change in the future. We would like to keep type (A) functions in the "omx*" category and rename type (B) functions with a new character prefix. We wish to solicit feedback on which functions should remain in the "omx*" category, and get suggestions for the new prefix string for the type (B) functions.

Posted on
Picture of user. mspiegel Joined: 07/31/2009

thresholds matrix helper function

I started putting together a function that will generate a thresholds matrix. The implementation is attached to this post. The function omxGenerateThresholds accepts five arguments:

  1. data - a data frame that has been transformed with mxFactor()
  2. threshNames - a character vector of the column names. In OpenMx 1.0 must be equal to the column names of the data set.
  3. threshLabels - a character vector of the free parameter names. Used to specify equality constraints.
Posted on
Picture of user. Ryne Joined: 07/31/2009

Using MxModel names (that include spaces) in MxAlgebras

I'm writing a helper function that takes a set of existing MxModels and returns a parent model that (a) includes them all as submodels, and (b) has an mxAlgebraObjective that sums the objectives of the existing MxModels. I have always avoided putting spaces in MxModel names when I plan to use that model in an algebra. Is it possible to refer to the objective slot in a model named "My Poorly Named Model" in an MxAlgebra? All of my usual tricks involving quotes don't work.

ryne

Posted on
Picture of user. Ryne Joined: 07/31/2009

Standardize a RAM Model

Here's a beta of a new function to get standardized output from a RAM model. I've only tested it on one or two models, so I'd love some help breaking it. You have to either supply a model that uses mxRAMObjective or you have to supply the names of the A and S matrices.

Edit (11/1/10): Previous version standardized S correctly but A incorrectly. Fixed. Also improved some error messages.