Description Usage Arguments Value References Examples
Fit a set of multinomial regression models (via
multinom, Venables and Ripley 2002) to a time series
of data divided into multiple segments (a.k.a. chunks) based on given
locations for a set of change points.
check_multinom_TS_inputs checks that the inputs to
multinom_TS are of proper classes for an analysis.
1 2 3 4 5 6 |
data |
|
formula |
|
changepoints |
Numeric vector indicating locations of the change
points. Must be conformable to |
timename |
|
weights |
Optional class |
control |
A |
multinom_TS: Object of class multinom_TS_fit,
which is a list of [1]
chunk-level model fits ("chunk models"), [2] the total log
likelihood combined across all chunks ("logLik"), and [3] a
data.frame of chunk beginning and ending times ("logLik"
with columns "start" and "end").
check_multinom_TS_inputs: an error message is thrown if any
input is improper, otherwise NULL.
Venables, W. N. and B. D. Ripley. 2002. Modern and Applied Statistics with S. Fourth Edition. Springer, New York, NY, USA.
1 2 3 4 5 6 7 8 9 | data(rodents)
dtt <- rodents$document_term_table
lda <- LDA_set(dtt, 2, 1, list(quiet = TRUE))
dct <- rodents$document_covariate_table
dct$gamma <- lda[[1]]@gamma
weights <- document_weights(dtt)
check_multinom_TS_inputs(dct, timename = "newmoon")
mts <- multinom_TS(dct, formula = gamma ~ 1, changepoints = c(20,50),
timename = "newmoon", weights = weights)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.