fit.zscore: fit.zscore

Description Usage Arguments Value Author(s) Examples

View source: R/fit.factor.models.R

Description

Function to perform cross-sectional standardization of raw data (vectorized)

Usage

1
fit.zscore(x, dte, w = 1, grp = 1, rob.stats = FALSE)

Arguments

x

vector of data to be standardized

dte

vector of dates (or anything else) used to partition the data

w

optional vector of weights used to calculate weighted mean, defaults to equal weighted

grp

optional vector of group designations used to standardize within groups, defaults to a signle group

rob.stats

logical parameter to subtract the the median rather than the mean, defaults to FALSE

Value

vector of standardized data with a mean near zero and a standard deviation near one

Author(s)

Roger J. Bos, roger.bos@gmail.com

Examples

1
fit.zscore(x = data[['mcap']), dte = data[[date]]), w = data[['weight']]), rob.stats = TRUE)

rogerjbos/fit.factor.models documentation built on July 23, 2020, 3:44 p.m.