Compute R-squared values for linear regression on grouped data
compute_rsquare.Rd
This function takes a data frame, performs linear regression on specified grouping variables, and computes R-squared values for each group.
Usage
compute_rsquare(data, grouping_by = c("from", "description"))
Arguments
- data
A data frame containing the variables 'actual' and 'estimate' for regression.
- grouping_by
A character vector specifying the grouping variables for regression.