welcome to nls2

Input file for winnls2

Table of contents:

  1. Syntax and structure of the input file

  2. How to describe the:
    model data statistical context numerical contexts options integration context

  3. Example

Syntax and structure of the input file

* Each piece of information is introduced by an identifier. Most of them can be omitted (see the default values in the help-files of nls2). They can be put in any order.

* Comments begin with the '#' (dieze) character and end with the new line character. They can be inserted anywhere.

* Lower and upper case letters are not distinguished.

* The logical values are noted by '0', 'no', 'non', 'false', 'faux', 'f', or '1', 'y', 'oui', 'true', 'vrai', 't', 'v'. Really, the first character is taken into account, only.

* This file contains, in whatever order, information about the following features of the study:
model data statistical context numerical contexts options integration context

* The only identifiers always required are:
-
file, to describe the model,
- x and y, to describe the data,
- and theta.start, to describe the statistical context.

Retour au début

To describe the model, the identifiers are:

file
pathname of the model-description-file.
gamf
values of the second level parameters of the regression function.
gamv
values of the second level parameters of the variance function.
vari.type
a character value to describe the variance type among CST, SW, VST, VB, VSB, VSTB, VTB, VI.
eq.theta
values of the numerical equality constraints on the parameters Theta.
inf.theta
values of the inferiority-bound constraints on the parameters Theta.
sup.theta
values of the superiority-bound constraints on the parameters Theta.
eqp.theta
values that numbers the parameters Theta when there are equality constraints between parameters Theta, from 1 to the number of different parameters.
eq.beta, inf.beta, sup.beta, eqp.beta
same for the parameters Beta.
Note: if no constraint is set to a parameter, it should be noted with NaN.

Retour au début

To describe the data, the identifiers are:

x
values of the independent variables, observation by observation, the independent variables been in the same order as in the varind declaration in the model-description file.
y
values of the observed response.
weights
weighting values.
curves
character values of the curves identifiers.
Careful: The observations must be sorted, first on curves and second, on replications, if any.

Retour au début

To describe the statistical context, the identifiers are:

theta.start
starting values of the parameters Theta.
beta.start
starting values of the parameters Beta.
algorithm
followed by GN or GM,
sigma2.type
followed by KNOWN, VARREP, VARRESID, IGNORED, or VARINTRA,
sigma2
its value when it is known,
mu.type
followed by KNOWN, MUGAUSS, MURES or MURESREP,
mu3 and mu4
values of the moments when they are known (as many values as number of observations without replications).
max.err.c1, max.err.c2, max.iters, omega.c1, omega.c2, lambda.start, lambda.c1, lambda.c2, max.lambda, max.stop.crit, family, nameN
other options: see the help-pages of nls2.

Retour au début

To describe the numerical contexts, the identifiers are:

method
followed by values among MLTB, MLSTB, QLTB, MLT, WLST, OLST, MLST, QLT, VITWLS, OLSB, MLSB, QLB or MYOWN. Put as many values as steps (maximum 3) when the method is an alternate-method.

When one of method is MYOWN:
Each one of these identifiers should be followed by as many values as methods set to MYOWN.

nh
the number of the sufficient statistics Z
effic
a logical value TRUE, if the estimator is efficient, FALSE, otherwise.
W.type
followed by SYM, SYMBLOC, NONSYM according to the shape of the matrix W.
fit.type
followed by LOGV, STOPCRIT, NWSST, VWSS, IVWSS, NWSSB, SIGMA2 or MYOWN.

Retour au début

To describe options:

Options can be set to control printing, warning, optional results and intermediate savings.
The identifiers are:

* to control the print:

freq
value to control the frequency of the intermediate printings, and, also of the intermediate savings.
out
the name of the printing file. By default, it is the standard output unit. Put "no" if no printing of any kind is requested.
Note: the upper-case letters in this name will be automatically changed into lower-case letters, and then, the name should be not be equal to any of the identifiers.
fitted, est.eq, estim, deriv.fct, iter, num.res, odes
logical values: see wanted.print on the help-page 'nls2.control' of nls2.

 

* to control the warnings:

warn
control the length of the warning messages. It should be a value among no (or n), long (or l), short (or s): n for no warning message at all, l for long warning messages, s for short warning messages.
anal.warn, integ.warn, meth.warn, num.warn, all.warn
values equal to the maximum number of warnings allowed of types: analyser, integrator, methodological, numerical, and of any type.
Execution terminates when any of these numbers is reached. Default value: 30
lg.trace
the length of the 'trace', i.e the number of program-names printed when a system error occurs (for debugging purposes, only).

* to control the optional results:

as.var, correlation, b.varz.b, mu, residuals, w
logical values: F if the corresponding result is not required. By default, all are calculated and stored.

 

* to control the intermediate savings:

Intermediate results can be saved along the iterating process with a frequency controlled by
freq.
it.steps
indexes of the steps for which results have to be saved. By default, it.steps is set to the number of the last step.
it.iter, it.fitted, it.est.eq, it.estim, it.deriv.fct, it.odes, it.num.res,
logical values: T if the corresponding result is required; see print.
Notes:
- at iteration number 0, i.e for the initial values of the parameters, the direction, direct, and the optimal step,omega, are not calculated. The corresponding returned values are arbitraly set to DBL_MAX, (generally 1.79E+308) a value you find in the standard C file "float.h" on your site.
- when it.odes is set, the fitted values of the system, FOdes, are saved only. Its derivatives, d.FOdes, are not saved.

Retour au début

To describe the integration context, the identifiers are:

pr.odes, itol, atol, rtol, iopt, ropt, start, integ.values, cond.start, n.theta.odes, jt
see the help-page nls2.integ.ctx of nls2. In addition here, jt characterizes the jacobian method: explanations can be found in the comments included in the source-files of LSODA.

Example:

# ****** Nasturium example ******

x # one independant variable
0.000 0.000 0.000 0.000 0.000 0.000 
0.025 0.025 0.025 0.025 0.025 0.025 
0.075 0.075 0.075 0.075 0.075 0.075 
0.250 0.250 0.250 0.250 0.250 0.250 
0.750 0.750 0.750 0.750 0.750 0.750 
2.000 2.000 2.000 2.000 2.000 2.000 
4.000 4.000 4.000 4.000 4.000 4.000

y # values of the response
 920 889 866 930 992 1017 919 878 882 854 851 850 870 825 953 
 834 810 875 880 834 795 837 834 810 693 690 722 738 563 591 
 429 395 435 412 273 257 200 244 209 225 128   221

# the name of the model-description file:
file nas.mod

# the initial values of the parameters:
theta.start 900 -.5 1

# End of the input-file

Retour au début

 


© INRA, 2001-