diff options
author | Johannes Ranke <johannes.ranke@jrwb.de> | 2025-09-12 22:16:13 +0200 |
---|---|---|
committer | Johannes Ranke <johannes.ranke@jrwb.de> | 2025-09-12 22:16:13 +0200 |
commit | 17af45b984d348505527140470c7fff204748ea6 (patch) | |
tree | 4a7409236626c86e07746f7dfc736745f83a99d6 /R/endpoints.R | |
parent | 3ae975f6039da0edc3ae6298bcac388e7346e73f (diff) |
Facilitate centering covariates
The motivation for this is to obtain confidence intervals for
covariate dependent parameters that are valid for a median/mean
value of the covariate.
Implementation by adding an argument to the 'saem' function, and
adapting the relevant functions working with 'saem' objects.
Vignettes, the template and tests were updated to use the new functionality.
Diffstat (limited to 'R/endpoints.R')
-rw-r--r-- | R/endpoints.R | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/R/endpoints.R b/R/endpoints.R index c3e0a0d3..70a9eef3 100644 --- a/R/endpoints.R +++ b/R/endpoints.R @@ -45,6 +45,7 @@ endpoints <- function(fit, covariates = NULL, covariate_quantile = 0.5) { if (!is.null(fit$covariate_models)) { if (is.null(covariates)) { + # Use covariate quantiles if no explicit covariates are given covariates = as.data.frame( apply(fit$covariates, 2, quantile, covariate_quantile, simplify = FALSE)) |