weighted_mixture: Fit mixture to weighted sample

View source: R/AMIS_steps.R

weighted_mixtureR Documentation

Fit mixture to weighted sample

Description

Weights are implemented by using systematic resampling to obtain an unweighted set of parameters. An unweighted mixture is then fitted using fit_mixture.

Usage

weighted_mixture(parameters, nsamples, weights, log = F)

Arguments

parameters

An N x d matrix containing the sampled values for the d parameters.

nsamples

The number of parameter to resample as data to fit the mixture to.

weights

A vector of weights with length N.

log

logical indicating if weights are logged.

Value

A list of the mixture components (see function fit_mixture)

probs

The mixture weights

Mean

The means of the components

Sigma

The covariance matrices of the components

G

Number of components

BIC

BIC of fitted mixture

ModelName

Model name from package mclust

See Also

fit_mixture


OxfordRSE/trachomAMIS documentation built on Aug. 1, 2022, 10:21 p.m.