Title: Methods for Bivariate Poverty Line Calculations
Version: 1.0.2
Description: Provides tools for identifying subgroups within populations based on individual response patterns to specific interventions or treatments. Designed to support researchers and clinicians in exploring heterogeneous treatment effects and developing personalized therapeutic strategies. Offers functionality for analyzing and visualizing the interplay between two variables, thereby enhancing the interpretation of social sustainability metrics. The package focuses on bivariate discriminant analysis and aims to clarify relationships between indicator variables.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: graphics, methods
Depends: R (≥ 3.5.0)
Suggests: testthat (≥ 3.0.0)
LazyData: true
Config/testthat/edition: 3
NeedsCompilation: no
Packaged: 2025-10-03 20:53:34 UTC; rmk
Author: Franziska Dorn [aut, cre], René-Marcel Kruse [aut], Thomas Kneib [aut]
Maintainer: Franziska Dorn <franziska.dorn@uni-due.de>
Repository: CRAN
Date/Publication: 2025-10-22 18:40:08 UTC

Calculate Bivariate Quantiles

Description

Calculate Bivariate Quantiles

Usage

brpl(data, var1, var2, tau = 0.5, nalpha = 100)

Arguments

data

Input data frame (tibbles and other data.frame variants are automatically converted to data.frame)

var1

Name of first variable

var2

Name of second variable

tau

Quantile level (default: 0.5)

nalpha

Number of alpha values (default: 100)

Value

An object of class brplPlot

Examples

df_data <- data.frame(x = 1:10, y = 1:10)
result <- brpl(df_data, "x", "y")

brpl Class

Description

Base class for bivariate quantile calculations


brplPlot Class

Description

Class for plotting bivariate quantile results


Calculate Empirical Cumulative Distribution Function

Description

Calculate Empirical Cumulative Distribution Function

Usage

myecdf(data, var, min.var = 0)

Arguments

data

A data frame containing the variable

var

Character string specifying the variable name

min.var

Minimum value for the variable

Value

List containing ecdf and quantile functions


Plot Method for brplPlot Class

Description

This method defines the plotting behavior for objects of the class brplPlot. It generates a scatter plot visualizing the relationship between two variables (var1 and var2) along with classification indicators and an additional line for further insights.

Usage

## S4 method for signature 'brplPlot'
plot(x, y, ...)

Arguments

x

An object of class brplPlot. The object must include the following slots:

  • ⁠@data⁠: A data frame containing the data to be plotted, including var1, var2, and a classification indicator indicator.

  • ⁠@var1⁠: A string specifying the name of the first variable to be plotted (X-axis).

  • ⁠@var2⁠: A string specifying the name of the second variable to be plotted (Y-axis).

  • ⁠@indicator⁠: A binary variable indicating the classification or grouping of points.

  • ⁠@tau⁠: A threshold value included in the plot's title.

  • ⁠@plvar2⁠: A matrix object defining the data points for the additional line in the plot.

y

Ignored. Included for compatibility with the generic plot function.

...

Additional arguments passed to the base R plot function.

Details

This method creates:

The title of the plot includes the threshold value (tau) for easier interpretation.

Value

This function does not return a value. It generates a plot as a side effect.


Example dataset

Description

Dataset containing measurements for leisure time (in minutes) and income based on expenditure share

Usage

pov_line_example

Format

a data.frame with 67335 rows and 3 columns:

leisure

Leisure time in minutes

inc_expenses

Income based on expenditure share of households

weight

Assumed population sampling weights

Source

Dorn, Franziska, et al. "A bivariate relative poverty line for leisure time and income poverty: Detecting intersectional differences using distributional copulas." Review of Income and Wealth 70.2 (2024): 395-419.


Prepare Quantile Calculations

Description

Prepare Quantile Calculations

Usage

prepquant(data, tau, ecdfvar1, ecdfvar2, nalpha)

Arguments

data

Data frame with standardized variables

tau

Quantile level

ecdfvar1

ECDF for first variable

ecdfvar2

ECDF for second variable

nalpha

Number of alpha values

Value

Data frame with quantile calculations