I am fitting a model with one binary variable and one latent variable. The goal was to estimate the threshold (and then the proportion) of the binary variable. The following syntax worked in OpenMx 1.1.2 but failed in OpenMx 1.2 beta. Attached are the output.
Any suggestions? Thanks in advance.
Mike
### Fitting a binary variable
library(OpenMx)
## Create n=100 binary data with p=.6
my.df <- data.frame(x=c(rep(0,each=40),rep(1,each=60)))
## Starting value for the threshold
st <- qnorm(colMeans(my.df))
my.df$x <- mxFactor(my.df$x, levels=c(0,1))
prop.Model <- mxModel("Binary variable", mxData(my.df, type="raw"),
mxMatrix(type="Full", nrow=1, ncol=2, values=c(0,1), free=FALSE, name="A"),
mxMatrix(type="Diag", nrow=2, ncol=2, values=c(1,1), free=FALSE, name="S"),
mxMatrix(type="Full", nrow=1, ncol=2, values=c(1,0), free=FALSE, name="F"),
mxMatrix(type="Full", nrow=1, ncol=2, values=c(0,0), free=FALSE, name="M"),
mxMatrix(type="Full", nrow=1, ncol=1, free=TRUE, values=st, labels="th1", name="thresh"),
mxRAMObjective("A", "S", "F", "M", dimnames=c("x","f1"),
thresholds="thresh", threshnames=c("x"))
)
prop.fit <- mxRun(prop.Model)
summary(prop.fit)
### OpenMx version (1.2 beta): "999.0.0-1876"
> prop.fit <- mxRun(prop.Model)
Running Binary variable
Error in runHelper(model, frontendStart, intervals, silent, suppressWarnings, :
BLAS/LAPACK routine 'OMXUNS' gave error code -10
### OpenMx version: "1.1.2-1818"
data:
$Binary variable.data
x
0:40
1:60
free parameters:
name matrix row col Estimate Std.Error lbound ubound
1 th1 thresh 1 x -0.3583366 0.1793284
observed statistics: 100
estimated parameters: 1
degrees of freedom: 99
-2 log likelihood: 134.6023
saturated -2 log likelihood: NA
number of observations: 100
chi-square: NA
p: NA
Information Criteria:
df Penalty Parameters Penalty Sample-Size Adjusted
AIC -63.39767 136.6023 NA
BIC -321.30951 139.2075 136.0493
CFI: NA
TLI: NA
RMSEA: NA
timestamp: 2011-12-28 22:30:14
frontend time: 0.1774709 secs
backend time: 0.002981901 secs
independent submodels time: 0.0001196861 secs
wall clock time: 0.1805725 secs
cpu time: 0.1805725 secs
openmx version number: 1.1.2-1818