Fit a non-homogeneous Poisson process model to the exceedances of a time series.
fit_nhpp.Rd
Fit a non-homogeneous Poisson process model to the exceedances of a time series.
Value
An nhpp
object, which inherits from mod_cpt.
Details
Any time series can be modeled as a non-homogeneous Poisson process of the
locations of the exceedances of a threshold in the series.
This function uses the BMDL criteria to determine the best fit
parameters for each
region defined by the changepoint set tau
.
See also
Other model-fitting:
fit_arima()
,
fit_lmshift()
,
fit_meanshift()
,
fit_meanvar()
,
model_args()
,
model_name()
,
new_fun_cpt()
,
whomademe()
Examples
# Fit an NHPP model using the mean as a threshold
fit_nhpp(DataCPSim, tau = 826)
#> ℹ Model: A nhpp model with 2 region(s).
#> → Each region has 2 parameter(s).
#> → The model has 1 global parameter(s).
# Fit an NHPP model using other thresholds
fit_nhpp(DataCPSim, tau = 826, threshold = 20)
#> ℹ Model: A nhpp model with 2 region(s).
#> → Each region has 2 parameter(s).
#> → The model has 1 global parameter(s).
fit_nhpp(DataCPSim, tau = 826, threshold = 200)
#> ℹ Model: A nhpp model with 2 region(s).
#> → Each region has 2 parameter(s).
#> → The model has 1 global parameter(s).
# Fit an NHPP model using changepoints determined by PELT
fit_nhpp(DataCPSim, tau = changepoints(segment(DataCPSim, method = "pelt")))
#> ℹ Model: A nhpp model with 4 region(s).
#> → Each region has 2 parameter(s).
#> → The model has 1 global parameter(s).