% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_nlin.R
\name{fit_nlin}
\alias{fit_nlin}
\title{Fit epidemic models using nonlinear regression}
\usage{
fit_nlin(time, y, starting_par = list(y0 = 0.01, r = 0.03), maxiter = 50)
}
\arguments{
\item{time}{Numeric vector of assessment times.}

\item{y}{Numeric vector of disease intensity values.}

\item{starting_par}{Named list with starting values for `y0` and `r`.
When omitted or partially specified, `epifitter` supplies data-driven
fallback values.}

\item{maxiter}{Maximum number of iterations. Must be a positive number.}
}
\value{
A list with fit statistics, parameter estimates, and prediction
  data.
}
\description{
Fit exponential, monomolecular, logistic, and Gompertz models to disease
progress data using nonlinear regression.
}
\examples{
set.seed(1)
epi <- sim_logistic(N = 30, y0 = 0.01, dt = 5, r = 0.3, alpha = 0.2, n = 4)
fit_nlin(time = epi$time, y = epi$random_y, starting_par = list(y0 = 0.01, r = 0.03))

}
