Count the number of free parameters associated with a PCM or a PCM-parameter

PCMParamCount(
  o,
  countRegimeChanges = FALSE,
  countModelTypes = FALSE,
  offset = 0L,
  k = 1L,
  R = 1L,
  parentModel = NULL
)

Arguments

o

a PCM model object or a parameter of a PCM object

countRegimeChanges

logical indicating if regime changes should be counted. If TRUE, the default implementation would add PCMNumRegimes(model) - 1. Default FALSE.

countModelTypes

logical indicating whether the model type should be counted. If TRUE the default implementation will add +1 only if there are more than one modelTypes (length(attr(model, "modelTypes", exact = TRUE)) > 1), assuming that all regimes are regimes of the same model type (e.g. OU). The implementation for MRG models will add +1 for every regime if there are more than one modelTypes. Default FALSE.

offset

an integer denoting an offset count from which to start counting (internally used). Default: 0.

k

an integer denoting the number of modeled traits. Default: 1.

R

an integer denoting the number of regimes in the model. Default: 1.

parentModel

NULL or a PCM object. Default: NULL.

Value

an integer