MixedGaussianTemplate {PCMBase}R Documentation

Create a template MixedGaussian object containing a regime for each model type

Description

Create a template MixedGaussian object containing a regime for each model type

Usage

MixedGaussianTemplate(mg, modelTypes = NULL)

Arguments

mg

a MixedGaussian object or an object that can be converted to such via as.MixedGaussian.

modelTypes

a (possibly named) character string vector. Each such string denotes a mixed Gaussian regime model class, e.g. the result of calling MGPMDefaultModelTypes(). If specified, an attempt is made to match PCMModelTypes(as.MixedGaussian(mg)) with the elements of modelTypes and an error is raised if the match fails. If not named, the model types and regimes in the resulting MixedGaussian object are named by the capital latin letters A,B,C,.... Default: NULL, which is interpreted as PCMModelTypes(as.MixedGaussian(mg, NULL)).

Value

a MixedGaussian with the same global parameter settings as for mg, the same modelTypes as modelTypes, and with a regime for each model type. The function will stop with an error if mg is not convertible to a MixedGaussian object or if there is a mismatch between the model types in mg and modelTypes.

Examples

mg <- MixedGaussianTemplate(PCMBaseTestObjects$model.ab.123.bSigmae_x)
mgTemplBMOU <- MixedGaussianTemplate(PCMBaseTestObjects$model.OU.BM)

[Package PCMBase version 1.2.14 Index]