View source: R/Selbal_Functions.R
bal.value | R Documentation |
data.frame
like the output of selbal.aux
The balance value for a given matrix of counts using the variables appearing
in a data.frame
like the output of selbal.aux
bal.value(bal.tab, x)
bal.tab |
a |
x |
the matrix with the log-transformed counts for a given subset of individuals. |
A vector
with the balance values for each subject.
# 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)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.