WeightingDialog: 'WeightsDialog'

View source: R/weightingdialog.R

WeightingDialogR Documentation

WeightsDialog

Description

Code for the Displayr Weighting dialog box.

Usage

WeightingDialog(
  categorical.variables = NULL,
  categorical.targets = NULL,
  numeric.variables = NULL,
  numeric.targets = NULL,
  lower = "",
  upper = "",
  calfun = c("Raking", "Linear", "Logit")[1],
  force.to.n = TRUE,
  input.weight = NULL
)

Arguments

categorical.variables

An optional list or data frame of categorical adjustment variables.

categorical.targets

The target probabilities for each category listed in categorical.variables

numeric.variables

An optional list or data frame of categorical adjustment variables.

numeric.targets

the target mean for each numeric variable in numeric.variables

lower

A lower bound weight value (not guaranteed to be achieved).

upper

An upper bound weight value (not guaranteed to be achieved).

calfun

The calibration function: "Raking" (Default), "Linear", or "Logit".

force.to.n

Force the sum of weights to equal the sample size.

input.weight

An optional weight variable; if supplied, the created weight is created to be as close to this input.weight as possible

Value

numeric A vector of weights


NumbersInternational/flipData documentation built on March 2, 2024, 10:52 a.m.