OpenMx General Help

parameter constraints
Dear all,
sorry for this simple question. What I want to do is to impose a simple parameter constraint. If I want to set two parameters equal, I simply use the same label. However, what if I want to set parameter a = 2*b, so that actually only one parameter is freely estimated?
After searching the archives, the only cumbersome way I came up with is to define two new matrices with a single element but new names, use the mxAlgebra function to multiply by two and then use the mxConstraint function to set the matrices equal. So I did something like that
- Read more about parameter constraints
- 23 comments
- Log in or register to post comments

fit indices and df for a simple path model
Greetings all,
Now finally getting Mx to work on my Mac, I'm having a good time putting it through its paces. So, I have a simple model I'm playing with
probsolv -> grades -> irtsci
Below is the syntax and output. It's reading the number of obs correctly and the estimates seem correct. However, I am not getting a value for the LR chi-square test nor the RMSEA and the df seem fairly large considering it should only be 1 df. Thanks in advance. David
--------
>
> sciach <- read.table("~/Desktop/Mx stuff/sciach.txt",header=TRUE)
>
> require(OpenMx)
>
> #data(sciach)
- Read more about fit indices and df for a simple path model
- 6 comments
- Log in or register to post comments

Weird Std.Errors when using many non-linear constraints
Hi all,
I'm running a nuclear twin family design model (an SEM model that contains a number of non-linear constraints). Two issues:
(1) The point estimate of the pathways are fine - and agree with those I simulated - but the standard errors are WAY off; e.g., the standard error for a path coefficient that cannot be dropped (e) is 30.3 and the point estimate is -.54! Here are the other coefficients from summary():
summary(ASDE.Fit)
name matrix row col Estimate Std.Error
1 AddGenPath MZNTF.a 1 1 0.63320641 1.9272561

Scipt Exchange between Windows and OS X
Before i look deeper in OpenMx i want to now if anybody had some experience with exchange scripts between different systems like windows and Mac OS X? Are there any problemes if you do that on a regulary basis?
With regards
Lolle
- Read more about Scipt Exchange between Windows and OS X
- 3 comments
- Log in or register to post comments

Using mxEval() with a character vector (string) argument
It is not uncommon to have the name of a named entity, and would like to call mxEval() to get the current value of the named entity. Let's say your named entity is called "foo". The expression mxEval("foo", model) evaluates to the character string "foo". The following helper function will do what you want to do:
omxEvalByName <- function(name, model, compute=FALSE, show=FALSE) { if((length(name) != 1) || typeof(name) != "character") { stop("'name' argument must be a character argument") } if(!is(model, "MxModel")) {

Extracting means and covariances from a model
Below is a function that prints to the console all of the means and covariances matrices in a model and all of the nested submodels. The function .collectMeansCovariances() places all of the matrices into a single list. The remaining lines of showMeansCovariances() are just pretty-printing, they are not interesting.

using label="mean"
Dear all
When set
mxMatrix(type="Full", nrow=1, ncol=2, free=TRUE, values=c(0,0), label= "mean", name="expMean")
in twin ACE model, i found if i set label="mean", the
twinACEFit@output$estimate return 4 values with label (mean, a,c,e)
if the label item not set
mxMatrix(type="Full", nrow=1, ncol=2, free=TRUE, values=c(0,0), name="expMean")
twinACEFit@output$estimate return 5 values with label (NA,NA, a,c,e) and the first two mean values are not exactly the same.
Which one is correct?
- Read more about using label="mean"
- 5 comments
- Log in or register to post comments

Error of using vech() in mxAlgebra()
Hi, all.
Thanks for creating OpenMx, a wonderful R package!
According to the manual of version 0.2.3-1006, vech() is supported in mxAlgebra() via MCMCpack while vech() is not listed in http://openmx.psyc.virginia.edu/wiki/matrix-operators-and-functions . I tried it in version 0.2.3-1006 but it failed. This also applied to other functions, such as diag(), c() and c(t()) (a ")" was missing in the manual).
Here are the example.
> library(OpenMx)
> library(MCMCpack)
> mxVersion()
[1] "0.2.3-1006"
> A <- mxMatrix("Symm", nrow = 3, ncol = 3, values=1:6, name = "A")
- Read more about Error of using vech() in mxAlgebra()
- 4 comments
- Log in or register to post comments

Two warnings
Dear developers,
I am new in openMX. when i tried some tests for the twin Data using ACE model, i found the following two warnings,
1: In model 'twinACE' NPSOL returned a non-zero status code 1. The final iterate satisfies the optimality conditions to the accuracy requested, but the sequence of iterates has not yet converged. NPSOL was terminated because no further improvement could be made in the merit function (Mx status GREEN).
- Read more about Two warnings
- 3 comments
- Log in or register to post comments

eigenvalues
Could anybody tell how to correct the following mxAlgebra statement to get the real eigenvalue parts of a matrix A
eigen<-mxAlgebra(Re(eigen(A,only.values=TRUE)$values),"eigen")
When running the model I get the error message:
Error: Unknown reference 'TRUE' detected in the entity 'eigen' in model 'eigen-example'
- Read more about eigenvalues
- 16 comments
- Log in or register to post comments
Pagination
- Previous page
- Page 21
- Next page