Description Usage Arguments Details Value Examples
View source: R/balance_panel.r
Balances a panel of unit-time data. Filters out units that are missing observations.
1 2 |
df |
a tibble |
unit |
(optional) the unit variable, default is unit |
time |
(optional) the time variable, default is time |
start |
(optional) the first year in the panel (int), default is minimum observed |
stop |
(optional) the last year in the panel (int), default is the maximum observed |
complete_obs |
(optional) require units to be observed in all time periods? default is true. |
Give a panel of observations, this function subsets the data frame to only include those units that are observed in every time period. Optional 'start' and 'stop' times can be designated, if specified, observations before the start and stop times will be dropped. Set 'complete_obs = FALSE' to keep units that are missing some time observations during the panel.
input tibble filtered to balanced panel
1 | balance_panel(df = airquality, unit = Month, time = Day)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.