set_power_on_ruv {pharmr}R Documentation

set_power_on_ruv

Description

Applies a power effect to provided epsilons. If a dependent variable is provided, then only said epsilons affecting said variable will be changed.

Initial estimates for new thetas are 1 if the error model is proportional, otherwise they are 0.1.

NOTE : If no DVs or epsilons are specified, all epsilons with the same name will be connected to the same theta. Running the function per DV will give each epsilon a specific theta.

Usage

set_power_on_ruv(
  model,
  list_of_eps = NULL,
  dv = NULL,
  lower_limit = 0.01,
  ipred = NULL,
  zero_protection = FALSE
)

Arguments

model

(Model) Pharmpy model to create block effect on.

list_of_eps

(str or array (optional)) Name/names of epsilons to apply power effect. If NULL, all epsilons will be used. NULL is default.

dv

(str or Expr or numeric (optional)) Name or DVID of dependent variable. NULL will change the epsilon on all occurences regardless of affected dependent variable.

lower_limit

(numeric (optional)) Lower limit of power (theta). NULL for no limit.

ipred

(str or Expr (optional)) Symbol to use as IPRED. Default is to autodetect expression for IPRED.

zero_protection

(logical) Set to TRUE to add code protecting from IPRED=0

Value

(Model) Pharmpy model object

See Also

set_iiv_on_ruv

Examples

## Not run: 
model <- load_example_model("pheno")
model <- set_power_on_ruv(model)
model$statements$find_assignment("Y")

## End(Not run)

[Package pharmr version 1.0.1 Index]