plot.tab: Plots the cross - validated summary table

plot.tabR Documentation

Plots the cross - validated summary table

Description

Plots the cross - validated summary table

Usage

## S3 method for class 'tab'
plot(dat, col = c("steelblue1", "tomato1"))

Arguments

dat

the data.frame object to draw obtained from selbal.cv function.

col

vector with two colors, each of them referring to the variables appearing in the numerator and in the denominator, respectively.

Value

A colored table with the information of the given data.frame:

  • The first column of the table ( a variables has been selected for a balance.

  • The second column (Global) shows the result for the balance obtained using all the available samples.

  • The last three columns represent the most repeated balances in the cross - validation procedure.

Examples

#---------------------------------------------------#
# 1) Compute a cross - validated balance selection
#---------------------------------------------------#
 # Load data set
   load("HIV.rda")
  # Define x and y
    x <- HIV[,1:60]
    y <- HIV[,62]
 # Run the algorithm
    CV.Bal <- selbal.cv(x,y)

#----------------------------------------#
# 2) Plot the table
#----------------------------------------#

  plot.tab(CV.Bal[[4]])


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