% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitting.R
\name{fitACS}
\alias{fitACS}
\title{Autocorrelation structure fitting}
\usage{
fitACS(acf, ID, start = NULL, lag = NULL)
}
\arguments{
\item{acf}{numeric vector of autocorrelation function values from lag 0}

\item{ID}{character; ACS identifier (e.g. \code{"weibull"}, \code{"paretoII"})}

\item{start}{numeric vector of starting parameter values; if \code{NULL},
all parameters start at 1}

\item{lag}{integer; number of lags to use; if \code{NULL}, lags up to the
first value \eqn{\le 0.01} are used (or all lags if none drops below 0.01)}
}
\value{
An object of class \code{"fitACS"}: a named list of fitted ACS
parameters with attributes \code{ID} and \code{eACS} (empirical ACS used
for fitting).
}
\description{
Fits a parametric autocorrelation structure (ACS) to empirical ACF values
using Nelder-Mead optimisation with MSE criterion.
}
\examples{

x <- arima.sim(model = list(ar = 0.8), n = 1000)

acsfit <- fitACS(acf(x, plot = FALSE)$acf, "weibull", c(1, 1))

}
\seealso{
\code{\link{fitDist}}, \code{\link{plot.fitACS}}, \code{\link{acs}}
}
