sbln_explorer | R Documentation |
This function facilitates the creation of Stick-Breaking Logit-Normal priors with user-sepcified properties (median, lower, and upper quantiles for each compartment).
sbln_explorer( n, target_median, target_lower, target_upper, width = 0.9, samples_and_summary = F )
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 |
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.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.