Learn R Programming

vtreat (version 0.5.16)

pressStatOfBestLinearFit: Compute the PRESS R-squared statistic of a 1-variable linear model

Description

Compute the PRESS R-squared statistic of a 1-variable linear model

Usage

pressStatOfBestLinearFit(x, y, weights = c(), normalizationStrat = "total")

Arguments

x
numeric (no NAs/NULLs) effective variable
y
numeric (no NAs/NULLs) outcome variable
weights
(optional) numeric, non-negative, no NAs/NULLs at least two positive positions
normalizationStrat
(optional) 'none': no normalization (traditional PRESS), 'total': divide by total variation, 'holdout': divide by 1-hold out variation (PRESS-line, larger than total variation)

Value

  • PRESS statistic of model y ~ a*x + b divided by pressStatOfBestConstant(y,weights), it is an R-squared so 1 is good 0 is bad

See Also

hold1OutMeans