Used internally for most mcp functions.
get_segment_table(model, data = NULL, family = gaussian(), par_x = NULL)Arguments model
A list of formulas - one for each segment. The first formula has the format response ~ predictors
while the following formulas have the format response ~ changepoint ~ predictors
. The response and change points can be omitted (changepoint ~ predictors
assumes same response. ~ predictors
assumes an intercept-only change point). The following can be modeled:
Regular formulas: e.g., ~ 1 + x
). Read more.
Extended formulas:, e.g., ~ I(x^2) + exp(x) + sin(x)
. Read more.
Variance: e.g., ~sigma(1)
for a simple variance change or ~sigma(rel(1) + I(x^2))
) for more advanced variance structures. Read more
Autoregression: e.g., ~ar(1)
for a simple onset/change in AR(1) or ar(2, 0 + x
) for an AR(2) increasing by x
. Read more
Data.frame or tibble in long format.
familyOne of gaussian()
, binomial()
, bernoulli()
, or poission()
. Only default link functions are currently supported.
String (default: NULL). Only relevant if no segments contains slope (no hint at what x is). Set this, e.g., par_x = "time".
ValueA tibble with one row describing each segment and the corresponding code.
Examplesmodel = list( y ~ 1 + x, 1 + (1|id) ~ 1 ) get_segment_table(model)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4