| smoothbp | R Documentation |
Fit a hierarchical piecewise regression model with smoothed change-points
smoothbp(
formula,
b0 = ~1,
b1 = ~1,
deltas = list(~1),
omega = list(~1),
rho = list(~1),
data,
priors = smoothbp_priors(),
chains = 4L,
iter = 2000L,
warmup = 1000L,
seed = NULL,
step_om = 0.3,
step_rho = 0.3,
target_accept = 0.9,
cores = getOption("smoothbp.cores", 1L),
hierarchical = NULL,
reparameterise = c("none", "omega"),
.verbose = TRUE
)
formula |
A two-sided formula identifying the response and time variable,
e.g. |
b0 |
One-sided formula for the |
b1 |
One-sided formula for |
deltas |
List of one-sided formulas for slope changes. Default |
omega |
List of one-sided formulas for change-point locations. Default |
rho |
List of one-sided formulas for transition sharpness. Default |
data |
A data frame. |
priors |
A |
chains |
Number of chains. Default 4. |
iter |
Total iterations per chain. Default 2000. |
warmup |
Warmup iterations. Default 1000. |
seed |
Random seed. |
step_om |
Initial HMC/MH step size for omega. |
step_rho |
Initial HMC/MH step size for rho. |
target_accept |
Target HMC acceptance probability (default 0.9).
Raise toward 0.99 if you see divergent transitions in the sharpness
( |
cores |
Number of CPU cores. |
hierarchical |
Deprecated. Character vector; which parameters
should be treated as hierarchical. This argument is no longer needed:
random effects on change-point timing are auto-detected from
|
reparameterise |
Character specifying the parameterisation for random change-points:
|
.verbose |
Print progress. |
A smoothbp_fit object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.