model.decode {RGeostats} | R Documentation |
Decode one or several Model items for Parametrization
model.decode(strings)
strings |
A series of keywords (valuated or non-valuated) used to describe one or several items which can be used for Model parametrization. See details for more information |
A keyword can be valuated (Example: V1=12) or not (Example: A2).
Depending on the usage, these keywords can be provided as:
a list of elements. Example: list(V1=12,R1=2)
a vector of character strings. Example: c("V1=12","R1=2")
If the keywords are non-valuated, they can only be defined as a list of strings.
Each keyword follows the syntax: G'igrf'M'istr”type”v1'[-'v2']='value'
The string "G" stands for the designation of the Random Function.
'igrf' stands for the rank of the Random Function. Defaulted to 1.
The string "M" stands for the designation of the Structure.
'istr' stands for the rank of the Structure. Defaulted to 1.
'type' designates the type of non-stationarity parameter according the following possibilities:
R for Range
S for Scale
A for Anisotropy angle
P for the Third Parameter
V for the Sill
T for the Range of the Tapering function (if any)
C for the Advection Velocity (if any)
I for the Rotation Angle for variable defined on the Sphere
This 'keyword' is compulsory.
v1,v2 designate additional rank(s) for the Non-stationary parameter:
For Range: 'v1' stands for the space dimension. Defaulted to 1.
For Scale: 'v1' stands for the space dimension. Defaulted to 1.
For Anisotropy Angle: 'v1' stands for the space dimension. Defaulted to 1.
For Third Parameter: 'v1' and 'v2' are ignored.
For sill: In the monovariate case, only 'v1' should not be specified ('v2' is ignored). In the multivariate case 'v1'-'v2' gives the rank of the two variables of interest. Defaulted to '1-1'.
'=' Compulsory symbol if a numerical value is assigned to the specified parameter.
'value' Value assigned to the specified parameter. Defaulted to NA. This feature is only required when specifying initial values of bounds used during the Automatic Structure recognition (See details).
All elements 'igrf', 'istr', 'v1' and 'v2' start from 1. The order in which the keywords are defined is important: it provides the order in which the corresponding Non-stationary locators are read. Finally all the characters involved in this grammar are case-insensitive
Example: "G1M2V2-3" for the Sill of the cross-variogram between Variables #2 and #3, for the Structure #2 of the Random Function #1.
A list with one element per keyword. Each keyword is represented by a list with the following items
par Parameter type (R, S, A, P, V, T, C or I)
grf Rank of the Gaussian Random Function
str Rank of the Basic structure in the Model
v1 Rank of the (first) Variable
v2 Rank of the second Variable
veq Value assigned to the parameter (for valuated keyword) or NA (for non-valuated keyword)
flag.v2 TRUE if the keyword corresponds to a bivariate item
flag.eq TRUE if the keyword is valuated
# A list of two valuated keywords model.decode(c("R1=2","G2V1=4")) # The same list as above model.decode(list(R1=2,G2V1=4)) # A single non-valuated keyword model.decode("R1")