calibrate: Calibrate sample to target

View source: R/calibrate.R

calibrateR Documentation

Calibrate sample to target

Description

Calibrate sample to target

Usage

calibrate(
  formula,
  target_count,
  data,
  order = NULL,
  lambda = 1,
  lambda_max = NULL,
  n_lambda = 100,
  lowlim = 0,
  uplim = Inf,
  prob_weights = NULL,
  verbose = FALSE,
  ...
)

Arguments

formula

sample_count ~ covariates

target_count

Number in cell in target

data

Dataframe with covariate information, sample and target counts

order

What order interactions to balance

lambda

Regularization hyperparamter

lowlim

Lower bound on weights, default 0

uplim

Upper bound on weights, default Inf

prob_weights

Optional sampling weights to include


ebenmichael/balancer documentation built on Jan. 17, 2024, 2:56 p.m.