predict.nhmm | R Documentation |
This function computes the marginal forward predictions for NHMMs and MNHMMs, where the marginalization is (by default) over individuals and time points, weighted by the latent state probabilities.
## S3 method for class 'nhmm'
predict(
object,
newdata,
newdata2 = NULL,
condition = NULL,
type = c("state", "response", "transition", "emission"),
probs = c(0.025, 0.975),
boot_idx = FALSE,
...
)
## S3 method for class 'mnhmm'
predict(
object,
newdata,
newdata2 = NULL,
condition = NULL,
type = c("state", "response", "transition", "emission"),
probs = c(0.025, 0.975),
boot_idx = FALSE,
...
)
object |
An object of class |
newdata |
A data frame used for computing the predictions. |
newdata2 |
An optional data frame for predictions, in which case the
estimates are differences between predictions using |
condition |
An optional vector of variable names used for conditional predictions. |
type |
A character vector defining the marginal predictions of
interest. Can be one or multiple of |
probs |
A numeric vector of quantiles to compute. |
boot_idx |
Logical indicating whether to use bootstrap samples in
marginalization when computing quantiles. Default is |
... |
Ignored. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.