multinom_TS_chunk {LDATS} | R Documentation |
Fit a multinomial Time Series model chunk
Description
Fit a multinomial regression model (via
multinom
, Ripley 1996, Venables and Ripley 2002)
to a defined chunk of time (a.k.a. segment)
[chunk$start, chunk$end]
within a time series.
Usage
multinom_TS_chunk(
data,
formula,
chunk,
timename = "time",
weights = NULL,
control = list()
)
Arguments
data |
Class |
formula |
Formula as a |
chunk |
Length-2 vector of times: [1] |
timename |
|
weights |
Optional class |
control |
A |
Value
Fitted model object for the chunk, of classes multinom
and
nnet
.
References
Ripley, B. D. 1996. Pattern Recognition and Neural Networks. Cambridge.
Venables, W. N. and B. D. Ripley. 2002. Modern Applied Statistics with S. Fourth edition. Springer.
Examples
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)
chunk <- c(start = 0, end = 100)
mtsc <- multinom_TS_chunk(dct, formula = gamma ~ 1, chunk = chunk,
timename = "newmoon", weights = weights)