update_w_beta: update_w_beta

Description Usage Arguments Value See Also Examples

View source: R/updates.R

Description

This function updates the weights for each patient level cluster

Usage

1
update_w_beta(S, E, hyper_delta = 1)

Arguments

S

The number of patient level clusters

E

A vector that records the current clustering membership.

hyper_delta

The hyper-parameter with default value being 1

Value

The updated weights for each patient level cluster

See Also

update_RJ for a complete example for all functions in this package.

Examples

1
2
3
4
5
6
7
8
9
#Suppose we know the number of patient level cluster is 4
#Suppose the current clustering membership indicates 3 patients in cluster 1,
#2 patients in cluster 2, 3 patinets in cluster 3, 1 patient in cluster 4
#Use the default value, 1, for hyper-parameter
update_w_beta(S=4,E=c(1,1,1,2,2,3,3,3,4))


#To change the hyper-parameter to, for example 2
update_w_beta(S=4,E=c(1,1,1,2,2,3,3,3,4),hyper_delta = 2)

BAREB documentation built on March 26, 2020, 7:36 p.m.

Related to update_w_beta in BAREB...