bal.value: The balance value for a given matrix of counts using the...

View source: R/Selbal_Functions.R

bal.valueR Documentation

The balance value for a given matrix of counts using the variables appearing in a data.frame like the output of selbal.aux

Description

The balance value for a given matrix of counts using the variables appearing in a data.frame like the output of selbal.aux

Usage

bal.value(bal.tab, x)

Arguments

bal.tab

a data.frame including the variables defining the balance (like the output of selbal.aux or the sixth element in the output of selbal.cv function).

x

the matrix with the log-transformed counts for a given subset of individuals.

Value

A vector with the balance values for each subject.

Examples

# Load data set
  load("HIV.rda")
# Define x and y
  x <- HIV[,1:60]
  y <- HIV[,62]
# Run the algorithm
  Bal <- selbal.aux(x,y)
# Balance values for the individuals (log-transformed x values with the corresponding zero-replacement)
  bal.value(Bal,log(cmultrepl2(x)))


malucalle/selbal documentation built on May 31, 2024, 2:36 p.m.