Skip to contents

Import Data

This variable-driven function automatically merges household- and person-level files from the same dataset. It also supports loading data across multiple countries and a selected range of years.

lissyuse()
Load data easily and efficiently with lissyuse

Adjustment & Equivalisation

Applies a transformation to the variable under analysis across datasets.

apply_iqr_top_bottom_coding()
Apply IQR-Based Top and Bottom Coding to LIS/LWS Variables
apply_oecd_equivalisation()
Apply OECD Equivalence Scale to a Variable
apply_sqrt_equivalisation()
Apply Square-Root Equivalisation to a Variable
apply_ppp_adjustment()
Adjust Monetary Variables for Inflation and PPP

Weighted Statistics

Computes aggregate indicators across datasets using a list structure. These functions also allow the inclusion of survey weights in the calculations.

run_weighted_count()
Compute (weighted) counts or percentages from a list of data frames
run_weighted_mean()
Compute Weighted Mean Across a List of Data Frames (with optional grouping)
run_weighted_percentiles()
Compute Weighted Percentiles cross a List of Data Frames (with optional grouping)
run_weighted_ratios()
Compute Percentile Ratios
run_weighted_gini()
Compute Weighted Gini Index Across a List of Data Frames
run_weighted_atkinson()
Compute Weighted Atkinson Across a List of Data Frames
run_weighted_relative_poverty()
Compute Relative Poverty Rate
run_weighted_poverty_shortfall()
Compute the Weighted Poverty Gap (Shortfall)
run_weighted_poverty_gap_index()
Compute the Poverty Gap Index

Plotting

Function designed to restructure data from a list to be printed in the console to a tabular data frame allowing to plot the values

structure_to_plot()
Transform Structured Data Lists into a Tidy Data Frame for Plotting

Data Availability

Provide a quick overview of available countries and years in LIS and LWS, including the surveys behind each dataset.

get_countries_lis()
Print all the country code in LIS
get_countries_lws()
Print all the country code in LWS
get_years_lis()
Print all the existing years in LIS for a given country.
get_years_lws()
Print all the existing years in LWS for a given country.
get_surveys_lis()
Print the survey used to construct the LIS datasets for a given country.
get_surveys_lws()
Print the survey used to construct the LWS datasets for a given country.

Variable Information

Helps users check if a variable exists in a dataset and reveals extra information such as notes, labels, and categories—especially important for variables that vary by country.

variable_labels()
Inspect the Labels of LIS and LWS variables
variable_country_specific_categories()
Retrieve the categories of a country-specific variable in LIS/LWS for a given country.
variable_exists()
Inspect whether a given variable contains more than just non-missing or non-zero values for a selected group of countries in the LIS or LWS databases.
variable_has_note()
Verify if a given variable has a note, for a selected group of countries, in LIS or LWS databases.

Built in Datasets

Sample Datasets

Simulated datasets that mirror the structure of real LIS datasets. These allow users to test and debug code locally, with the benefit of autocompletion and the ability to inspect data frames interactively.

it14_h_lis
Sample Household-Level LIS Dataset - Italy 2014
it14_p_lis
Sample Individual-Level LIS Dataset - Italy 2014
it16_h_lis
Sample Household-Level LIS Dataset - Italy 2016
it16_p_lis
Sample Individual-Level LIS Dataset - Italy 2016
it20_h_lis
Sample Household-Level LIS Dataset - Italy 2020
it20_p_lis
Sample Individual-Level LIS Dataset - Italy 2020
mx14_h_lis
Sample Household-Level LIS Dataset - Mexico 2014
mx14_p_lis
Sample Individual-Level LIS Dataset - Mexico 2014
mx16_h_lis
Sample Household-Level LIS Dataset - Mexico 2016
mx16_p_lis
Sample Individual-Level LIS Dataset - Mexico 2016
mx18_h_lis
Sample Household-Level LIS Dataset - Mexico 2018
mx18_p_lis
Sample Individual-Level LIS Dataset - Mexico 2018
us14_h_lis
Sample Household-Level LIS Dataset - US 2014
us14_p_lis
Sample Individual-Level LIS Dataset - US 2014
us16_h_lis
Sample Household-Level LIS Dataset - US 2016
us16_p_lis
Sample Individual-Level LIS Dataset - US 2016
us18_h_lis
Sample Household-Level LIS Dataset - US 2018
us18_p_lis
Sample Individual-Level LIS Dataset - US 2018
it14_h_lws
Sample Household-Level LWS Dataset - Italy 2014
it14_p_lws
Sample Individual-Level LWS Dataset - Italy 2014
it16_h_lws
Sample Household-Level LWS Dataset - Italy 2016
it16_p_lws
Sample Individual-Level LWS Dataset - Italy 2016
us16_h_lws
Sample Household-Level LWS Dataset - US 2016
us16_p_lws
Sample Individual-Level LWS Dataset - US 2016
us19_h_lws
Sample Household-Level LWS Dataset - US 2019
us19_p_lws
Sample Individual-Level LWS Dataset - US 2019

Reference Objects

Character vectors containing the names of the variables available in LIS and LWS.

lis_variables
LIS Variables
lws_variables
LWS Variables

Complementary Tables

data_inc_ref_year
LWS income reference years
data_vars_labels
Variable labels
data_with_warnings
Variable notes
datasets
LIS and LWS datasets
deflators
CPI and PPP deflators.
missing_or_zero_vars_all
Variable Status Data Frame
value_label_c_data
Value Labels for Country-Specific Variables in LIS and LWS Datasets

Superseded

Deprecated functions from the early stages of the lissyrtools package. Maintained for reference and backward compatibility.

bind_lissy_files() deprecated
Bind multiple LIS or LWS datasets
compute_atkinson() superseded
Compute Atkinson index.
compute_gini() superseded
Compute gini index.
compute_mean() compute_median() compute_ratio() superseded
Compute standard indicators.
compute_percentiles() superseded
Compute percentiles.
compute_poverty_rate() superseded
Compute poverty rate.
determine_file_level() deprecated
Determine the level of the file
determine_weight() deprecated
Determine the name of the weight variable
lissy_map() deprecated
Wrap over 'purrr::imap()' for lissy files
merge_dataset_levels() deprecated
Merge household and person-level files
plot_indicator() deprecated
Plot an Indicator.
print_all_lissy_files() superseded
Print all available files
print_atkinson() superseded
Print the Atkinson Index
print_gini() superseded
Print the Gini Coefficient
print_indicator() superseded
Print an indicator
print_percentiles() superseded
Print percentiles.
print_ratio() superseded
Print the Ratio Index
read_lissy_files() superseded
Read files in LISSY
read_lissy_files_locally() superseded
Read files locally
read_rename_files() superseded
Rename read files
transform_adjust_by_lisppp() superseded
Adjust aggregates by LIS PPPs
transform_equivalise() superseded
Equivalise by number of household members.
transform_equivalise_oecd() superseded
Equivalise with the OECD scale
transform_zeros_to_na() superseded
Recodes zeros into missing values
transform_false_zeros_to_na() superseded
Recode zeros into missing values if all values are zero
transform_negative_values_to_zero() superseded
Recode negative values to zero
transform_filter_age() deprecated
Filter a sample by age
transform_restrict_age() deprecated
Filter a variable by age
transform_restrict_to_household_heads() deprecated
Filter a variable for household heads
transform_top_code_with_iqr() transform_bottom_code_with_iqr() superseded
Apply top or bottom coding with log IQR
transform_weight_by_hh_size() superseded
Multiply by household size