compute_fitted_mean: Compute estimated concentration

Description Usage Arguments See Also

View source: R/functions_exposure_model.R

Description

Calculates the posterior mean exposure concentrations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
compute_fitted_mean(
  stanfit,
  standata,
  parvalues = NULL,
  include_time = TRUE,
  include_reI = TRUE,
  exp_transform = FALSE,
  add = FALSE,
  ...
)

Arguments

stanfit

Fitted STAN model object containing posterior samples of parameters; from sample_exposure_model.

standata

List containing model structure information corresponding to stanfit. Typically a list of class standata_exposure. However, it may be any list (or data frame) containing cluster_of_obs (if etaK was sampled in stanfit), group_of_obs (if etaK was not sampled in stanfit), unit_of_obs (if include_reI=TRUE), and Mt (if include_time=TRUE). This may be useful when calculating fitted means for records at different times from the observations used to fit the model.

parvalues

List of parameter values to use for computing means. Not needed if stanfit is provided.

include_time

Logical indicator of whether time should be included.

include_reI

Logical indicator of whether the unit-level random effect should be included.

exp_transform

Logical indicator of whether concentrations should be exponentiated.

add

Logical indicator of whether the modeled means should be added to standata or just returned directly (the default).

...

Additional arugments passed to extract.

See Also

plot_exposure_means_bytime, sample_exposure_model


jpkeller/bercs documentation built on March 24, 2021, 5:36 a.m.