Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vpcSim() requires that etas set to zero must be in the dataset #341

Closed
billdenney opened this issue Apr 30, 2023 · 3 comments · Fixed by #342
Closed

vpcSim() requires that etas set to zero must be in the dataset #341

billdenney opened this issue Apr 30, 2023 · 3 comments · Fixed by #342

Comments

@billdenney
Copy link
Contributor

I set eta.v ~ 0, and it fit fine, but eta.v is required as a covariate in the dataset for vpcSim():

library(nlmixr2)
#> Warning: package 'nlmixr2' was built under R version 4.2.3
#> Loading required package: nlmixr2data
#> Warning: package 'nlmixr2data' was built under R version 4.2.3

one.cmt <- function() {
  ini({
    tka <- 0.45
    tcl <- log(c(0, 2.7, 100))
    tv <- 3.45
    eta.ka ~ 0.6
    eta.cl ~ 0.3
    eta.v ~ 0
    add.sd <- 0.7
  })
  model({
    ka <- exp(tka + eta.ka)
    cl <- exp(tcl + eta.cl)
    v <- exp(tv + eta.v)
    linCmt() ~ add(add.sd)
  })
}

suppressMessages(
  fit <- nlmixr(one.cmt, theo_sd, est="focei", control = list(print = 0))
)
#> calculating covariance matrix
#> done
vpcSim(fit, pred=TRUE)
#> Model:
#> 
#> param(tka,tcl,tv,add.sd,eta.ka,eta.cl,eta.v);
#> ka~exp(tka+eta.ka);
#> cl~exp(tcl+eta.cl);
#> v~exp(tv+eta.v);
#> rx_yj_~2;
#> rx_lambda_~1;
#> rx_low_~0;
#> rx_hi_~1;
#> rx_pred_f_~linCmtA(rx__PTR__,t,0,1,1,cl,v,0.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,ka,0.0,1.0,0.0,0.0);
#> rx_pred_~rx_pred_f_;
#> rx_r_~(add.sd)^2;
#> ipred=rxTBSi(rx_pred_,rx_lambda_,rx_yj_,rx_low_,rx_hi_);
#> sim=rxTBSi(rx_pred_+sqrt(rx_r_)*err.rxLinCmt,rx_lambda_,rx_yj_,rx_low_,rx_hi_);
#> tad=tad();
#> cmt(rxLinCmt);
#> dvid(1);
#> Error in rxSolveSEXP(object, .ctl, .nms, .xtra, params, events, inits, : The following parameter(s) are required for solving: eta.v

Created on 2023-04-30 with reprex v2.0.2

@mattfidler
Copy link
Contributor

mattfidler commented Apr 30, 2023 via email

@billdenney
Copy link
Contributor Author

Let me try that.

@billdenney
Copy link
Contributor Author

I'm running the current versions of everything, and I'm still getting the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants