Description Usage Arguments Details Value Examples
The dependent logit stick-breaking process (LSBP) model is estimated using the E(C)M algorithm, which provides the posterior mode.
1 | LSBP_ECM(Formula, data, H, prior, control = control_ECM(), verbose = TRUE)
|
Formula |
An object of class |
data |
A data frame containing the variables of |
H |
An integer indicating the number of mixture components. |
prior |
A list of prior hyperparameters as returned by |
control |
A list as returned by |
verbose |
A logical value indicating whether additional information should be displayed while the algorithm is running. |
The Formula
specification contains the response, separated from the covariates with the symbol '~
', and two sets of covariates. The latters are separated by the symbol '|
', indicating the kernel covariates and the mixing covariates, respectively. For example, one could specify y ~ x1 + x2 | x3 + x4
. NOTE: if the second set of covariates is omitted it is assumed that the two sets are the same.
If offsets
or weights
are provided in the Formula
they will be ignored in the current version.
A predict
method is available and described at predict.LSBP_ECM
.
The output is an object of class 'LSBP_ECM
' containing the following quantities:
param
. A list containing the MAP (Maximum A Posteriori), for each set of coefficients: beta_mixing,beta_kernel,tau
.
cluster
. A n dimensional vector containing, for each observation, the mixture component having with the highest probability.
z
. A n x H
matrix containing the probabilities of belonging to each of the mixture components, where n
denotes the number of observations.
logposterior
. The log-posterior of the model at convergence.
call
. The input Formula
data
. The input data frame.
control
. The control list provided as input.
H
. The input number of mixture components.
prior
. The input prior hyperparameters.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.