OpenMx General Help

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

MxMatrix object

(1) documentation for "mxMatrix" says "This functions [sic] creates a new MxMatrix object."
(2) documentation for "MxMatrix" says that it "is an S4 class."

consider:
> unit5 <- mxMatrix(name='unit5', type='Lower', nrow=2, free=FALSE, values=1)
> class(unit5)
[1] "LowerMatrix"
attr(,"package")
[1] "OpenMx"

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

contingency tables

am embarrassed to ask this, but a prior post (openmx.psyc.virginia.edu/thread/602) talks of fitting threshold models to contingency tables, but i have been unsuccessful in finding either instructions or an example of how to do this without writing my own functions. any help?
greg
Posted on
Picture of user. carey Joined: 10/19/2009

MxConstraint Problem

(1) ran three models: the first a "general model", the second and third models constrained a (1 x 4) vector of means for one group to equal the (1 x 4) vector of means for another group. the second model did this using an MxAlgebra object while the third used an MxConstraint object.
(2) all models converged with an NPSOL inform value of 0.
Posted on
Picture of user. mdewey Joined: 01/21/2011

Model fails to terminate

I am running a series of models on the same dataset. I have eight binary manifest variables, one latent variable and twelve groups. I am fixing the means and variances of the manifests and estimating the thresholds. The series of models differ in the following way.
1 - common parameter (lambda) for all manifest variables but separate thresholds (tau - eight values)
2 - common lambda but separate tau for all items in each group (96 taus)
3 - separate lambda for each group (12) and separate tau (96)
4 - separate lambda for each manifest (8) with 8 tau
Posted on
Picture of user. brandmaier Joined: 02/04/2010

MxRAMModel reduces to MxModel

Hi guys!

I copied the factor analytic example from the OpenMx main website. When I run the model both the original and the resulting model with estimates will have the class MxRAMModel.
However, if I take the same model, add an arbitrary mean structure and mxData of type "raw", the resulting model will only have class "MxModel". To my understanding, it should still be of class MxRAMModel.
Is this a bug or a feature?
I attached my sample code.

cheers,
Andy

Posted on
No user picture. RickD Joined: 03/01/2011

Iteration history

Hi All.

Does anyone know how to view the iteration history from the optimization routine? I generally like to examine this information as I consider model fit. I searched the archives and it looks like this issue has received some attention but I could not figure out how to obtain this output.

Thanks in advance,

Rick DeShon

Posted on
No user picture. rlucas Joined: 11/17/2009

numObs in Multiple Group Models

I'm running a multiple-group model with 17 groups (using raw data). However, the number of observations that is reported is wrong. Instead of reporting the total N across all groups, it reports N X the number of groups. In other words, the full sample size across all groups is 20814, but summary reports numObs as 353838 (which is 20814*17). When I ignore the groups and run the model on the full sample, I get the correct number of observations (20814), but if I run it as 17 groups (with each group being a subset of the 20814), I get 353838 observations.

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

Another Strange Error Message

fyi,

got the following error message after mxRun():

Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
BLAS/LAPACK routine 'DPOTRF' gave error code -4

to save y'all some time, turns out that i was running an old script that had an MxAlgebra object with the expression ".5 * VA" where VA was a matrix. to fix it, i just had to change this to ".5 %x% VA."

suggest you trap the DPOTRF error and return a more intelligible error message.

greg

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

likelihood function for type=cov/cor

the default likelihood function for observed data of type=cov or cor multiplies
log(det(predictedCov)) + trace(observedCov %*% inverse(predictedCov))
by (numObs - 1). my understanding is that both the derivations from the multivariate normal pdf and the wishart pdf lead to this being multiplied by numObs and not (numObs - 1). (note that math/stat treatment of the wishart talks of "degrees of freedom" but the actual algebra defines this quantity as numObs).

i stand to be corrected here.
greg

Posted on
No user picture. Karin Joined: 02/11/2011

myTwinData.txt?

Hi

I am new to OpenMx and thought that I would try things out by working through some of the examples.

Does anyone know where I can get the dataset myTwinData.txt that is used in some of them?

Thankyou

Karin