You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Required parameters: KA, CL, V
Covariates:
Variables:
Number of compartments: 2
Observation compartment: 2
Observation scaling: V
Lag time:
The model has two compartments, with the amount of the chemical, 1 being the gut, 2 the central compartment i.e plasma?
And to get the concentration I need to decide on an observation compartment and scale it?
"Obs" here is compartment 2 (in mg) divided by the selected scaling variable V (L) giving me the concentration in mg / L?
(How does the model know scaling means division, not multiplication..?)
How does the model know scaling means division, not multiplication..?
That is more or less by convention, this is how scaling is defined in NONMEM (and I suppose in Monolix too).
gives me zero in all compartments
I think the code is correct (the version where you declare F1 as variable too). Do you supply "F1" as a parameter (or as a covariate) when you run the simulation? (you should)
I just spend a little time getting exactly this working (on InsightRX/PKPDsim though). F1 should not be a defined as a variable, only a parameter. I found out by using ronkeizer's example from #35
Trying and failing miserably. :)
Using the premade model pk1_cmt_oral, I get this description:
ODE definition:
;
Required parameters: KA, CL, V
Covariates:
Variables:
Number of compartments: 2
Observation compartment: 2
Observation scaling: V
Lag time:
The model has two compartments, with the amount of the chemical, 1 being the gut, 2 the central compartment i.e plasma?
And to get the concentration I need to decide on an observation compartment and scale it?
"Obs" here is compartment 2 (in mg) divided by the selected scaling variable V (L) giving me the concentration in mg / L?
(How does the model know scaling means division, not multiplication..?)
basemodel <- new_ode_model(
code = "
dAdt[1] = -KA * A[1]
dAdt[2] = +KA * A[1] -(CL/V) * A[2]
",obs = list(cmt = 2, scale = "V"))
gives me the same results as pk1_cmt_oral, and adding F1 should be
Bioavailability <- new_ode_model(
code = "
dAdt[1] = -KA * A[1]
dAdt[2] = +KA * A[1] -(CL/V) * A[2]
",obs = list(cmt = 2, scale = "V"),
dose = list(cmt = 1, bioav = "F1")
but this code gives me an error ( error: 'F1' was not declared in this scope)
and declaring it like this:
Bioavailability <- new_ode_model(
code = "
dAdt[1] = -KA * A[1]
dAdt[2] = +KA * A[1] -(CL/V) * A[2]
",obs = list(cmt = 2, scale = "V"),
dose = list(cmt = 1, bioav = "F1") declare_variables = c("F1")
)
gives me zero in all compartments
Hardcoding an F1 value doesn't change my results from not using any bioavailability data.
Bioavailability <- new_ode_model(
code = "
dAdt[1] = -KA * A[1]
dAdt[2] = +KA * A[1] -(CL/V) * A[2]
",obs = list(cmt = 2, scale = "V"),
dose = list(cmt = 1, bioav = 0.000000001)
)
has no effect?
Started looking for it in source code, but thought I'd better ask. :)
The text was updated successfully, but these errors were encountered: