% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/best_model.R
\name{Best_model}
\alias{Best_model}
\title{Time-varying parameters of the best fitted GEV model}
\usage{
Best_model(add.data)
}
\arguments{
\item{add.data}{A numeric matrix of air temperature data as calculated by \code{Dataset_add()}.}
}
\value{
A list with:
\describe{
\item{best}{
Index (1--4) of the model with the lowest total AICc across all sites.
}
\item{atsite.models}{
Data frame containing the estimated parameters
(\code{mu0}, \code{mu1}, \code{sigma0}, \code{sigma1}, \code{shape})
and sample size for each site.
}
}
}
\description{
This function fits four time-varying GEV models (with different assumptions
on non-stationarity in location and/or scale) to each temperature series,
computes the AICc of each model, and selects the best one according to the
lowest total AICc.
}
\details{
Model fitting is performed via \code{ismev::gev.fit()}.  Four nested models
are considered:
\enumerate{
\item Stationary (constant location and scale).
\item Time-varying location only.
\item Time-varying scale only.
\item Time-varying location and scale.
}
For each site the function tries up to five optimisation methods
(\code{Nelder-Mead}, \code{BFGS}, \code{CG}, \code{L-BFGS-B}, \code{SANN})
and uses the first that converges.  Model selection is based on the sum of
site-level AICc values.
}
\examples{
add.data <- Dataset_add(TmaxCPC_SP)
best.parms <- Best_model(add.data = add.data$add_data)
}
