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

modifyModel-methodsR Documentation

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,...)
## S4 method for signature 'ParamFamily,ParamFamParameter'
modifyModel(model,param, 
                       .withCall = TRUE, ...)
## S4 method for signature 'L2ParamFamily,ParamFamParameter'
modifyModel(model,param, 
                       .withCall = TRUE, .withL2derivDistr = TRUE, ...)
## S4 method for signature 'L2LocationFamily,ParamFamParameter'
modifyModel(model,param, ...)
## S4 method for signature 'L2ScaleFamily,ParamFamParameter'
modifyModel(model,param, ...)
## S4 method for signature 'L2LocationScaleFamily,ParamFamParameter'
modifyModel(model,
                       param, ...)
## S4 method for signature 'GammaFamily,ParamFamParameter'
modifyModel(model,param, ...)
## S4 method for signature 'ExpScaleFamily,ParamFamParameter'
modifyModel(model,param, ...)

Arguments

model

an object of class ParamFamily — the model to move.

param

an object of class ParamFamParameter — the parameter to move to.

.withCall

logical: shall slot fam.call be updated?

.withL2derivDistr

logical: shall slot L2derivDistr be updated or just the call to do the updated be stored?

...

additional argument(s) for methods; not used so far

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.

Value

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


distrMod documentation built on Jan. 31, 2024, 3:06 a.m.