R Functions and User Interface

Scope of functions available to OpenMx
folks,
short and sweet: how can OpenMx access user-written functions and functions from other packages? e.g., i would like to access alpha and sumx in the following code:
alpha <- .3
sumx <- function (x) {
sum(x)
}
x <- c(1, 2, 3)
testModel <- mxModel("testModel", mxAlgebra(expression="alpha * sumx(x)", name="test"))
mxRun(testModel)
- Read more about Scope of functions available to OpenMx
- 2 comments
- Log in or register to post comments

Error messages not informative enough
Example:
Running modelThreshReparam3
Error: The expected covariance matrix associated with the FIML objective in model 'modelThreshReparam3' is not of the same length as the dimnames provided by the objective function.
This should read:
Running modelThreshReparam3
Error: The expected covariance matrix associated with the FIML objective in model 'modelThreshReparam3' is not of the same length as the dimnames provided by the objective function.
The expected covariance matrix is of dimension 4x4, but the length of the dimnames in the objective function is 3
- Read more about Error messages not informative enough
- 5 comments
- Log in or register to post comments

Outputting mxModel
Is there a function to output an mxModel to a file? I was running a simulation, and rather than extracting a few specific elements, I wanted to save the results from each model fit to a file. I tried dput(). While a file was written, I can not retrieve it using dget(). My ideal would be to be able to save the entirety of mxModel for future reference. Ideas?
- Read more about Outputting mxModel
- 2 comments
- Log in or register to post comments

mxFactor
topic for mxFactor
- Read more about mxFactor
- Log in or register to post comments

Acceptable Functions for mxAlgebra
I'm trying to run a model where I need to round a value in an mxMatrix to an integer. I'm doing this in an mxAlgebra. In the help files for mxAlgebra, I noticed that there is no 'round' function listed. (There are lots of other functions: min, max, abs, sum, etc.) Is there a reason for its exclusion, or was it just forgotten?
In R, if you type ?Arith to get the help page for the S4 generic mathematical operators. An mxAlgebra should probably be able to handle all of these, and already does handle most of them.
- Read more about Acceptable Functions for mxAlgebra
- 3 comments
- Log in or register to post comments

mxCI
I wonder if others would like the confidence intervals report to include the initial value in the middle as a convenience
i.e.,
confidence intervals:
lbound estimate ubound top.a[1,1] 0.6275213 0.713 0.7931507 rather than lbound ubound top.a[1,1] 0.6275213 0.7931507
- Read more about mxCI
- 23 comments
- Log in or register to post comments

Default M matrix in type="RAM" models
Hi all,
I'm writing a simple latent change score demo using mxPath, and found something interesting. I believe we've talked about default means models before, but I don't recall.
- Read more about Default M matrix in type="RAM" models
- 4 comments
- Log in or register to post comments

mxAlgebra efficiency
When seeking to optimize mxAlgebra, would there be a speed benefit (or cost?) to saying instead of, for example:
mxAlgebra(rbind (cbind(A+C+E, .5%x%A+C),
cbind(.5%x%A+C , A+C+E) ), name="DZCov")
instead saying:
mxAlgebra( A+C+E , name="ACE")
mxAlgebra( .5%x%A+C+E, name="halfACE")
mxAlgebra(rbind (cbind(ACE, hACE),
cbind(hACE, ACE) ), name="DZCov")
- Read more about mxAlgebra efficiency
- 3 comments
- Log in or register to post comments

Mx1's \mnor and \allint
A recently posted issue requested the implementation of Mx1's \mnor
and \allint
functions, which perform integrations between thresholds on a multivariate normal distribution. This functionality is already being used in FIML Objectives if the data are ordinal (using code supplied by Alan Genz), so the back-end implementation is not difficult.
- Read more about Mx1's \mnor and \allint
- 2 comments
- Log in or register to post comments

Mixture distribution, zygosity example
I seem to have this almost working but for a pesky error:
Error: The job for model 'twinACE' exited abnormally with the error message: Objective returned invalid value.
Execution halted
Script and data files attached (albeit with an extra _ in the name of the latter, ffs).
- Read more about Mixture distribution, zygosity example
- 8 comments
- Log in or register to post comments
Pagination
- Previous page
- Page 3
- Next page