add_quantiles: Calculate quantiles in panel data.

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

A function that calculates quantiles in panel data

Usage

1
add_quantiles(tbl, alpha = 0.025, t_var = "year", g_var)

Arguments

tbl

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

alpha

Defines the alpha [lower] and (1-alpha) [upper] quantiles to calculate.

g_var

The (quoted or unquoted) name of the growth rate variable to calculate the quantiles for.

Value

A tbl of panel data with quantiles added (named 'low' and 'high')

Examples

1
2
asm <- fakedata::fake_panel(N = 10, T = 15)
asm %>% add_quantiles(alpha = 0.05, g_var = 'g')

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