% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/fit.model.R \name{fit.model} \alias{fit.model} \title{fit.model} \usage{ fit.model(input.well, growth.model, backup.growth.model = NULL, fit.if.no.growth = F, use.linear.param = F, use.loess = F, smooth.param, silent = T) } \arguments{ \item{input.well}{The well needed to be fitted with the given model.} \item{growth.model}{What growth model should be used?} \item{backup.growth.model}{If \code{gowth.mode} fails, this model will be used.} \item{fit.if.no.growth}{should the function attempt to fit a well even if there was no growth detected? default is F} \item{use.linear.param}{Should an additional linear parameter (c) be used when fitting the data to the model?} \item{use.loess}{Should Local Polynomial Regression Fitting (loess function) be used instead of nls?} \item{smooth.param}{If loess is used, an optional smoothing parameter. Default is .6} \item{silent}{output back to R console?} } \description{ This function will use the function stored in the "guess" slot of \code{growth.model} to calculate initial guesses for growth.model parameters, then it will use the "formula" slot with \code{nls} to fit a non-linear least squares \code{growth.model} or Local Polynomial Regression Fitting to the data. Richards model is first fitted. If the shape parameter is statisticaly significant then Richards is used. If it is within 2 SE of 1 or Zero than a simpler model is preferred. If the Richards fit fails, then Logistic is tried. If it fails, Gompertz is tried. Model fit failure is reported if none of the models can sucessfully fit the data }