Learn R Programming

vimp (version 2.1.0)

measure_r_squared: Estimate R-squared Compute nonparametric estimate of R-squared.

Description

Estimate R-squared Compute nonparametric estimate of R-squared.

Usage

measure_r_squared(fitted_values, y, weights = rep(1, length(y)), na.rm = FALSE)

Arguments

fitted_values

fitted values from a regression function.

y

the outcome.

weights

weights (IPW, etc.).

na.rm

logical; should NA's be removed in computation? (defaults to FALSE)

Value

A named list of: (1) the estimated R-squared of the fitted regression function, and (2) the estimated influence function.