Skip to contents

Administer a infusion (with rate being fixed) inside a rxode2 model

Usage

infuse(amt, rate, cmt = 1, ii = 0, addl = 0, ss = 0)

Arguments

amt

Numeric dose amount (for dose events) or 0 for observations. When rate > 0 this is interpreted as the total infusion amount and the infusion duration is amt / rate.

rate

Numeric infusion rate.

0

Bolus dose (default).

> 0

Fixed infusion rate; duration = amt / rate.

-1

Rate defined by the model (rate_<cmt> variable).

-2

Duration defined by the model (dur_<cmt> variable).

cmt

Integer compartment number (1-based) to which the dose is applied. Default is 1

ii

Numeric inter-dose interval. Used together with addl to schedule repeat doses at time, time + ii, time + 2*ii, ..., time + addl*ii. Also required when ss > 0. Default 0

addl

Integer number of additional doses beyond the first. The total number of doses pushed is addl + 1, spaced ii apart. Each dose is pushed as a standalone event (not as a periodic schedule in the event table).

ss

Integer steady-state flag applied to the first dose only (addl repetitions always use ss = 0).

0

No steady-state (default).

1

Steady-state additive: add SS solution to current state.

2

Steady-state replace: replace current state with SS solution.

Value

This function is only meaningful inside an rxode2 model; it returns NULL invisibly if called from R directly (after signaling an error).

Details

Behavior inside a model

infuse() is evaluated at every output time point (when the solver is exactly at a scheduled event time). The pushed event is inserted into the individual's event timeline and the solver visits it now or at the specified future time.

The number of events that may be pushed per individual is limited by the maxExtra argument of rxSolve(). When maxExtra = 0 (the default) there is no limit. Exceeding the limit causes an error.

Past-time pushes (where time < t) are silently ignored and counted; a warning is issued after solving.

Author

Matthew L. Fidler