reweight: Redistribute weights when there is missing group

View source: R/calc_summary_score.R

reweightR Documentation

Redistribute weights when there is missing group

Description

A function to recalculate weights. the corresponding weigt is redistributed into other group if the group is completely missed.

Usage

reweight(grp = rep(1, 7), wt = NULL)

Arguments

grp

The data to be weighted. For example, the group score in the cms SAS Pack star rating.

wt

A vector of weights. Refer to line 95-102 in Sas pack #2 k-mean clustering.

Value

The weight redistributed. the weight set to zero when the corresponding term is missing and the corresponding weigt is redistributed to other term.

Examples

reweight(grp=c(1,1,1,1,1,1,NA))


huangrh/rstarating documentation built on March 28, 2022, 6:44 p.m.