Learn R Programming

distrMod (version 2.1.1)

validParameter-methods: Methods for function validParameter in Package `distrMod'

Description

Methods for function validParameter in package distrMod to check whether a new parameter (e.g. "proposed" by an optimization) is valid.

Usage

validParameter(object, ...)
## S3 method for class 'ParamFamily':
validParameter(object, param)
## S3 method for class 'L2ScaleFamily':
validParameter(object, param, tol=.Machine$double.eps)
## S3 method for class 'L2LocationFamily':
validParameter(object, param)
## S3 method for class 'L2LocationScaleFamily':
validParameter(object, param, tol=.Machine$double.eps)
## S3 method for class 'BinomFamily':
validParameter(object, param, tol=.Machine$double.eps)
## S3 method for class 'PoisFamily':
validParameter(object, param, tol=.Machine$double.eps)
## S3 method for class 'GammaFamily':
validParameter(object, param, tol=.Machine$double.eps)

Arguments

object
an object of class ParamFamily
param
either a numeric vector or an object of class ParamFamParameter
tol
accuracy upto which the conditions have to be fulfilled
...
additional argument(s) for methods.

Value

  • logical of length 1 --- valid or not

Details

method for signature [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Examples

Run this code
NS <- NormLocationScaleFamily()
 validParameter(NS, c(scale=0.1, loc=2))
 validParameter(NS, c(scale=-0.1, loc=2))
 validParameter(NS, c(scale=0, loc=2))
 validParameter(NS, c(mean=2, sd=2))

Run the code above in your browser using DataLab