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

Description Usage Arguments Value See Also Examples

View source: R/predict.R

Description

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

Usage

1
2
## 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

1
2
3
4
5
6
7
8
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 May 4, 2021, 9:08 a.m.