| mlpredict | R Documentation |
Generate predictions for multivariate logistic regression models.
mlpredict(X, fit, names)
X |
Numeric predictor matrix. Predictions are made for each record. Each field represents a predictor variable, and the predictor variables must match (in order) those used to fit the |
fit |
A |
names |
Vector (optional). If provided, then field names in the matrices of the returned list will receive these values. If omitted, then the matrices in the returned list will lack field names. |
Generates posterior predictions for multivariate logistic regression models fit with the mlreg function. Returns a list where each element contains a matrix of posterior predictions for the respective record of X. Field names for the element matrices can optionally be provided with the names argument.
A list whose elements contain numeric matrices of posterior predictions. Within the list, one element is returned for each record of X. Element names are taken from the row names of X.
mlreg for fitting multivariate logistic regression models.
mlformat for formatting output of multivariate logistic regression models.
mlWAIC for computing widely applicable information criteria for multivariate logistic regression models.
# Define example data file path.
path<-system.file("extdata",
"example_mvlogistic_data.rds",
package="LocaTT",
mustWork=TRUE)
# Read in example regression data.
data<-readRDS(file=path)
# Predict with fitted multivariate logistic regression.
out<-mlpredict(X=data$X,fit=data$fit,names=colnames(data$Y))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.