kw.wt: Calculate KW pseudo-weights given propensity scores

View source: R/weighting_functions.R

kw.wtR Documentation

Calculate KW pseudo-weights given propensity scores

Description

This function computes KW pseudo-weights based on propensity scores that are provided by the user.

Usage

kw.wt(
  p_score.c,
  p_score.s,
  svy.wt,
  h = NULL,
  mtch_v = NULL,
  krn = "triang",
  large = F,
  rm.s = F
)

Arguments

p_score.c

Predicted propensity scores for the non-probability sample

p_score.s

Predicted propensity scores for the probability sample

svy.wt

A vector of survey weights for the probability sample units

h

Bandwidth parameter (will be calculated corresponding to kernel function if not specified)

krn

Kernel function. "triang": triangular density on (-3, 3), "dnorm": standard normal density, "dnorm_t": truncated standard normal density on (-3, 3).

large

The cohort size is so large that it has to be divided into pieces. Default is FALSE.

rm.s

Remove unmatched survey units or not. Default is FALSE.

Details

If there are unmatched survey sample units, the program gives "The input bandwidth h is too small. Please choose a larger one!" If rm.s=TRUE, the program deletes unmatched survey sample units, and gives a warning "records in the prob sample were not used because of a small bandwidth" If rm.s=FALSE, the program evenly distributes weights of unmatched survey sample units to all non-probability sample units.

Value

A list
pswt: KW pseudo-weights
delt.svy: Number of unmatched survey sample units
h: Bandwidth


chkern/KWML documentation built on Sept. 10, 2022, 9:49 p.m.