ch.R2: A function calculate the r square from a model fit

View source: R/ch.R2.r

ch.R2R Documentation

A function calculate the r square from a model fit

Description

This function calculates the r2 from a from a model fit. The empirical Y and the fit Y are input. If one wants standardize Y and the fit Y before calculation, then set "standardize" to TRUE.

Usage

ch.R2(y, fitY, standardize = FALSE)

Arguments

y

A numeric vector containing the empirical Y from the data.

fitY

A numeric vector containing the fit Y from the model.

standardize

A boolean that specifies whether to standardize the scores before calculating the BIC. Standardization is useful if you want to combine different DVs into a single BIC (e.g., RT and accuracy). DEFAULT = FALSE. '

Value

the r square.

Examples

ch.r2 (myY, fitY)

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.