summaryA.SGB | R Documentation |
The expectation and mode in the log-ratio space, transformed back to the simplex.
MeanA.SGB(shape1, scale, shape2)
ModeA.SGB(shape1, scale, shape2)
MeanAobj.SGB(obj)
ModeAobj.SGB(obj)
shape1 |
overall shape parameter. |
scale |
vector of length |
shape2 |
vector of length |
obj |
list, result of regSGB. See |
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.
A matrix or vector of dimensions (n \times D)
.
Each row gives the Aitchison expectation for compositions having the corresponding set of auxiliary variables.
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).
oilr
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.