Skip to contents

Takes the slope from a lme model and its confidence interval.

Usage

compute_lme_slope_df(lme_mod, xdata_col, conf_int = 0.95)

Arguments

lme_mod

An nlme::lme model object from model fitting

xdata_col

An unquoted name of column used as independent data in LME

conf_int

Numeric confidence interval level (default: 0.9)

Value

A tibble with the slope estimate and its lower and upper confidence bounds

Examples

df <- cqtkit_data_verapamil %>% preprocess()

lme_mod <- df %>%
  fit_qtc_linear_model(
      QT,
      RR,
      ID,
      method = 'REML',
      remove_rr_iiv = FALSE
  )

compute_lme_slope_df(lme_mod, RR, 0.9)
#> # A tibble: 1 × 3
#>   slope slope_ci_lower slope_ci_upper
#>   <dbl>          <dbl>          <dbl>
#> 1 0.132          0.119          0.144