endpointCoordinates {compositions}R Documentation

Amounts in barytic-coordinates

Description

Computes the convex combination of amounts given by endpoints to explain X as good as possible.

Usage


          endpointCoordinates(X,...)
          endpointCoordinatesInv(K,endpoints,...)
          ## Default S3 method:
          endpointCoordinates(X,endpoints=diag(gsi.getD(X)), ...)
          ## S3 method for class 'acomp':
          endpointCoordinates(X,endpoints=clr.inv(diag(gsi.getD(X))),...)
          ## S3 method for class 'aplus':
          endpointCoordinates(X,endpoints,...)
          ## S3 method for class 'rplus':
          endpointCoordinates(X,endpoints,...)
          ## S3 method for class 'rmult':
          endpointCoordinatesInv(K,endpoints,...)
          ## S3 method for class 'acomp':
          endpointCoordinatesInv(K,endpoints,...)
          ## S3 method for class 'rcomp':
          endpointCoordinatesInv(K,endpoints,...)
          ## S3 method for class 'aplus':
          endpointCoordinatesInv(K,endpoints,...)
          ## S3 method for class 'rplus':
          endpointCoordinatesInv(K,endpoints,...)
          

Arguments

X a dataset of amounts or compositions, to be represented in as convex combination of the endpoints in the given geometry
K Konvex combination weights to the endpoints
endpoints a dataset of extremal compositions from the same space as X. The number of endpoints given must not exceed the dimension of the space plus one.
... currently unused

Details

The convex combination is performed in the respective geometry. This means that for rcomp positivity of the result is only guaranteed with extermal endmembers and that in acomp-geometry it is not possible to give extremal endmembers.
The main idea behind this functions is that the actually observed composition came from a convex combination of some extremal compositions specified by endpoints. Strictly speaking this is meaningfull in strictly this sense only in rplus-geometry and under some special circumstances in rcomp geometry. It is not meaningfull in terms of mass conservation in acomp- and aplus-geometry due to the non mass-balancing character of the geometry. In rcomp-geometry it dependent on unit of measurements and different for volume and mass % and only valid if the whole composition is observed.

Value

The endpointCoordinates functions give a "rmult"-dataset giving the convex weights, which allow to combine X from endpoints as good as possible. The result is an "rmult" since there is guarantee that the resulting weights are positive.
The endpointCoordinates functions reconstruct the convex combination from coordinates K and the given endpoints. The class of endpoints determines the geometry chosen and the class of the result.

References

Shurtz, Robert F., 2003. Compositional geometry and mass conservation. Mathematical Geology 35~(8), 972–937.

Examples

data(SimulatedAmounts)
ep <- aplus(rbind(c(2,1,2),c(2,2,1),c(1,2,2)))
dat <- endpointCoordinatesInv(acomp(sa.lognormals),acomp(ep))
plot(dat)
plot( acomp(endpointCoordinates(dat,acomp(ep))))

dat <- endpointCoordinatesInv(rcomp(sa.lognormals),rcomp(ep))
plot(dat)
plot( rcomp(endpointCoordinates(dat,rcomp(ep))))

dat <- endpointCoordinatesInv(aplus(sa.lognormals),aplus(ep))
plot(dat)
plot( endpointCoordinates(dat,aplus(ep)))

dat <- endpointCoordinatesInv(rplus(sa.lognormals),rplus(ep))
plot(dat)
plot(endpointCoordinates(rplus(dat),rplus(ep)))


[Package compositions version 0.9-10 Index]