Select panel organizations by membership type
panel_filter.RdKeeps the rows of organizations whose panel classification matches the given
criteria. The classification is computed from data automatically unless a
precomputed one is supplied.
Usage
panel_filter(x, ...)
# S3 method for class 'data.frame'
panel_filter(
x,
panel_type = NULL,
spell = NULL,
min_obs = NULL,
classification = NULL,
time = "TAX_YEAR",
id = "EIN2",
...
)
# S3 method for class 'panel'
panel_filter(
x,
panel_type = NULL,
spell = NULL,
min_obs = NULL,
assume_fresh = FALSE,
...
)Arguments
- x
A panel data frame or a panel.
- ...
Passed to methods.
- panel_type
Panel types to keep (
persistent,entrant,exit,transient,empty).NULLkeeps all types.- spell
Spell continuity values to keep (
seamless,segmented).NULLkeeps all.- min_obs
Minimum number of observed years per organization.
NULLapplies no minimum.- classification
Optional precomputed classification (from
panel_describe()); computed fromxwhenNULL.- time
Name of the panel-time column.
- id
Name of the panel-ID column.
- assume_fresh
For a panel, skip the label-freshness check. Default
FALSE.
Details
Given a panel, the labels are refreshed first if they are stale
(unless assume_fresh = TRUE), the selection is recorded as a rule, the step
is logged, and the panel is returned.