This function creates a formatted list
object as named by the argument pn.options. This list
holds estimates of values for all 8 FlexParamCurve parameters, fitting options and parameter bounds used for
fitting and solving double-Richards curves with SSposnegRichards
and posnegRichards.eqn
,
respectively. Parameter bounds are the maximum and minimum parameters values that can be used by optim
and nls
during parameter estimation. For definitions of parameters see either SSposnegRichards
or posnegRichards.eqn
. The list is written automatically by the function (to ".pntemplist") but it is
also output as a return value for assignation and subsequent use in the usual way [myoptions<- change.pnparameters(...)].
Estimates are produced by fitting positive-negative or double Richards curves in
nls
using
SSposnegRichards
for the full 8 parameter model (R1).
If this fails, the function getInitial
is called to
attempt to produce initial estimates using the same 8 parameter model.
If this also fails, estimates are attempted in the same way using the
4 parameter (positive only) model (R12). In this case, only the positive
parameters are returned (NAs are substituted for negative parameters)
unless argument force8par=TRUE, in which case negative parameters are
defaulted to: RAsym = 0.05*Asym, Rk = K, Ri = Infl, RM = M.
This function can now fit biphasic (and more generally
double-Richards) curves, where the final curve is effectively either two positive curves
or two negative curves, as well as negative-positive curves. This functionality is default
and does not need to be specified.
Parameter bounds estimated here for use in optim
and nls
fits within SSposnegRichards
are
applicable to a wide range of curves, although user may
change these manually in list
object specified by pn.options
.
Bounds are estimated by modpar
by adding or subtracting multiples
of fixed parameter values to estimated mean parameter values:
-Asym*0.5 and +Asym*2.5,
-K*0.5 and +K*0.5,
-Infl*2.5 and +Infl*10
-M*2 and +M*2
-RAsym*0.5 and +RAsym*2.5,
-Rk*0.5 and +Rk*0.5,
-Ri*2.5 and +Ri*5
-RM*2 and +RM*2.
Use force8par = TRUE if initial call to modpar
produces estimates for
only 4 parameters and yet an 8 parameter model is desired for SSposnegRichards
or posnegRichards.eqn
.
Use force4par = TRUE if you desire to produces estimates only for the four parameters of
a single Richards curves. This should also be used if you wish to fit simple logistic
Gompertz or von Bertalanffy curves: see SSposnegRichards
for more details. If
the specified model in subsequent \(SSposnegRichards\), model selection or ploting calls
is monotonic (i.e. contains no recession parameters: modno= 12 or 32) recessional parameters
will not be included for these two models unless "force.nonmonotonic" option is TRUE,
in the specified pn.options list object, in which case parameters will be drawn from the specified
pn.options list object.
When specified, first.y and last.y are saved in list object specified by pn.options
to instruct
SSposnegRichards
to add this as the first or last value of the response, respectively,
during estimation.
To fit two-component double-curves, in which one curve equation is used up to (and including)
the x of intersection and a separate equation is used for x-values greater than the x of intersection
the argument twocomponent.x should be set to the value for the x of intersection. If this argument
is anything other than NA then a two-component model will be fitted when SSposnegRichards
is called. This option will be saved in list object specified by pn.options
and can be changed at will.
taper.ends can be used to speed up optimization as it extends the dataset at maximum and minimum extremes
of x by repeatedly pasting the y values at these extremes for a specified proportion of the range of x.
taper.ends is a numeric value representing the proportion of the range of x values are extended for and
defaults to 0.45 (45
tend towards a zero slope this is a suitable values. If tapered ends are not desirable then choose taper.ends = 0.
If the argument verbose = TRUE then details concerning the optimization processes within
SSposnegRichards
are printed on screen whenever SSposnegRichards
is called.
These include whether optimization of the first or second parts of the curve or simultaneous optimizations
are successful, if these have been further refined by nls, whether default parameters were used or the
parameterization was aborted and what parameter values were finally exported by SSposnegRichards
.
This option will be saved in the list object specified by pn.options
and can be changed at will.