mixconstr: Construct Constraints on Parameters

Description Usage Arguments Value References See Also Examples

View source: R/mixconstr.R

Description

Construct constraints on parameters and check if the constraints are invalid. See the reference for details.

Usage

1
2
3
mixconstr(conpi = "NONE", conmu = "NONE", consigma = "NONE", 
          fixpi = NULL, fixmu = NULL, fixsigma = NULL, cov = NULL, 
          size = NULL)

Arguments

conpi

a constraint on proportions, it can be either "NONE" denoting no constraint on proportions, or "PFX" indicating some proportions being fixed.

conmu

a constraint on means, it can be "NONE", "MFX", "MEQ", "MES" and "MGC", which denote no constraint on means, specified means fixed, means equal, means with equal spaces and means lying along a growth curve, respectively.

consigma

a constraint on standard deviations, it can be "NONE", "SFX", "SEQ", "FCV", "CCV", "BINOM", "NBINOM" and "POIS", which denote no constraint on standard deviations, specified standard deviations fixed, standard deviations equal, fixed coefficient of variation, constant coefficient of variation, the means and standard deviations have the same relation as that of Binomial distribution, as that of Negative Binomial distribution and as that of Possion distribution.

fixpi

NULL or a vector with TRUE and FALSE as its elements, indicating which proportions are fixed when conpi is "PFX". If an element is TRUE, the corresponding proportion is fixed at the starting value.

fixmu

similar to fixpi. NULL or a vector indicating which means are fixed when conmu is "MFX".

fixsigma

similar to fixpi. NULL or a vector indicating which standard deviations are fixed when consigma is "SFX".

cov

NULL or a scalar if consigma is "FCV", then the coefficients of variation are fixed at this scalar.

size

NULL or a vector of numbers of trials for each component when consigma is "BINOM" or "NBINOM".

Value

A list containing the following components, which are, in order, conpi, conmu, consigma, fixpi, fixmu, fixsigma, cov, size.

References

Macdonald, P.D.M. and Green, P.E.J. (1988) User's Guide to Program MIX: An Interactive Program for Fitting Mixtures of Distributions. ICHTHUS DATA SYSTEMS.

See Also

mixgroup for grouping data, mixparam for constructing starting values of parameters.

Examples

1
2
3
mixconstr()
mixconstr(conmu = "MEQ", consigma = "SFX", fixsigma = c(TRUE, FALSE, TRUE, TRUE, FALSE))
mixconstr(consigma = "BINOM", size = c(25, 25, 25))

Example output

$conpi
[1] "NONE"

$conmu
[1] "NONE"

$consigma
[1] "NONE"

$fixpi
NULL

$fixmu
NULL

$fixsigma
NULL

$cov
NULL

$size
NULL

$conpi
[1] "NONE"

$conmu
[1] "MEQ"

$consigma
[1] "SFX"

$fixpi
NULL

$fixmu
NULL

$fixsigma
[1]  TRUE FALSE  TRUE  TRUE FALSE

$cov
NULL

$size
NULL

$conpi
[1] "NONE"

$conmu
[1] "NONE"

$consigma
[1] "BINOM"

$fixpi
NULL

$fixmu
NULL

$fixsigma
NULL

$cov
NULL

$size
[1] 25 25 25

mixdist documentation built on May 2, 2019, 3:34 p.m.

Related to mixconstr in mixdist...