varLevel: Identify level of aggregation at which a variable in...

View source: R/up.R

varLevelR Documentation

Identify level of aggregation at which a variable in invariant

Description

Shows levels of each variable with respect to grouping formula of form ~id or nested ids ~id1/id2

Usage

varLevel(x, form, ...)

Arguments

x

data frame

form

formula (evaluated in x) to identify clusters

...

extra arguments to constant function

Value

Level 0 is a constant for the whole data frame, Level <= 1 implies the variable is constant within levels of id1, Level <= 2 implies the variable is constant within levels of id2, ... etc.

NOTE: NA counts as a distinct value


gmonette/spida2 documentation built on Aug. 20, 2023, 7:21 p.m.