parToMatricesFactory: Factory: parToMatrices

View source: R/estimation_param_MLE.R

parToMatricesFactoryR Documentation

Factory: parToMatrices

Description

Creates a helper function to convert a parameter vector par to a Gamma and/or Theta matrix.

Usage

parToMatricesFactory(
  graph,
  init = NULL,
  fixParams = integer(0),
  parIsTheta = FALSE,
  checkValidity = TRUE
)

Arguments

graph

par represents entries corresponding to the edges of graph.

init

The values used for fixed parameters

fixParams

The indices (logical or numeric) of fixed parameters in the full parameter vector.

parIsTheta

TRUE if par represents entries in Theta (otherwise Gamma)

checkValidity

Whether to check if the implied Gamma/Theta is a valid parameter matrix.

Value

A function parToMatrices(par, forceGamma=FALSE, forceTheta=FALSE), which takes a parameter vector and returns either NULL or a list with entries Gamma, Theta. The function returns NULL if checkValidity==TRUE and par implies an invalid matrix. Otherwise, depending on parIsTheta, forceTheta, and forceGamma, one or both of Gamma and Theta are matrices implied by par.


graphicalExtremes documentation built on Nov. 14, 2023, 1:07 a.m.