## Example with 2 compositions
u <- matrix(c(0.2,0.4,0.5,0.5,0.3,0.2),nrow=2,byrow=TRUE)
u
D <- NCOL(u) # number of parts
## auxiliary variable
d <- matrix(c(3.2,4.6),ncol=1)
## log-ratio transformation
V <- matrix(c(c(1,-1,0)/sqrt(2),c(1,1,-2)/sqrt(6)),ncol=2)
## vector of parameters:
shape1 <- 2.00
coefi <- c(-0.78, 0.06, 0.96, -0.11)
shape2 <- c(1.80, 3.10, 4.00)
x <-c(shape1, coefi, shape2)
bval(D,x,d,V)
zval(u,x,d,V)
Run the code above in your browser using DataLab