generate.dra.riskgp.columns: Generates risk group columns.

View source: R/risk.adjust.R

generate.dra.riskgp.columnsR Documentation

Generates risk group columns.

Description

Generates risk group columns from a list of models and inserts them as reference. Component columns for each model will named with a common prefix, followed by the name of that value in model.list, and an overall risk group.

Usage

generate.dra.riskgp.columns(
  input.dt,
  model.list,
  riskgp.col.name = "riskgp",
  n.groups = 10,
  col.prefix.name = ""
)

Arguments

input.dt

Input data.table, will be modified by reference.

model.list

Models to risk adjust on, columns will be given the suffix of the name of the corresponding list value. Will be coerced to list if not provided (which may mess with naming, e.g. providing a single would result in a list with no name).

riskgp.col.name

What should the risk group column be called? (And what should component columns start with?). (default: 'riskgp').

n.groups

Number of groups to generate per risk factor (default: 10)

col.prefix.name

A character prefix for generated columns, could be handy if you are planning on having more than one risk adjustment model. (Default: ”)

Value

The modified input.dt with length(model.list)+1 extra columns, unnecessary to use it as it will be modified by reference. Column riskgp.col.name will be a factor, designed to use in the generate.weights function.


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