Skip to content

Commit

Permalink
add an event table to the output of poso_simu_pop #53
Browse files Browse the repository at this point in the history
  • Loading branch information
levenc committed Aug 27, 2024
1 parent bcc94ff commit beb2cf9
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 132 deletions.
8 changes: 3 additions & 5 deletions R/param_estim.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
#' @return If `return_model` is set to `FALSE`, a list of one element: a
#' dataframe `$eta` of the individual values of ETA.
#' If `return_model` is set to `TRUE`, a list of the dataframe of the
#' individual values of ETA, and a rxode2 model using the simulated ETAs.
#' individual values of ETA, `$model` an rxode2 model using the estimated ETAs,
#' `$event` the `data.table` used to solve the returned rxode2 model.
#'
#' @examples
#' # model
Expand Down Expand Up @@ -99,11 +100,7 @@ poso_simu_pop <- function(dat=NULL,prior_model=NULL,n_simul=1000,
ind_eta <- which(diag(omega)>0) # only parameters with IIV
omega_eta <- omega[ind_eta,ind_eta,drop=FALSE]
eta_mat <- matrix(0,nrow=1,ncol=ncol(omega))
<<<<<<< HEAD
first_cov <- data.frame(object$tdm_data[1,object$covariates]) #first value of the covariates
=======
first_cov <- data.frame(object$tdm_data[1,object$covariates])
>>>>>>> ba7565fa07978083aeb0fc5321143658522578a6

if (n_simul > 0) {
eta_mat <- matrix(0,nrow=n_simul,ncol=ncol(omega))
Expand Down Expand Up @@ -147,6 +144,7 @@ poso_simu_pop <- function(dat=NULL,prior_model=NULL,n_simul=1000,
eta_pop$eta,
first_cov,
row.names=NULL))
eta_pop$event <- et_poso
}

return(eta_pop)
Expand Down
1 change: 0 additions & 1 deletion docs/articles/a_priori_dosing.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit beb2cf9

Please sign in to comment.