GetModels: Model selection at a known breakpoint

View source: R/GetModels.R

GetModelsR Documentation

Model selection at a known breakpoint


Returns all parameter estimates and log-likelihoods for all possible models at a selected breakpoint. These are:

  • M0 - all parameters equal

  • M1 - μ_1 != μ_2

  • M2 - σ_1 != σ_2

  • M3 - τ_1 != τ_2

  • M4 - μ_1 != μ_2 AND σ_1 != σ_2

  • M5 - μ_1 != μ_2 AND τ_1 != τ_2

  • M6 - σ_1 != σ_2 AND τ_1 != τ_2

  • M7 - all parameters unequal


GetModels(x, t, breakpoint, K = 2, tau = TRUE)



vector of time series values.


vector of times of measurements associated with x.


breakpoint to test (in terms of the INDEX within "t" and "x", not actual time value).


sensitivity parameter. Standard definition of BIC, K = 2. Smaller values of K mean less sensitive selection, i.e. higher likelihood of selecting null (or simpler) models.


whether or not to estimate time scale τ (preferred) or autocorrelation ρ.


Returns a names matrix with 8 rows (one for each model) and columns: Model, LL, bic, mu1, s1, rho1, mu2, s2, rho2. Fairly self-explanatory. Note that the rho columns include the tau values, if tau is TRUE (as it usually should be).


Eliezer Gurarie

See Also

Used directly within WindowSweep. Relies heavily on GetRho.

bcpa documentation built on May 30, 2022, 5:07 p.m.