sbln_explorer: Stick-Breaking Logit-Normal Explorer

View source: R/rsbln.R

sbln_explorerR Documentation

Stick-Breaking Logit-Normal Explorer

Description

This function facilitates the creation of Stick-Breaking Logit-Normal priors with user-sepcified properties (median, lower, and upper quantiles for each compartment).

Usage

sbln_explorer(
  n,
  target_median,
  target_lower,
  target_upper,
  width = 0.9,
  samples_and_summary = F
)

Arguments

n

number of samples to simulate when fitting parameters

target_median

Named vector containing target median values of each compartment. The sum of target_median is used as the population size.

target_lower

Named vector containing target lower quantile value of each compartment. One compartment (the same as in target_upper) should be specified as NA.

target_upper

Named vector containing target upper quantile value of each compartment. One compartment (the same as in target_lower) should be specified as NA.

width

float indicating the width of the interval used to determine the quantiles for target_lower and target_upper

samples_and_summary

logical indicating if the samples from the stick-breaking logit-normal should be returns and compared to the desired median, lower, and upper quantiles

Value

R code that can be used to call stem_initializer to describe an sbln with the desired properties. If samples_and_summary is TRUE, samples from this prior and a summary of these samples are also returned.

Examples

sbln_explorer(n = 10000, target_median = c(S = 980, I = 20, R = 1), target_lower = c(S = 950, I = 5, R = NA), target_upper = c(S = 990, I = 40, R = NA), samples_and_summary = T)

fintzij/stemr documentation built on March 25, 2022, 12:25 p.m.