drop_outliers: Drop outliers from growth panel data.

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

A function that drops growth outliers from panel data.

Usage

1
drop_outliers(tbl, alpha = 0.025, g_var, method = c("drop", "winsorize"))

Arguments

tbl

A tbl of panel data; id “'id“', year “'year“', g_var

g_var

The (quoted or unquoted) name of the growth rate variable to clean.

Value

A tbl of panel data with outliers dropped.

Examples

1
2
3
4
5
asm <- fakedata::fake_panel(N = 10, T = 15) %>% select(-g)

asm %>% drop_outliers(g_var = 'g', method = 'winsorize')

asm %>% add_quantiles(g_var = 'g') %>% drop_outliers(g_var = 'g')

tweed1e/idiosyncratics documentation built on May 29, 2019, 10:51 a.m.