Fits models using a range of taus and picks the best one using maximum
likelihood. Typically only used internally by bumbl()
.
brkpt(
data,
t,
formula,
family = gaussian(link = "log"),
tau_optim_maxit = 100,
...
)
a tibble with a column for the winning tau and a column for the winning model
a dataframe or tibble
the unquoted column name for the time variable in data
a formula passed to glm()
or MASS::glm.nb()
. This should
include the time variable supplied to t
a description of the error distribution and link function.
This is passed to glm()
except in the case of family = "negbin"
, which
causes MASS::glm.nb()
to be used to fit a negative binomial GLM.
passed to optim()
which is used to find the optimal
change point, tau. Mostly used for testing purposes (to force convergence
errors), but could be increased if optimal switchpoint doesn't converge.
additional arguments passed to glm()
or glm.nb()
bumbl()