Skip to content

difficulty in running model #38

@jrwoodworth

Description

@jrwoodworth

Hi Ron,

I am attempting to create a simulation with a simple two-compartment oral model. Although the model compiles, the simulation does not seem to recognize the dose, and my simulation output is nothing but "0"s. Can you help please?

Thanks in advance.

Jim Woodworth

mod2 <-new_ode_model(code="
conc = A[2]/V
dAdt[1] = -KAA[1]
dAdt[2] = KA
A[1] +(Q/V3)*A[3] - (Q/V)*A[2] - (CL/V)*A[2]
dAdt[3] =(CL/V)*A[2] - (Q/V3)*A[3]
",declare_variables= c("F"),
dose = list(cmt=1,bioav="F"),
obs = list(cmt=2,scale="V"))

reg3 <- new_regimen(amt=3800,
n=5,
times=c(0,24,48,72,96),
type="oral")

par2 <-list(KA=1,CL=7.65,V=20,V3=25.7,Q=60.9,F=.9)

data3 <-sim(ode=mod2,
regimen=reg3,
parameters=par2,
n=100,
omega = c(0.1,0.05,0.1),
only_obs=TRUE
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions