get_limits: Get suitable limits for coordinate system based on the MCMC...

View source: R/visualize-basics.R

get_limitsR Documentation

Get suitable limits for coordinate system based on the MCMC samples of a variable.

Description

Useful for, for example, plotting of distribution.

Usage

get_limits(data, measure, by = NULL, hdi.prob = 0.99, min = NULL, max = NULL)

Arguments

data

A 'tibble' or 'data.frame' that contains a 'measure'.

measure

Name of variable in 'data' for which limits are sought.

by

Optionally, a grouping variable. If not NULL, limits will be returned for each level of this variable. (default: 'NULL')

hdi.prob

Proportion of MCMC samples that are within the limits. (default: .99)

min, max

If min or max are specified, then those limits are returned instead of the HDI-based limits.

Value

Vector with two values.

See Also

TBD


hlplab/MVBeliefUpdatr documentation built on March 29, 2025, 10:42 p.m.