pba: Principal Balance Analysis

Description Usage Arguments Details Value Slots Methods (by generic) Author(s) Examples

View source: R/pba.R

Description

Principal Balance Analysis

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
pba(x, how = "sbp.fromPBA", ...)

## S4 method for signature 'pba'
show(object)

## S4 method for signature 'pba'
predict(object, y)

## S4 method for signature 'pba,missing'
plot(x, y, group, pb1 = 1, pb2 = 2,
  size.text = 18)

## S4 method for signature 'pba,matrix'
plot(x, y, group, pb1 = 1, pb2 = 2,
  size.text = 18)

## S4 method for signature 'pba,data.frame'
plot(x, y, group, pb1 = 1, pb2 = 2,
  size.text = 18)

Arguments

how

A character string. The method used to construct the SBP. The default computes principal balances via sbp.fromPBA.

...

Arguments passed to how method.

object, x

A pba object.

y

A matrix on which to deploy the pba model.

group

A character vector. Group labels used to color points.

pb1, pb2

An integer. Sets principal balances to plot.

size.text

An integer. Sets legend text size.

Details

The pba function performs a principal balance analysis using the hierarchical clustering of components method described by Pawlowsky-Glahn et al. in "Principal balances" from the CoDaWork 2011 proceedings.

This resultant object contains the original data, the serial binary partition, the principal balances, and the fractional variances per balance. Use predict to deploy the pba model on new data.

Value

Returns a pba object.

Slots

data

A matrix. The original data.

sbp

A matrix. The SBP matrix.

pba

A matrix. The balances.

totvar

A numeric vector. The total variance per balance.

subvar

A numeric vector. The fractional variance per balance.

Methods (by generic)

show: Method to show pba object.

predict: Method to deploy pba object.

plot: Method to plot pba object.

Author(s)

Thom Quinn

Examples

1
2
3
4
5
6
7
library(balance)
data(iris)
train <- iris[1:50,1:4]
test <- iris[51:150,1:4]
model <- pba(train)
predict(model, test)
plot(model, test)

balance documentation built on July 10, 2019, 9:03 a.m.