sd_create_synth_vector: Create synthetic vector based on Lorenz parameters of group...

View source: R/sd_create_synth_vector.R

sd_create_synth_vectorR Documentation

Create synthetic vector based on Lorenz parameters of group data

Description

Compute distributional statistics for grouped data by selecting the best functional fit for the Lorenz curve (either beta or quadratic).

Usage

sd_create_synth_vector(
  welfare,
  population,
  mean,
  pop = NULL,
  p0 = 0.5,
  nobs = 1e+05,
  selected_model = NULL,
  verbose = FALSE
)

Arguments

welfare

numeric: Cumulative proportion of welfare held by that proportion of the population (Lorenz Curve).

population

numeric: Cumulative proportion of population.

mean

numeric: Welfare mean.

p0

numeric: TO BE DOCUMENTED.

nobs

numeric: Number of observations to be used in synthetic vector

selected_model

character or NULL: force to use one model, either quadratic (q) or Beta (b). If NULL (default), the methodological protocol will select the model. This argument is only useful for testing purposes.

Value

list

Examples

# Create synthetic dataset
res <- wbpip:::sd_create_synth_vector(
  welfare = grouped_data_ex2$welfare,
  population = grouped_data_ex2$weight,
  mean = 8,
  pop = NULL,
  p0 = 0.5,
  nobs = 1e5)
str(res)


PIP-Technical-Team/wbpip documentation built on Nov. 29, 2024, 6:57 a.m.