Return TRUE if warning occured. Error or warning of a procedure in nlr
package will be saved in Fault
slot of fited object with object type class Fault
. is.Warn
read the Fault
slot or a Fault
object to detect warning happened or no. The value inside Fault$FN
will display the error code and Fault$FL
represent error, both together can be used to identify warning.
is.Warn(obj)
all fited objects include a slot of Fault
object to represent the error. obj
can be fitt objects: nl.fitt
, nl.fitt.gn
, nl.fitt.rob
, nl.fitt.rgn
, Fault
.
logical value TRUE
or T
if warning occured, FALSE
or F
if result is not warning. Technicaly if The slot FN
of Fault
object if is not zero means error or warning raised and FL
is true if error occured. Other slots represent the error or warning informations.
is.Warn
is imitating other is.
primitive functions.It is implemented for debuging purpose in nlr
. Warning might happen for example when maximum number of iteration exceeded, in this case the result might not be reliable and options should be changed. Another example might be when an infinit, null or rmissing value happened, in some cases not any result might be returned. For example if a derivative of a nonlinear function does not exist, the gradient values might have null values then the Nelder-Mead derivative free should be used.
Riazoshams H, Midi H, and Ghilagaber G, 2018,. Robust Nonlinear Regression, with Application using R, Joh Wiley and Sons.
Fault
, is.Faultwarn
or is.Fault
, nl.fitt
, nl.fitt.gn
, nl.fitt.rob
, nl.fitt.rgn
# NOT RUN {
is.Warn(Fault(FN=2)) # Not warning
is.Warn(Fault(FN=3)) # warning
# }
Run the code above in your browser using DataLab