box_cox: Compare the Box-Cox Transformation at Different Levels of...

View source: R/operations.R

box_coxR Documentation

Compare the Box-Cox Transformation at Different Levels of λ

Description

Compare the Box-Cox Transformation at Different Levels of λ

Usage

box_cox(X, Y, lambdas, n = NROW(Y))

Arguments

X

An n \times m design matrix, optionally with an intercept column present.

Y

An n-length vector or n \times 1 matrix representing the response.

lambdas

Vector of values of λ. The transformation entails raising Y to the power of λ, or logging it in the case of λ = 0.

n

Number of rows in the design matrix.

Details

This function assess the Box-Cox transformation at different values of λ, the tuning parameter. The best corresponds to the lowest model SSE.

Value

Two-column matrix with the vector of λ in one column and the estimated SSE in the other.


ryan-heslin/RegLesson documentation built on Aug. 5, 2022, 9:03 p.m.