standardize_wt: Weighted Standardization

View source: R/utils.R

standardize_wtR Documentation

Weighted Standardization

Description

Performs weighted standardization of x variables. Used in fastridge.

Usage

standardize_wt(x, weights = rep(1/n, n), intercept = TRUE, return.sd = FALSE)

Arguments

x

Regressor matrix.

weights

Weights.

intercept

Logical. If TRUE, adds an intercept.

return.sd

Logical. If TRUE, it returns standard errors for the means.

Value

If return.sd == FALSE, it gives the matrix of standardized regressors. If return.sd == TRUE, then it returns the vector of standard errors of the means of the variables.


penppml documentation built on Sept. 8, 2023, 5:58 p.m.