is.Warn: Check warning

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

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.

Usage

1
  is.Warn(obj)

Arguments

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.

Details

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.

Value

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.

Note

The Fault object can be error or warning, is.Faultwarn check for error or warning and is.Fault check the error.

Author(s)

Hossein Riazoshams, May 2014. Email: riazihosein@gmail.com URL http://www.riazoshams.com/nlr/

References

Riazoshams H, Midi H, and Ghilagaber G, 2018,. Robust Nonlinear Regression, with Application using R, Joh Wiley and Sons.

See Also

Fault, is.Faultwarn or is.Fault, nl.fitt, nl.fitt.gn, nl.fitt.rob, nl.fitt.rgn

Examples

1
2
is.Warn(Fault(FN=2))   # Not warning
is.Warn(Fault(FN=3))   # warning

nlr documentation built on July 31, 2019, 5:09 p.m.

Related to is.Warn in nlr...