Learn R Programming

pharmr (version 0.96.0)

set_combined_error_model: set_combined_error_model

Description

Set a combined error model. Initial estimates for new sigmas are :math:(min(DV)/2)² for proportional and 0.09 for additive.

The error function being applied depends on the data transformation.

+------------------------+-----------------------------------------------------+ | Data transformation | Combined error | +========================+=====================================================+ | :math:y | :math:f + f epsilon_1 + epsilon_2 | +------------------------+-----------------------------------------------------+ | :math:log(y) | :math:log(f) + epsilon_1 + frac{epsilon_2}{f} | +------------------------+-----------------------------------------------------+

Usage

set_combined_error_model(model, dv = NULL, data_trans = NULL)

Value

(Model) Pharmpy model object

Arguments

model

(Model) Set error model for this model

dv

(str or numeric (optional)) Name or DVID of dependent variable. NULL for the default (first or only)

data_trans

(str (optional)) A data transformation expression or NULL (default) to use the transformation specified by the model.

See Also

set_additive_error_model : Additive error model

set_proportional_error_model: Proportional error model

Examples

Run this code
if (FALSE) {
model <- remove_error_model(load_example_model("pheno"))
model <- set_combined_error_model(model)
model$statements$find_assignment("Y")
model <- remove_error_model(load_example_model("pheno"))
model <- set_combined_error_model(model, data_trans="log(Y)")
model$statements$find_assignment("Y")
}

Run the code above in your browser using DataLab