scripts.filters

Define filters for SOEP (Socio-Economic Panel) dataframes.

This module provides filtering functions for processing SOEP survey data, including age-based filtering, interview quality filtering, year selection, and household-level aggregation.

Functions

age_filter(df, ip)

Filter dataframe by age range and add survey age column.

filter_df(df, ip, set_year)

Apply a comprehensive set of filters to SOEP survey data.

households_filter(df, ip)

Aggregate household-level data and identify oldest household member.

netto_filter(df)

Filter to keep only successfully conducted household interviews.

year_filter(df[, set_year])

Filter dataframe to include only a specific survey year.