| CompLinModCoReg {compositions} | R Documentation |
Creates a Variogram model according to the linear model of spatial corregionalisation for a compositional geostatistical analysis.
CompLinModCoReg(formula,comp,D=ncol(comp),envir=environment(formula))
formula |
A formula without left side providing a formal description of a variogram model. |
comp |
a compositional dataset, needed to provide the frame size |
D |
The dimension of the multivariate dataset |
envir |
The enviroment in which formula should be interpreted. |
The linear model of coregionalisation says uses the fact, that sums of valid variogram models are valid variograms and that skalar variograms multiplid with a positiv definit matrix are valid vector variograms. The function computes such a variogram function from a formal description. The formula is a sum. Each summand is either a product of a matrix description and a scalar variogram description or only a scalar variogram description. Scalar variogram descriptions are either formal function calls to
sph(range) for sperical variogram with range range
exp(range) for an exponential variogram with range
range
gauss(range) for a Gaussian variogram with range
range
gauss(range) for a cardinal sine variogram with (non-effective) range
range
pow(range) for an power variogram with range
range
lin(unit) linear variogram 1 at unit.
nugget() for adding a nuggeteffect.
alternatively it can be any expression, which will be evaluated in
envir and should depende on a dataset of distantce vectrs h.
The matrix description always comes first. It can be R1 for a
rank 1 matrix PSD for a Positive Semidefinite matrix or \(S\)
for a scalar Sill factor to be multipled with identiy. Or any other
construct evaluating to a matrix or a function of some parameters with
default values, that if called is evaluated to a positive semidefinit
matrix. R1 and PSD can also be written as calls with
providing a vector or respectively a matrix providing the parameter.
The variogram is created with default parametervalues. The parameters
can later be modified by modifiying the default parameter with
assignments like formals(vg)$sPSD1 =
parameterPosdefMat(4*diag(5)).
We would anyway expect you to fit the model to the data by a command
like vgmFit(logratioVariogram(...),CompLinModCoReg(...))
A variogram function.
K.Gerald v.d. Boogaart http://www.stat.boogaart.de
What to cite??
vgram2lrvgram,
CompLinModCoReg,
vgmFit
## Not run:
data(juraset)
X <- with(juraset,cbind(X,Y))
comp <- acomp(juraset,c("Cd","Cu","Pb","Co","Cr"))
CompLinModCoReg(~nugget()+sph(0.5)+R1*exp(0.7),comp)
CompLinModCoReg(~nugget()+R1*sph(0.5)+R1*exp(0.7)+(0.3*diag(5))*gauss(0.3),comp)
CompLinModCoReg(~nugget()+R1*sph(0.5)+R1(c(1,2,3,4,5))*exp(0.7),comp)
## End(Not run)