dmix {fitmix}R Documentation

The mixture distribution

Description

Computing probability density function for the well-known mixture models.

Usage

dmix(lifespan, model, K, param)

Arguments

lifespan

Vector of samples

model

choice of one of the mixture models; gompertz, log-logistics, log-normal, and weibull.

K

number of components

param

Vector of weight \omega, shape \alpha, and scale \beta parameters.

Value

A vector of the same length as lifespan data, given the pdf of the one of the mixture models computed at lifespan.

Examples

lifespan<-seq(0,30,0.2)
K<-2
weight<-c(0.6,0.4)
alpha<-c(0.5,1)
beta<-c(1,0.5)
param<-c(weight,alpha,beta)
dmix(lifespan, "log-logistic", K, param)

[Package fitmix version 0.1.0 Index]