View source: R/model_selection.R
get_matrix_r2 | R Documentation |
Calculates regression model r-squared across a matrix of outcomes.
get_matrix_r2(outcomes, residuals, adjusted = F, dof = NULL)
outcomes |
A data frame like object with outcome variables as rows and observations as columns. |
residuals |
A numeric matrix with each column representing the residuals for an outcome.
The ordering follows the row order of |
adjusted |
A boolean indicating if the adjusted r-squared should be calculated in addition to the unadjusted r-squared. |
dof |
An integer denoting the degrees of freedom of the regression model used to compute the residuals. Only required if computing adjusted r-squared. |
A list with the following items:
r2: A numeric value corresponding to the unadjusted r-squared.
adjusted_r2: A numeric value (or NA) corresponding to the adjusted r-squared.
get_residual_matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.