by Didier Renard » Mon Aug 19, 2013 8:09 am
Hi
This is my answer concerning the use of arguments "upper" and "lower" to constraint the parameters of a fitted model.
As you noticed, this is the correct way to handle the problem. Each parameter (that will be fitted by the model.auto procedure) can be assigned limiting bounds using the upper and lower arguments.
However, I am not really satisifed with the current implementation (that I think should be modified in the future).
As a matter of fact, the user must now exactly BEFOREHAND the order assigned (by the procedure) to the different arguments. This order depends on many environmental caracteristics such as the space dimension, the number of variables, the structure type, their order, ...).
The only way to now this order is to run the model.auto() procedure once with the argument VERBOSE st to 1. As the result is not important at this stage, the user can shortcut the calculations by setting the parameter MAXITER to 1.
The VERBOSE option will provide the following type of output (this is an example for a 2-D data set and where I tried to fit a model composed of a nugget effect and two spherical):
> model.auto(vario,struct=melem.name(c(1,3,3)),verbose=1)
Optimization Conditions
=======================
- Number of variables = 1
- Space dimension = 2
- Number of experiments = 9
- Number of parameters = 5
- Constrained Minimization (OFF)
- Anisotropy (OFF)
- Anisotropy Rotation (OFF)
- Global Rotation (OFF)
- Rotation around Z only (OFF)
- Lock third dimension (OFF)
- Lock 2-D Isotropy (OFF)
- Use the Goulard option (OFF)
Model
-----
Structure : Nugget Effect
1 - Sill : 0.026447 [0.000000,NA[
Structure : Spherical
2 - Sill : 0.026447 [0.000000,NA[
3 - Range U : 0.251782 [0.000001,NA[
Structure : Spherical
4 - Sill : 0.026447 [0.000000,NA[
5 - Range U : 0.377672 [0.000001,NA[
The second part of the printout clearly indicates the order assigned to each argument, i.e. the sill of the nugget effect (#1), the sill of the first spherical (#2), its range (#3), the sill of the second spheraicl (#4) and its range (#5).
Having this information, the user can provide an array of 5 values for lower and/or 5 values for lower arguments. Note that if the array provided does not have 5 elements, this information is cancelled.
As an example, if the user wishes to have the range of the first spherical lying between 1 and 5, and the range of the second spherical larger than 10, he would provide:
lower = c(NA,NA,1,NA,10)
upper=c(NA,NA,5,NA,NA)
I recall that the lower and upper argument provide bounds for each paramter by itself. A special argument is provided to force the sum of the sills to be equal to 1to be equal to 1: this if the argument FLAG.NORM.SILL
Hope this will help.