Attachment | Size |
---|---|
test_data.csv [6] | 16.62 KB |
I am trying to run simulations on an Amazon linux instance and get the following error when I use mxAutoStart()
to generate starting values :
library(devtools) #install_github("sciarraseb/nonlinSims", dependencies = T, force=T) library(easypackages) library(nonlinSims) library(parallel) library(tidyverse) library(OpenMx) library(data.table) test_data <- read_csv(file = 'test_data.csv') model <- create_logistic_growth_model(data_wide = test_data, model_name = 'test') model <- mxAutoStart(model) Error in solve.default(I - A) : system is computationally singular: reciprocal condition number = 0
Here is the output provided when calling traceback()
:
12: solve.default(I - A) 11: solve(I - A) 10: genericGetExpected(model[[subname]]$expectation, model, component, defvar.row, subname) 9: genericGetExpected(model[[subname]]$expectation, model, component, defvar.row, subname) 8: mxGetExpected(model, c("covariance", "means", "thresholds"), subname = subname) 7: autoStartDataHelper(model, type = type) 6: mxModel(model, autoStartDataHelper(model, type = type)) 5: omxBuildAutoStartModel(model, type) 4: is(model, "MxModel") 3: warnModelCreatedByOldVersion(model) 2: mxRun(omxBuildAutoStartModel(model, type), silent = TRUE) 1: mxAutoStart(model)
I have provided other pertinent information below (i.e., R version, optimizer used in OpenMx, etc.):
OpenMx version: 2.19.8 [GIT v2.19.8] R version: R version 4.0.2 (2020-06-22) Platform: x86_64-koji-linux-gnu Default optimizer: SLSQP NPSOL-enabled?: No OpenMP-enabled?: Yes
Interestingly, the error appearing on the Amazon instance does not appear when I run the code offline in RStudio (on either Mac or Windows). Here is the output provided by mxVersion()
in the offline version of R that I am using:
OpenMx version: 2.19.8 [GIT v2.19.8] R version: R version 4.0.5 (2021-03-31) Platform: x86_64-apple-darwin17.0 MacOS: 12.0.1 Default optimizer: SLSQP NPSOL-enabled?: No OpenMP-enabled?: No
I have also attached the data set (test_data.csv
). I have written create_logistic_growth_model()
and posted it in a GitHub repository (hopefully you can download the package to use the function). I can provide more information about this function if necessary.