Skip to content

SS event with addl >= 1 #7

@charlesm93

Description

@charlesm93

Summary:

Not sure what the behavior should be for such an event, but need to figure it out.

Description:

The ambiguity arises when rate != 0 and ii = 0 (constant rate infusion), and amt != 0. First of, in the case of a constant rate infusion, amt will be ignored if addl = 0. Maybe we should produce a warning message if he or she passes a non-zero amt?

When addl != 0, the dosing regime that led to the steady state gets repeated at the end of the steady state. This leads to a prolonged steady state. For example, if amt = 1200, and rate = 150, a constant infusion begins when the steady state ends, and ends after 8 hours. As a result, the steady state is prolonged for 8 hours. The gradient with respect F (biovar) didn't get properly evaluated either (I saw discrepancies of up to 15% between finite and automatic differentiation, not for the steady state event, but the subsequent ones).

Reproducible Steps:

In generalOdeModel_test.cpp, run the second test, genCpt_One_SS_2, and set addl[0] = 10 (any non-zero value works). This should cause the autodiff unit tests to fail.

Current Version:

Stan v2.15.0
Torsten v0.83beta

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions