How to add CIs in umx?
_Here is my information about version and optimizer._
umx version: 3.0.1
OpenMx version: 2.14.11 [GIT v2.14.11]
R version: R version 3.5.3 (2019-03-11)
Platform: x86_64-apple-darwin15.6.0
MacOS: 10.14.6
Default optimizer: SLSQP
_Here is my script._
setwd("....")
getwd()
# Load Data; return a data frame
data <- read.spss(".....", to.data.frame = TRUE)
# Pick the variables
selDVs = c("x","y","z")
mzData <- subset(data, zygosity=="1")
dzData <- subset(data, zygosity=="2")
umx_set_optimizer(opt = "SLSQP")
# Common Pathway Models
cp <- umxCP(selDVs = selDVs, dzData = dzData, mzData = mzData, sep = "",tryHard = "yes")
cp <- umxCI(cp, run = "yes")
_Here is the output_
lbound estimate ubound lbound Code ubound Code
a_cp_r1c1 NA 0.806 NA NA NA
c_cp_r1c1 NA 0.000 NA NA NA
e_cp_r1c1 NA 0.592 NA NA NA
top.as_std[1,1] NA 0.000 NA NA NA
top.as_std[2,1] NA 0.000 NA NA NA
top.as_std[3,1] NA 0.000 NA NA NA
top.as_std[1,2] NA 0.000 NA NA NA
top.as_std[2,2] NA 0.000 NA NA NA
top.as_std[3,2] NA 0.000 NA NA NA
top.as_std[1,3] NA 0.000 NA NA NA
top.as_std[2,3] NA 0.000 NA NA NA
top.as_std[3,3] NA 0.067 NA NA NA
top.cs_std[1,1] NA 0.452 NA NA NA
top.cs_std[2,1] NA 0.000 NA NA NA
top.cs_std[3,1] NA 0.000 NA NA NA
top.cs_std[1,2] 0 0.000 NA 3 NA
top.cs_std[2,2] NA 0.172 NA NA NA
top.cs_std[3,2] NA 0.000 NA NA NA
top.cs_std[1,3] NA 0.000 NA NA NA
top.cs_std[2,3] NA 0.000 NA NA NA
top.cs_std[3,3] NA 0.315 NA NA NA
top.es_std[1,1] NA 0.708 NA NA NA
top.es_std[2,1] NA 0.000 NA NA NA
top.es_std[3,1] NA 0.000 NA NA NA
top.es_std[1,2] NA 0.000 NA NA NA
top.es_std[2,2] NA 0.472 NA NA NA
top.es_std[3,2] NA 0.000 NA NA NA
top.es_std[1,3] NA 0.000 NA NA NA
top.es_std[2,3] NA 0.000 NA NA NA
top.es_std[3,3] NA 0.510 NA NA NA
top.cp_loadings_std[1,1] NA 0.543 NA NA NA
top.cp_loadings_std[2,1] NA 0.864 NA NA NA
top.cp_loadings_std[3,1] NA 0.797 NA NA NA
expMean_Rumination1 NA 24.225 NA NA NA
expMean_Anxiety1 NA 38.829 NA NA NA
expMean_Depression1 NA 41.378 NA NA NA
as_r1c1 NA 0.000 NA NA NA
as_r2c2 NA 0.000 NA NA NA
as_r3c3 NA 0.590 NA NA NA
cs_r1c1 NA 2.677 NA NA NA
cs_r2c2 NA 1.516 NA NA NA
cs_r3c3 NA 2.766 NA NA NA
es_r1c1 NA 4.194 NA NA NA
es_r2c2 NA 4.152 NA NA NA
es_r3c3 NA 4.486 NA NA NA
cp_loadings_r1c1 NA 3.213 NA NA NA
cp_loadings_r2c1 NA 7.598 NA NA NA
cp_loadings_r3c1 NA 7.006 NA NA NA
[1] "NA: "
[1] "3: The nonlinear constraints and bounds could not be satisfied. The problem may have no feasible solution."
See GitHub umx
Please see this thread: https://github.com/tbates/umx/issues/108 for responses. Data may be at issue (check out correlations between variables).
PS testing to see if website is emailing correctly as it was broken for a few weeks.
Log in or register to post comments
So everything is NA except
cp <- umxCP(selDVs = selDVs, dzData = dzData, mzData = mzData, sep = "",tryHard = "yes")
cp <- umxCI(cp, run = "no")
cpci <- mxRun(cp)
summary(cpci,verbose=T)
Log in or register to post comments
Hello,
I am having a similar problem. I have built a common pathway model using umxCP() with 10 manifest variables and 1 common factor. Although mxCheckIdentification() says that the model is identified, when computing the CIs, several NAs appear where the lower and upper CIs should be (see attached image). I have followed this discussion https://github.com/tbates/umx/issues/109 but I am not sure about the conclusion. Does it mean that that the NAs at lbound and ubound positions should be considered as being equal to the estimated value for the parameter? Does it also apply for non-identified models?
I ran a second model, also using umxCP() but this time with 7 manifest variables (different set) and 1 common factor. I dont understand why mxCheckIdentification() says that the model is not identified (shouldnt a model with 7 manifest variables be identified?). After dropping the non-identified parameters the model is identified but first, I am not sure this is a correct way to obtain the identified model and second, the CIs for the resulting identified model still contain NAs.
Would you please help me by telling me how I can proceed? Alternatively I though about just running several models after dropping paths and then choosing the one with the lowest AIC. However, I still get non-identified models and I will most likely be asked to report CIs, which wont appear completely. I read in other forums that this (non-identified model with 7 manifest variables) could be a problem of the data itself. What is meant by this? which problems or indicators of problems in my data should I look for?
Thank you very much.
Log in or register to post comments
In reply to Hello, by quino
more information please; currently seems is identification issue
The poster made an unidentified model. And OpenMx has an [open bug request](https://github.com/OpenMx/OpenMx/issues/78) to not replace found values with NAs, but that's where they come from.
Log in or register to post comments
Model identification and CI
Thank you for your answer. I am sorry for the confusion brought up by posting here. Basically I have 2 questions:
1. How can I obtain CI intervals from a CPM built up with umxCP()?. According to mxCheckIdentification() the model is identified. I understand that there is an open bug request and thus using umxConfint(model, parm= "smart", run = TRUE) wont entirely work and will bring NAs. I also tried using verbose=TRUE but I get the same NAs. This happens even with a simple ACE univariate model.
2. About model identification: I have 2 sets of 10 manifest variables. When building exact equal CPMs, one truns out to be identified but the other doesnt. My belief is that this implies a data problem more than a modelling problem. I am not sure about this but if yes, what kind of problems should I look into and how can I correct them, if they can be corrected at all? Low intrapair correlations, missing data for only one twin...?
Thank you very much.
Log in or register to post comments