| prob_step | R Documentation |
Computes the posterior probability that a step change is increasing (positive) or decreasing (negative)
prob_step(x, positive = TRUE, Delta = NULL)
x |
A 'birp' object. |
positive |
Logical. If 'TRUE' (default), returns the posterior
probability of an increasing (positive) step change,
|
Delta |
Integer. Index of the Delta parameter for which to return the posterior probability. If 'NULL' (default), posterior probabilities for all Delta parameters are returned. |
If 'Delta = NULL', a numeric vector containing posterior probabilities for all step change parameters. Otherwise, a single numeric value.
[birp()]
data <- simulate_birp()
est <- birp(data, change = "step")
# Posterior probabilities of positive step changes
prob_step(est)
# Posterior probability for a specific Delta
prob_step(est, Delta = 1)
# Posterior probabilities of negative step changes
prob_step(est, positive = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.