[SOLVED] How to use model.param.define()?

If you have problems using RGeostats package or if you simply need some help on an unlisted subject.

[SOLVED] How to use model.param.define()?

Postby Costu » Fri Mar 18, 2016 4:34 am

Hi there,

I would like to know how to use the model.param.define function to set lower or upper bounds for parameters in the multivariate case.

For example, assume that we have a linear model of coregionalization with three basic structures as follows melem.name(c(1,8,8)) with a geometric anisotropy. How I set lower and upper bounds for all parameters ( sill matrices, ranges, azimuths, smoothnesses)? Please, can you provide an example?



Posts: 9
Joined: Sun Oct 14, 2012 8:37 pm

Re: How to use model.param.define()?

Postby Didier Renard » Mon Mar 28, 2016 8:38 pm


Following the help of model.param.define function (which is used in a generic manner in all functions which allow defining constraints on the parameters), we can define constraints on each parameter, in all cases.

Let us sayf that such a vocabulary can even be used in the case of several GRF (BiPGS for example). The rank of this GRF is specified as the index of the first keyword (called "G"). If the model is only defined for a single GRF, then this parameter can be suppressed.

The second keyword ("M") if the rank of the basic structure on which the constraint must be applied:
M1 corresponds to the first structure, M2 to the second one, and so on...

Then we must define the type of parameter on which the constraint is defined: it can be the range (R), the anisotropy angle (A), the auxiliary parameter (P) or the sill (V). This keyword is compulsory.

Finally, we must give the rank of the previous parameter. This depends on the parameter type:
- Range: The ranges are defined as a vector of values for all the space dimensions. For example R2 refers to the range along the second direction
- Anisotropy Angle. The angles are defined as a vector of rotation angles, whose dimension is equal to the space dimension (except for 1-D [where there is no rotation] and 2-D [where there is only 1 angle]). Otherwise (say in 3-D) the angles are sorted: around Z, around Y and around X. Then A2 refers to the rotation around Y.
- Sill. This is the most difficult part as the sills are defined through a matrix. Then V1-V2 refers to the sill for the basic structure between variables 1 and 2.

To summarize, if I have a model with three basic structures. if I want to specify a upper bound (equalt o 0.2) to the sill of the basic structure #2 and for variable #3, I would say:
upper = "M2V3-3=0.2".

I hope this help will be helpful. Please also tell me how to improve the help of model.param.define
Didier Renard
Posts: 240
Joined: Thu Sep 20, 2012 4:22 pm

Return to Other Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest