Skip to contents

Prediction function for MFAIR object.

Usage

# S4 method for MFAIR
predict(object, which_factors = seq_len(object@K), add_mean = TRUE)

Arguments

object

A model object for which prediction is desired.

which_factors

Which factors, i.e., which columns of Z and W, are used to make prediction. All K factors are used by default.

add_mean

Logical. Indicate whether to add the mean value. The default value is TRUE.

Value

Predicted matrix with the same dimension as that of Y.