Learn R Programming

matrixpls (version 0.7.0)

q2: Q2 predictive relevance statistics

Description

Calculates Q2 predictive relevance statistics based on matrixpls results and crossvalidated predictions.

Usage

q2(object, originalData, predictedData)

Arguments

object
matrixpls estimation result object produced by the matrixpls function.
originalData
A matrix or a data.frame containing the original data.
predictedData
A matrix or a data.frame containing the predicted data that are compared against the original data to calculate the predictive relevance statistic.

Value

  • A list with total, block, and indicator elements containing the Q2 predictive relevance statistics for the full dataset, for each indicator block, and for each indicator

Details

The Q2 statistic is calculated as 1-sse/sso where sse is the sum of squared prediction errors based on comparison of the originalData and predictedData and sso is based on prediction with mean.