% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_wrapper.R
\name{set_additive_error_model}
\alias{set_additive_error_model}
\title{set_additive_error_model}
\usage{
set_additive_error_model(model, dv = NULL, data_trans = NULL, series_terms = 2)
}
\arguments{
\item{model}{(Model) Pharmpy model}

\item{dv}{(Expr or str or numeric (optional)) Name or DVID of dependent variable. NULL for the default (first or only)}

\item{data_trans}{(numeric or str or Expr (optional)) A data transformation expression or NULL (default) to use the transformation
specified by the model. Series expansion will be used for approximation.}

\item{series_terms}{(numeric) Number of terms to use for the series expansion approximation for data
transformation.}
}
\value{
(Model) Updated Pharmpy model
}
\description{
Set an additive error model. Initial estimate for new sigma is (equation could not be rendered, see API doc on website)

The error function being applied depends on the data transformation. The table displays
some examples.

+------------------------+----------------------------------------+
| Data transformation    | Additive error                         |
+========================+========================================+
| (equation could not be rendered, see API doc on website)
+------------------------+----------------------------------------+
| (equation could not be rendered, see API doc on website)
+------------------------+----------------------------------------+
}
\examples{
\dontrun{
model <- load_example_model("pheno")
model$statements$find_assignment("Y")
model <- set_additive_error_model(model)
model$statements$find_assignment("Y")
model <- load_example_model("pheno")
model$statements$find_assignment("Y")
model <- set_additive_error_model(model, data_trans="log(Y)")
model$statements$find_assignment("Y")
}
}
\seealso{
set_proportional_error_model : Proportional error model

set_combined_error_model : Combined error model
}
