gmmplot: Plot the Fit Results of 2-Component Gaussian Mixture Model

Description Usage Arguments Examples

View source: R/gmmplot.R

Description

Plot the Fit Results of 2-Component Gaussian Mixture Model

Usage

1
gmmplot(x, mu1, mu2, sigma, lambda, nbins = 15, xlim)

Arguments

x

a numeric vector

mu1

the mean of the 1st cluster

mu2

the mean of the 2nd cluster

sigma

the common variance of both clusters

lambda

the proportion parameter

nbins

the number of bins per cluster (6*sigma)

xlim

the limitation of x scale

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
set.seed(0)
x=list(c(
  rnorm(150, mean=0)
  , rnorm(50, mean=10)
  ))
fit_res=multigmmsamedistribu(x)

with(
  as.list(fit_res$par_conv)
  , gmmplot(x[[1]]
    , mu1=mu1
    , mu2=mu2
    , sigma=sigma
    , lambda=lambda
    , xlim=range(unlist(x))
    )
  )

l1kdeconv documentation built on May 2, 2019, 10:16 a.m.

Related to gmmplot in l1kdeconv...