predict.tridim_transformation: Computes posterior samples for the posterior predictive...

View source: R/predict.R

predict.tridim_transformationR Documentation

Computes posterior samples for the posterior predictive distribution.

Description

Predicted values based on the bi/tridimensional regression model object.

Usage

## S3 method for class 'tridim_transformation'
predict(object, newdata = NULL, summary = TRUE, probs = NULL, ...)

Arguments

object

An object of class tridim_transformation

newdata

An optional two column data frame with independent variables. If omitted, the fitted values are used.

summary

Whether summary statistics should be returned instead of raw sample values. Defaults to TRUE

probs

The percentiles used to compute summary, defaults to NULL (no CI).

...

Unused

Value

If summary=FALSE, a numeric matrix iterationsN x observationsN x variablesN. If summary=TRUE, a data.frame with columns "dvindex" with mean for each dependent variable plus optional quantiles columns with names "dvindex_quantile".

See Also

fit_transformation

Examples

euc2 <- fit_transformation(depV1+depV2~indepV1+indepV2,
  NakayaData, transformation = 'euclidean')

# prediction summary
predictions <- predict(euc2)

# full posterior prediction samples
predictions <- predict(euc2, summary=FALSE)

TriDimRegression documentation built on Sept. 13, 2023, 5:07 p.m.