% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{ncind}
\alias{ncind}
\title{Sample components from a discrete mixture of normals}
\usage{
ncind(y, mu, sig, q)
}
\arguments{
\item{y}{vector of data}

\item{mu}{vector of component means}

\item{sig}{vector of component standard deviations}

\item{q}{vector of component weights}
}
\value{
Sample from \{1,...,k\}
}
\description{
Sample Z from 1,2,...,k, with P(Z=i) proportional to q_iN(mu_i,sig2_i).
}
