R/join_d1Etas.R

Defines functions join_d1Etas

join_d1Etas <- function(d1, random) {
  # proceeding etas in dmp
  # note that row names of the etas matrix are not correct in case
  # of multiple IDs; but we are using unique residuals IDs here
  # since the order is the same
  nrandom <- dplyr::bind_cols(random, ID = unique(d1$ID))

  d1 <- dplyr::left_join(d1, nrandom,
                         by = "ID",
                         suffix = c("_input", "")
  )

  list(d1 = d1, rnames = colnames(random))
}

Try the Certara.Xpose.NLME package in your browser

Any scripts or data that you put into this service are public.

Certara.Xpose.NLME documentation built on April 3, 2025, 7:45 p.m.