WLS with definition variables
- Read more about WLS with definition variables
- 3 comments
- Log in or register to post comments
# Set optimizer for this model
m1 = mxRun(mxOption(m1, "Default optimizer", "NPSOL"))
But
testthat::expect_match(m1@runstate$compute$steps[1][[1]]$engine, "NPSOL")
# Error: m1@runstate$compute$steps[1][[1]]$engine does not match 'NPSOL'. Actual value: "CSOLNP"
Is that a bug in me, mxOption(), or OpenMx?
worked examples
library(OpenMx)
manifests = c("mpg", "disp", "gear")
m1 <- mxModel("ind", type = "RAM",
manifestVars = manifests,
mxPath(from = manifests, arrows = 2),
I've uploaded a gist that shows the issues here: It's a simple independence model with 3 variables in the built-in mtcars data set.
https://gist.github.com/tbates/d2261e8c5daf426e1c8e
You can see that the means are borderline OK, but the variances are way off.
# ===================================
# = Means and variances in the data =
# ===================================
round(diag(cov(mtcars[,manifests])),2)
mpg disp gear
36.32 15360.80 0.54
With a goal of surfacing the almost-always wanted top-level detail for the user, and not showing things that are obtained elsewhere or are not summary data, then 4 elements that can perhaps be dropped are:
1. compute plan
2. data
3. timestamp
4. OpenMx version
Then perhaps a line of text beneath the summary saying:
"See help(OpenMx_Output) for examples of how to easily access expected and obtained data summarys, elapsed time, packageVersion("OpenMx"), the compute plan and more." [1]
Warning messages:
1: In `$.data.frame`(params, lbound) :
Name partially matched in data frame
2: In `$.data.frame`(params, ubound) :
Name partially matched in data frame
v1_6 = paste0("v",1:6) # [1] "v1" "v2" "v3" "v4" "v5" "v6"
x1_2 = c("x1", "x2")
covData <- matrix(nrow=6, ncol=6, byrow=TRUE, dimnames=list(v1_6, v1_6),
data = c(0.9223099, 0.1862938, 0.4374359, 0.8959973, 0.9928430, 0.5320662,
source('https://openmx.ssri.psu.edu/getOpenMxBeta.R')
into the R command line and pressing 'Return'. The OpenMx User Guide for the beta is attached to this announcement.mxStandardizeRAMpaths()
behaves properly when the model contains an mxConstraint
statement. The attached R script causes R to lock up and steadily take up more and more memory until it crashes. Sometimes, R displays a message to the console about std::bad_alloc
before the window closes, but not always.
free parameters:
name matrix row col Estimate Std.Error lbound ubound
1 b11 MZ.b 1 1 2.7536823 0.69611278
2 m1MZ MZ.meanMZ 1 1 20.6886950 0.16960595
3 m2MZ MZ.meanMZ 1 2 20.6934722 0.16988419
4 v1MZ MZ.expCovMZ bmi1 bmi1 0.7213571 0.04326283 1e-04
5 c21MZ MZ.expCovMZ bmi1 bmi2 0.5840681 0.04034537 0
6 v2MZ MZ.expCovMZ bmi2 bmi2 0.7842634 0.04713233 1e-04
7 m1DZ DZ.meanDZ 1 1 20.7833538 0.17188984
We are pleased to announce that OpenMx 1.4 is now available. This version runs under R 3.0 (!) and under windows 64.
As always, you can install OpenMx by copying the command source('http://openmx.psyc.virginia.edu/getOpenMx.R')
into an R session. Please let us know if you encounter any problems installing or running the package.
> ACENonScSLCoraSumm <- summary(ACENonScSLCoraFit)
Error in observedStatisticsHelper(model, expectations[[i]], datalist, :
trying to get slot "type" from an object of a basic class ("NULL") with no slots