% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smsncut.R
\name{smsn_rdist}
\alias{smsn_rdist}
\title{Random generation from an SMSN distribution}
\usage{
smsn_rdist(n, theta, family = c("SN", "ST"))
}
\arguments{
\item{n}{Integer. Number of observations.}

\item{theta}{Numeric vector of unconstrained parameters. Length 3 for SN,
length 4 for ST.}

\item{family}{Character string, either \code{"SN"} or \code{"ST"}.}
}
\value{
Numeric vector of length \code{n}.
}
\description{
Generates random observations from a skew-normal (SN) or skew-t (ST)
distribution under the unconstrained parametrisation
\eqn{\theta = (\xi, \log\omega, \alpha)} for SN, or
\eqn{\theta = (\xi, \log\omega, \alpha, \log(\nu-2))} for ST.
}
\examples{
set.seed(1)
theta_sn <- c(0, log(1), 1.5)
x <- smsn_rdist(100L, theta_sn, "SN")
hist(x, breaks = 20, main = "SN sample")
}
