fitted.jags_analysis: JAGS analysis fitted values

Description Usage Arguments Value See Also

Description

Calculate fitted values with credible limits for a JAGS analysis

Usage

1
2
3
4
5
## S3 method for class 'jags_analysis'
fitted(object, parm = "prediction",
  model_id = default_model_id(object), derived_code = NULL,
  random_effects = NULL, level = "current", estimate = "current",
  data = NULL, ...)

Arguments

object

a jags_analysis object.

parm

a character scalar naming the derived parameter for which the estimates should be calculated (default = "prediction").

model_id

a count or string specifying the jags model to select.

derived_code

a character scalar defining a block in the JAGS dialect of the BUGS language that defines one or more derived parameters for each row of data. If NULL derived_code is as defined by the JAGS model for which the JAGS analysis was performed.

random_effects

a named list which specifies which parameters to treat as random variables. If NULL random is as defined by the JAGS model for which the JAGS analysis was performed.

level

a numeric scalar specifying the significance level or a character scalar specifying which mode the level should be taken from. By default the level is as currently specified by opts_jagr in the global options.

estimate

a character scalar specifying whether the point estimate should be the "mean" or the "median" or a character scalar indicating which mode the level should be taken from. By default the estimate is as currently specified by opts_jagr in the global options.

data

the dataset for which to calculate the residuals. By default data is NULL as the residuals are typically calculated on the original dataset.

...

further arguments passed to or from other methods.

Value

the original data frame with the point estimate and lower and upper credibility limits for the derived parameter of interest

See Also

jags_model, jags_analysis and predict.jags_analysis


poissonconsulting/jaggernaut documentation built on Feb. 18, 2021, 11:10 p.m.