This function creates the basis for a general pharmacometric model, a flexible but verbose model type.
model()
A general pharmacometric model
The function creates the foundation for a general pharmacometric model to which different building blocks can be added. The following building blocks are relevant for this model type:
Parameters: prm_log_normal, prm_logit_normal, prm_no_var, prm_normal
Observations: obs_additive, obs_combined, obs_proportional
Algebraic relationships: algebraic
Compartments: compartment
Flows: flow
Input variables: input_variable, dataset
The more specialized pk_model()
is converted to a general model during the rendering process.
m <- model() + input_variable("dose") + prm_log_normal("emax") + prm_log_normal("ed50") + obs_additive(eff~emax*dose/(ed50+dose)) render(m)#> $PROBLEM #> $INPUT DOSE ID DV #> $DATA data.csv IGNORE=@ #> $PRED #> EMAX = THETA(1) * EXP(ETA(1)) #> ED50 = THETA(2) * EXP(ETA(2)) #> EFF = EMAX * DOSE/(ED50 + DOSE) #> Y = EFF + EPS(1) #> $ESTIMATION METHOD=COND MAXEVAL=999999 #> $THETA (0, 1, Inf) ; POP_EMAX #> $THETA (0, 1, Inf) ; POP_ED50 #> $OMEGA 0.1 ; IIV_EMAX #> $OMEGA 0.1 ; IIV_ED50 #> $SIGMA 1; RUV_ADD