Learn R Programming

cmgnd (version 0.1.1)

sim_cmgnd: sim_cmgnd: Function to Simulate Univariate Constrained Mixtures of Generalized Normal Distributions

Description

Simulate univariate constrained mixture of generalized normal distribution models. Remeber to set the set.seed() before the function sim_cmgnd().

Usage

sim_cmgnd(
  n = 1000,
  pi = rep(0.5, 2),
  mu = c(1, 5),
  sigma = c(1, 1),
  nu = c(2, 2)
)

Value

sim_data

The simulated data.

sim_clus

The cluster indication of simulated data.

Arguments

n

A numeric value indicating the total number of observations to simulate.

pi

A numeric vector of the mixture weights \(\pi_k\).

mu

A numeric vector of the location parameter \(\mu_k\).

sigma

A numeric vector of the scale parameter \(\sigma_k\).

nu

A numeric vector of the shape parameter \(\nu_k\).