summaryA.SGB: Aitchison expectation and mode under the SGB distribution

Description Usage Arguments Details Value References See Also Examples

Description

The expectation and mode in the log-ratio space, transformed back to the simplex.

Usage

1
2
3
4
MeanA.SGB(shape1, scale, shape2)
ModeA.SGB(shape1, scale, shape2)
MeanAobj.SGB(obj)
ModeAobj.SGB(obj)

Arguments

shape1

overall shape parameter. shape1 = 1 for a Dirichlet composition.

scale

vector of length D or matrix with D columns containing the scales of parts.

shape2

vector of length D containing the (Dirichlet) shapes for each part.

obj

list, result of regSGB. See regSGB.

Details

MeanA, ModeA compute Aitchison expectation and mode in function of the SGB distribution parameters, whereas MeanAobj, ModeAobj compute Aitchison expectation and mode in function of the model variables in an SGB regression object.

Value

A matrix or vector of dimensions (n \times D). Each row gives the Aitchison expectation for compositions having the corresponding set of auxiliary variables.

References

Aitchison, J. (1986). The Statistical Analysis of Compositional Data. Monographs on Statistics and Applied Probability. Chapman and Hall Ltd (reprinted 2003 with additional material by the Blackburn Press, London (UK).

See Also

oilr.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
   set.seed(1234)
   x <- c(2,rnorm(4,0,1),1.8,3.1,4.0)
   d <- c(3.2,4.6)
   V <- t(matrix(c(1/sqrt(2),-1/sqrt(2),0,
                 1/sqrt(6),1/sqrt(6),-2/sqrt(6)),
                 nrow=2,byrow=TRUE))
   D <- 3
   shape1 <- x[1]
   scale <- bval(D,x,d,V)
   shape2 <- x[(length(x)-D+1):length(x)]
# Expectation
   MeanA.SGB(shape1,scale,shape2)
# Mode
   ModeA.SGB(shape1, scale, shape2)

## Arctic lake data
# oilr is a SGB regression object
data(oilr) 
MeanAobj.SGB(oilr)   # is the same as oilr[["meanA"]]
ModeAobj.SGB(oilr)

SGB documentation built on March 26, 2020, 8:02 p.m.