Learn R Programming

zoid (version 1.3.1)

get_fitted: Extract estimates of predicted latent proportions.

Description

Extract point estimates of compositions from fitted model.

Usage

get_fitted(fitted_model, conf_int = 0.05)

Value

A list containing the posterior summaries of estimated parameters, with element mu (the predicted values in normal space). For predictions in transformed space, or overdispersion, see get_pars()

Arguments

fitted_model

The fitted model returned as an rstan object from the call to zoid

conf_int

Parameter controlling confidence intervals calculated, defaults to 0.05 for 95% intervals

Examples

Run this code
# \donttest{
y <- matrix(c(3.77, 6.63, 2.60, 0.9, 1.44, 0.66, 2.10, 3.57, 1.33),
  nrow = 3, byrow = TRUE
)
# fit a model with no covariates
fit <- fit_zoid(data_matrix = y)
p_hat <- get_fitted(fit)
# }

Run the code above in your browser using DataLab