calculate.dra.weights: Generate weights for direct risk adjustment in each risk...

View source: R/risk.adjust.R

calculate.dra.weightsR Documentation

Generate weights for direct risk adjustment in each risk group reflecting how likely they are to occur in the provided data. This will add a few columns to input.dt, might bugger up if you have similarly named ones.

Description

Generate weights for direct risk adjustment in each risk group reflecting how likely they are to occur in the provided data. This will add a few columns to input.dt, might bugger up if you have similarly named ones.

Usage

calculate.dra.weights(
  input.dt,
  group.col.name,
  reference.level = NULL,
  riskgp.col.name = "riskgp",
  weight.col.name = "wt",
  include.na = FALSE
)

Arguments

input.dt

Input data.table with at least columns group.col.name and riskgp.col.name.

group.col.name

The name of the column that is being adjusted against.

reference.level

The level of group.col.name that risk groups will be adjusted to reflect. If NULL, it will be the population proportion (Default: NULL).

riskgp.col.name

The name of the risk group column (default: 'riskgp')

weight.col.name

The name of the column in output that contains weights (default: 'wt')


mattmoo/daohtools documentation built on Feb. 5, 2023, 5:38 a.m.