summarise_quantiles_data {baggr}R Documentation

summarise_quantiles_data

Description

Given individual level data, return list of summary statistics Of quantile means and Sigma's, as well as K, N. This operation is done automatically inside baggr function but it can be used for exploring input data.

Usage

summarise_quantiles_data(
  data,
  quantiles,
  outcome = "outcome",
  group = "group",
  treatment = "treatment",
  means_only = FALSE
)

Arguments

data

a data.frame with grouping, outcome, treatment variables

quantiles

a vector of quantiles (between 0 and 1)

outcome

character: column name in data for outcome variable

group

character: column name in data for grouping variable

treatment

character: column name in data for treatment variable

means_only

logical; if true, covariances and extra outputs are not returned, but only means (y_0 and y_1)

Details

This function is intended for data exploration outside of baggr function. When calling baggr, individual-level data should be supplied – they will be summarised automatically. (See baggr for documentation of how columns should be formatted.)

Estimates are obtained externally via quantreg::rq function of the quantreg package. This implementation is experimental and will change in the future versions of the package.

Value

A list with mean estimates for control and treatment (y_0 and y_1) and variance-covariance matrices (Sigma_y_k_0 and Sigma_y_k_1).

Examples


summarise_quantiles_data(microcredit_simplified, c(.2, .4, .6),
                         outcome = "consumption")


[Package baggr version 0.6.4 Index]