Skip to contents

Extends the random-slope longitudinal model by modelling the subject intercept, mean slope, and random-slope standard deviation using separate subject-level design matrices.

The intercept column generated by each formula is removed. The separately specified intercept parameter is the reference-level value except for the exponential parametrization, whose reference-level value is one. linear uses intercept + X beta, proportional uses intercept * (1 + X beta), exponential uses intercept ^ (X beta), and log-linear uses exp(intercept + X beta).

Usage

LongitudinalRandomSlopeCov(
  mu_formula = ~study,
  slope_mu_formula = ~arm,
  slope_sigma_formula = ~arm,
  mu_parametrization = "linear",
  slope_mu_parametrization = "linear",
  slope_sigma_parametrization = "log-linear",
  mu_intercept_prior = prior_normal(30, 10),
  mu_coefficients_prior = prior_normal(0, 3),
  slope_mu_intercept_prior = prior_normal(1, 3),
  slope_mu_coefficients_prior = prior_normal(0, 3),
  slope_sigma_intercept_prior = prior_normal(0, 1.5),
  slope_sigma_coefficients_prior = prior_normal(0, 1.5),
  sigma = prior_lognormal(0, 1.5),
  scaled_variance = FALSE
)

Arguments

mu_formula

(formula) One-sided formula for subject-level covariate effects on the subject intercept.

slope_mu_formula

(formula) One-sided formula for subject-level covariate effects on the mean slope.

slope_sigma_formula

(formula) One-sided formula for subject-level covariate effects on the slope standard deviation.

mu_parametrization

(character) Parametrization of the subject intercept predictor.

slope_mu_parametrization

(character) Parametrization of the mean slope predictor.

slope_sigma_parametrization

(character) Parametrization of the slope standard deviation predictor. Only "exponential" and "log-linear" are supported.

mu_intercept_prior

(Prior) Prior for the intercept of the subject intercept predictor.

mu_coefficients_prior

(Prior) Prior for the covariate coefficients of the subject intercept predictor.

slope_mu_intercept_prior

(Prior) Prior for the intercept of the mean slope predictor.

slope_mu_coefficients_prior

(Prior) Prior for the covariate coefficients of the mean slope predictor.

slope_sigma_intercept_prior

(Prior) Prior for the intercept of the slope standard deviation predictor.

slope_sigma_coefficients_prior

(Prior) Prior for the covariate coefficients of the slope standard deviation predictor.

sigma

(Prior) Prior for the observation-error standard deviation.

scaled_variance

(logical) Whether to use multiplicative observation error.

Value

A LongitudinalRandomSlopeCov object.

Slots

mu_formula

(formula) Formula for the subject intercept.

slope_mu_formula

(formula) Formula for the mean slope.

slope_sigma_formula

(formula) Formula for the random-slope standard deviation.

mu_parametrization

(character) Parametrization for the subject intercept.

slope_mu_parametrization

(character) Parametrization for the mean slope.

slope_sigma_parametrization

(character) Parametrization for the slope standard deviation.

Examples

LongitudinalRandomSlopeCov()
#> 
#> Random Slope with Covariates Longitudinal Model (additive error) with parameters:
#>     lm_rsc_mu_intercept ~ normal(mu = 30, sigma = 10)
#>     lm_rsc_mu_coefficients ~ normal(mu = 0, sigma = 3)
#>     lm_rsc_slope_mu_intercept ~ normal(mu = 1, sigma = 3)
#>     lm_rsc_slope_mu_coefficients ~ normal(mu = 0, sigma = 3)
#>     lm_rsc_slope_sigma_intercept ~ normal(mu = 0, sigma = 1.5)
#>     lm_rsc_slope_sigma_coefficients ~ normal(mu = 0, sigma = 1.5)
#>     lm_rsc_sigma ~ lognormal(mu = 0, sigma = 1.5)
#>     lm_rsc_ind_rnd_slope ~ <None>
#>