Learn R Programming

distrMod (version 2.0.7)

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

Description

Methods for function modifyModel in package distrMod; modifyModel moves a model from one parameter value to another.

Usage

modifyModel(model, param,...)
## S3 method for class 'L2ParamFamily,ParamFamParameter':
modifyModel(model,param, 
                       .withCall = TRUE, ...)
## S3 method for class 'L2LocationFamily,ParamFamParameter':
modifyModel(model,param, ...)
## S3 method for class 'L2ScaleFamily,ParamFamParameter':
modifyModel(model,param, ...)
## S3 method for class 'L2LocationScaleFamily,ParamFamParameter':
modifyModel(model,
                       param, ...)
## S3 method for class 'GammaFamily,ParamFamParameter':
modifyModel(model,param, ...)
## S3 method for class 'ExpScaleFamily,ParamFamParameter':
modifyModel(model,param, ...)

Arguments

model
an object of class L2ParamFamily --- the model to move.
param
an object of class ParamFamParameter --- the parameter to move to.
.withCall
logical: shall slot fam.call be updated?
...
additional argument(s) for methods; not used so far

Value

  • a corresponding instance of the model in argument model with moved parameters.

Details

modifyModel is merely used internally for moving the model along modified parameter values during a model fit. It generally simply copies the original model and only modifies the affected slots, i.e. distribution, the distribution of the observations, param, the parameter, L2deriv, the L2-derivative at the parameter, L2FisherInfo, the Fisher information at the parameter, the symmetry slots distrSymm, L2derivSymm, and L2derivDistrSymm, and, finally, L2derivDistr the (marginal) distribution(s) of the L2derivative. By default, also slot fam.call is updated. In case model is of class L2LocationFamily, L2ScaleFamily, or L2LocationScaleFamily, symmetry slots are updated to be centered about the median of the (central) distribution (assuming the latter is symmetric about the median); as an intermediate step, these methods call the general modifyModel-method for signature L2ParamFamily; in this call, however, slot fam.call is not updated (this is the reason for argument .withCall); this is then done in the individual parts of the corresponding method.