nlmixr2 / nonmem2rx

nonmem2rx
https://nlmixr2.github.io/nonmem2rx/
9 stars 0 forks source link

Check to make sure that observations are captured for validation #125

Open mattfidler opened 1 year ago

mattfidler commented 1 year ago
sliao999 commented 1 year ago

This can be a very useful R package for our modeling work. However, I tried to use it for two of the nonmem mod files, and none of them work. Error occurred and I have no way to resolve these issues. For example, the last issue I got this. mod <- nonmem2rx("run502.mod") ℹ getting information from 'run502.mod' ℹ reading in xml file lotri syntax error:

lotri error: lower triangular matrix not correct size did you mean something like: theta1 + theta2 + theta3 + theta4 + theta5 + theta6 + theta7 + theta8 + theta9 + theta10 + theta11 + theta12 + theta13 + eta1 + omega.1.2 + omega.1.3 + omega.1.4 + omega.1.5 + omega.1.6 + omega.1.7 + omega.1.8 + omega.1.9 + omega.1.10 + omega.1.11 + omega.1.12 + eta2 + omega.2.3 + omega.2.4 + omega.2.5 + omega.2.6 + omega.2.7 + omega.2.8 + omega.2.9 + omega.2.10 + omega.2.11 + omega.2.12 + eta3 + omega.3.4 + omega.3.5 + omega.3.6 + omega.3.7 + omega.3.8 + omega.3.9 + omega.3.10 + omega.3.11 + omega.3.12 + eta4 + omega.4.5 + omega.4.6 + omega.4.7 + omega.4.8 + omega.4.9 + omega.4.10 + omega.4.11 + omega.4.12 + eta5 + omega.5.6 + omega.5.7 + omega.5.8 + omega.5.9 + omega.5.10 + omega.5.11 + omega.5.12 + eta6 + omega.6.7 + omega.6.8 + omega.6.9 + omega.6.10 + omega.6.11 + omega.6.12 + eta7 + omega.7.8 + omega.7.9 + omega.7.10 + omega.7.11 + omega.7.12 + eta8 + omega.8.9 + omega.8.10 + omega.8.11 + omega.8.12 + eta9 + omega.9.10 + omega.9.11 + omega.9.12 + eta10 + omega.10.11 + omega.10.12 + eta11 + omega.11.12 + eta12 + eps1+v1+v2+v3+v4+v5+v6+v7+v8+v9+v10+v11+v12+v13+v14+v15+v16+v17+v18+v19+v20+v21+v22+v23+v24+v25+v26+v27~c(1.30441367197642,

sliao999 commented 1 year ago

It seems to have problem with between occasion variability (BOV) of the model. When I tried the same model without BOV, I got different errors.

setwd("E:\MicuRX\poppk1\run401f.nm7") mod <- nonmem2rx("run401f.mod") ℹ getting information from 'run401f.mod' ℹ reading in xml file ℹ done ℹ reading in phi file ℹ done ℹ reading in lst file ℹ abbreviated list parsing ℹ done ℹ done ℹ splitting control stream by records ℹ done ℹ Processing record $INPUT ℹ Processing record $MODEL ℹ Processing record $THETA ℹ Processing record $OMEGA ℹ Processing record $SIGMA ℹ Processing record $PROBLEM ℹ Processing record $DATA ℹ Processing record $SUBROUTINES ℹ Processing record $PK ℹ Processing record $DES ℹ Processing record $ERROR ℹ Processing record $ESTIMATION ℹ Ignore record $ESTIMATION ℹ Processing record $COVARIANCE ℹ Ignore record $COVARIANCE ℹ Processing record $TABLE ℹ change initial estimate of theta1 to 16.9184465874669 ℹ change initial estimate of theta2 to 29.0692797324232 ℹ change initial estimate of theta3 to 2.43235177034855 ℹ change initial estimate of theta4 to 1.34653279917032 ℹ change initial estimate of theta5 to 0.304490361221458 ℹ change initial estimate of theta6 to 2.5 ℹ some correlations may have been dropped for the variables: eta1, eta2 ℹ the piping should specify the needed covariances directly ℹ change initial estimate of eta1 to 0.0722553408614083 ℹ add covariance between eta2 and eta1 with initial estimate 0.0650039024597345 ℹ change initial estimate of eta2 to 0.0700334194752202 ℹ some correlations may have been dropped for the variables: eta3, eta4 ℹ the piping should specify the needed covariances directly ℹ change initial estimate of eta3 to 0.16268513883389 ℹ add covariance between eta4 and eta3 with initial estimate 0.0352032351476214 ℹ change initial estimate of eta4 to 0.376883716036017 ℹ read in nonmem input data (for model validation): E:\MicuRX\poppk1\nm1.csv ℹ ignoring lines that begin with 'C' ℹ applying names specified by $INPUT ℹ subsetting accept/ignore filters code: .data[-which((.data$FLAG == 1 | .data$FED == 0)),] ℹ done ℹ read in nonmem IPRED data (for model validation): E:\MicuRX\poppk1\run401f.nm7\run401f.fit ℹ done ℹ changing most variables to lower case ℹ done ℹ replace theta names ℹ done ℹ replace eta names ℹ done ℹ renaming compartments ℹ done ℹ solving ipred problem Error : 'alag(.)'/'rate(.)'/'dur(.)' cannot depend on the state values ℹ done ℹ solving pred problem Error : 'alag(.)'/'rate(.)'/'dur(.)' cannot depend on the state values ℹ done

sliao999 commented 1 year ago

'alag(.)'/'rate(.)'/'dur(.)' none of these parameters were defined in the mod file. Any ideal to resolve this problem?

mattfidler commented 1 year ago

Hi @sliao999 I hid these since they are not really related to the mtime issue; I have moved them to their own issue