fmx_constraint function

Parameter Constraint(s) of Mixture Distribution

Parameter Constraint(s) of Mixture Distribution

Determine the parameter constraint(s) of a finite mixture distribution fmx , either by the value of parameters of such mixture distribution, or by a user-specified string.

fmx_constraint( dist, distname = dist@distname, K = dim(dist@pars)[1L], pars = dist@pars )

Arguments

  • dist: (optional) fmx object
  • distname: character scalar, name of distribution (see fmx ), default value determined by dist
  • K: integer scalar, number of components, default value determined by dist
  • pars: double matrix , distribution parameters of a finite mixture distribution (see fmx ), default value determined by dist

Returns

Function fmx_constraint() returns the indices of internal parameters (only applicable to Tukey gg-&-hh mixture distribution, yet) to be constrained, based on the input fmx object dist.

Examples

(d0 = fmx('GH', A = c(1,4), g = c(.2,.1), h = c(.05,.1), w = c(1,1))) (c0 = fmx_constraint(d0)) user_constraint(character(), distname = 'GH', K = 2L) # equivalent (d1 = fmx('GH', A = c(1,4), g = c(.2,0), h = c(0,.1), w = c(1,1))) (c1 = fmx_constraint(d1)) user_constraint(c('g2', 'h1'), distname = 'GH', K = 2L) # equivalent (d2 = fmx('GH', A = c(1,4), g = c(.2,0), h = c(.15,.1), w = c(1,1))) (c2 = fmx_constraint(d2)) user_constraint('g2', distname = 'GH', K = 2L) # equivalent
  • Maintainer: Tingting Zhan
  • License: GPL-2
  • Last published: 2025-03-15

Useful links