predict.composition: Predicted compositional vector

Description Usage Arguments Value

Description

Computes the predicted composition given a vector of covariates newdata.

Usage

1
2
## S3 method for class 'composition'
predict(object, newdata, n.method = "median", l.bound = NULL, ...)

Arguments

object

Object of class composition from the previous call offitcomp.

newdata

data.frame of predictors.

n.method

If "median" (default), then the number of components is set to the median of the truncated negative binomial distribution, conditional on the estimated parameters; alternatively, it can be set to "mode."

l.bound

Set the lower bound for predicted number of components. If NULL (default), then l.bound is taken from the composition object.

...

additional arguments

Value

Matrix of predicted probabilities of for each component. Rows are MCMC iterations and columns are the components.


ocomposition documentation built on May 2, 2019, 3:30 p.m.