Calculates Q2 predictive relevance statistics based on comparing predictions and real data.
1 
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. 
model 
There are two options for this argument: 1. lavaan script or lavaan parameter
table, or 2. a list containing three matrices

The Q2 statistic is calculated as 1sse/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. If the predicted
data contain the groups
attribute, which indicates the groups used in blindfolding
or crossvalidation, the means are calculated separately for each group excluding the
predicted group from the calculation.
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
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.