% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dcm.inputs.R
\name{init.dcm}
\alias{init.dcm}
\title{Initial Conditions for Deterministic Compartmental Models}
\usage{
init.dcm(s.num, i.num, r.num, s.num.g2, i.num.g2, r.num.g2, ...)
}
\arguments{
\item{s.num}{Number of initial susceptible persons. For two-group models,
this is the number of initial group 1 susceptible persons.}

\item{i.num}{Number of initial infected persons. For two-group models, this
is the number of initial group 1 infected persons.}

\item{r.num}{Number of initial recovered persons. For two-group models, this
is the number of initial group 1 recovered persons. This parameter is
only used for the \code{SIR} model type.}

\item{s.num.g2}{Number of initial susceptible persons in group 2. This
parameter is only used for two-group models.}

\item{i.num.g2}{Number of initial infected persons in group 2. This parameter
is only used for two-group models.}

\item{r.num.g2}{Number of initial recovered persons in group 2. This
parameter is only used for two-group \code{SIR} models.}

\item{...}{Additional initial conditions passed to model.}
}
\value{
An \code{EpiModel} object of class \code{init.dcm}.
}
\description{
Sets the initial conditions for deterministic compartmental
models simulated with \code{dcm}.
}
\details{
The initial conditions for a model solved with \code{\link[=dcm]{dcm()}} should be
input into the \code{init.dcm} function. This function handles initial
conditions for both base model types and original models.

Original models may use the parameter names listed as arguments here, a new
set of names, or a combination of both. With new models, initial conditions
must be input in the same order that the solved derivatives from the model
are output.
}
\section{Sensitivity Analyses}{

Like \code{\link[=param.dcm]{param.dcm()}}, initial conditions may be specified as vectors of length
greater than one to run sensitivity analyses over initial conditions. When
\code{sens.param = TRUE} in \code{\link[=control.dcm]{control.dcm()}} (the default), each element of the
vector produces a separate model run. If both parameters and initial
conditions have vector values, all vectors must have the same length.
}

\examples{
# SI model initial conditions
init <- init.dcm(s.num = 500, i.num = 1)

# Sensitivity analysis over initial infected count
init <- init.dcm(s.num = 500, i.num = c(1, 5, 25))

}
\seealso{
Use \code{\link[=param.dcm]{param.dcm()}} to specify model parameters and
\code{\link[=control.dcm]{control.dcm()}} to specify the control settings. Run the
parameterized model with \code{\link[=dcm]{dcm()}}.
}
\keyword{parameterization}
