create_weight: Calculate the weights from the denominator

View source: R/clean_measure_score_table.R

create_weightR Documentation

Calculate the weights from the denominator

Description

Calculate the weights from the denominator

Usage

create_weight(x = r_x)

Arguments

x

A data frame containing the measure denominator of the hospital compare star rating.

Details

The formula:

w_khd = (n_khd)/(N_kd)

Where:

  • w_khd: Weight for measure k, hospital h, measure group d

  • n_khd: Denominator for hospital h, measure k in measrue group d

  • N_kd: The total number of hospitals for measure k in measure group d

R- squared = 1 - (estimated variance)/(observed variance)

Value

A data frame containing the weighting factor which will used to perform lvm.

Examples

:



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