beta_sigma_names: Unique names for beta_sigma

Description Usage Arguments Details Value Examples

Description

Returns adapted names for the coefficients β_σ to distinguish them from the names of the coefficients β_μ. This is a helper function which is used in situations where it is necessary or convenient for the coefficient names of β_σ to be different from β_μ.

Usage

1

Arguments

beta_mu_names

Character vector with the names of the coefficients β_μ

beta_sigma_names

Character vector with the names of the coefficients β_σ

...

Additional arguments, not used in the current implementation

Details

When the name of at least one coefficient in β_σ is equal to one of the names of the coefficients in β_μ, the string '_s' is appended to the names of all coefficients in β_σ. Otherwise, the names of the coefficients in β_σ are left unchanged.

Value

Named character vector with the names of the coefficients β_σ. The name of a vector element is the original name of the coefficient. The value is the adapted name. The name and the value are equal if no adaptation was needed.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# If the names in beta_sigma are all different from all of the names in
# beta_mu, the function returns the names of beta_sigma
mu_names = c("(Intercept)", "age", "gender")
sigma_names = c("(Intercept_s)", "smoker", "job_code")

beta_sigma_names(mu_names, sigma_names)

# If at least one of the names in beta_sigma is equal to a name in
# beta_mu, all the names in beta_sigma get the string '_s' appended,
# except for '(intercept_s)'
sigma_names = c("(Intercept_s)", "age", "job_code")

beta_sigma_names(mu_names, sigma_names)

lmvar documentation built on May 16, 2019, 5:06 p.m.