are_varying: Check if variables are constant or variable over time.

Description Usage Arguments Value Examples

View source: R/panel_data.R

Description

This function is designed for use with panel_data() objects.

Usage

1
are_varying(data, ..., type = "time")

Arguments

data

A data frame, typically of panel_data() class.

...

Variable names. If none are given, all variables are checked.

type

Check for variance over time or across individuals? Default is "time". "individual" considers variables like age to be non-varying because everyone ages at the same speed.

Value

A named logical vector. If TRUE, the variable is varying.

Examples

1
2
wages <- panel_data(WageData, id = id, wave = t)
wages %>% are_varying(occ, ind, fem, blk)

panelr documentation built on Jan. 18, 2021, 5:06 p.m.