Releases: nlmixr2/rxode2
v3.0.4
rxode2 3.0.4
-
Fix for iov simulation (#842)
-
Fix for
rxnbinom()
called directly from R (#847) and expand it to
match more close with R'srnbinom()
including allowing namedmu=
calls. In rxode2 ui, these are also now allowed.
What's Changed
- rebuild documentation by @billdenney in #830
- Create a rxUi method for digest by @mattfidler in #838
- Fix nesting by @mattfidler in #844
- Fixes for rxnbinom by @mattfidler in #849
Full Changelog: v3.0.3...v3.0.4
v3.0.3
rxode2 3.0.3
-
Add
logit
/expit
named expressions, that islogit(x, high=20)
becomeslogit(x, 0, 20)
in ui models. -
Updated random ui models like
rxnorm(sd=10)
to accept complex
numeric expressions likerxnorm(sd=10+1)
. -
Updated random ui models to accept complex non-numeric expressions
likerxnorm(sd=a+b)
-
Rework the
tad()
and related functions so they use the same
interface as compartments (this way they do not depend on the order
of compartments); See #815. For mu-referencing, Also allow dummy
variables to ignore state requirements (iepodo(depot)
in a single
line will not error when parsing mu-referenced equations). -
Add
getRxNpars
to api. This allows the development version of
babelmixr2
to better check what model is loaded and unload/reload
as necessary. -
Add
rxUdfUiControl()
to rxode2 user function to get control
information from something likenlmixr2
-
Bug fix for tracking time after dose when dosing to 2 compartments
occur at the exact same time (#804, #819) -
Change
transit()
model so that it usestad0()
,podo0()
and
related functions for a bit more stable simulation and estimation -
Fix compile flags to work with BH 1.87 (#826)
What's Changed
- Add getRxNpars to api by @mattfidler in #802
- add rxUdfUiControl() by @mattfidler in #807
- White list PopOS with isystem by @mattfidler in #809
- simplify repeated ifelse by @billdenney in #800
- Add NN activation fns by @mattfidler in #811
- Create R NN activation interface by @mattfidler in #813
- Fix parsing for tad() and podo() by @mattfidler in #817
- Change the tlast handling to be based on tlast per cmt by @mattfidler in #819
- Named logit/expit by @mattfidler in #824
- Fix BH flags to work with BH 1.87.0 by @mattfidler in #826
Full Changelog: v3.0.2...v3.0.3
v3.0.2
rxode2 3.0.2
-
Bug fix for
api
, the censoring function pointer has been updated
(#801). -
Query
rxode2.verbose.pipe
at run time instead of requiring it to
be set before loadingrxode2
. -
Have correct values at boundaries for
logit
,expit
,probit
,
andprobitInv
(instead ofNA
). For most cases this does not
break anything. -
Add a new style of user function that modifies the
ui
while
parsing or just before using the function (in the presence of
data
). -
Used the new user function interface to allow all random functions
inrxode2
ui functions to be named. For example, you can use
rxnorm(sd=3)
instead of having to userxnorm(0, 3)
, although
rxnorm()
still works.
What's Changed
- CRAN issues by @mattfidler in #795
- Handle logit/expit probit/probitInv at boundaries similar to
log
by @mattfidler in #796 rxode2.verbose.pipe
by @mattfidler in #797- Add user function in rxode2 ui that can change code when evaluating by @mattfidler in #782
- Documentation and pkgdown fix by @billdenney in #799
- API for censoring points to wrong function by @mattfidler in #801
Full Changelog: v3.0.1...v3.0.2
v3.0.1
rxode2 3.0.1
- Explicitly initialize the order vector to stop valgrind warning
(requested from CRAN)
Full Changelog: v3.0.0...v3.0.1
v3.0.0
rxode2 3.0.0
Breaking Changes
-
The model properties was moved from
$params
to$props
so it does
not conflict with the low levelrxode2
model$params
-
Error when specifying
wd
withoutmodName
-
With Linear and midpoint of a time between two points, how
rxode2
handles missing values has changed. When the missing value is lower
than the requested time, it will look backward until it finds the
first non-missing value (or if all are missing start looking
forward). When the missing value is higher than the requested time,
the algorithm will look forward until it finds the first non-missing
value (or if all are missing, start looking backward). -
The order of ODEs is now only determined by the order of
cmt()
and
d/dt()
. Compartment properties,tad()
and other compartment
related variables no no longer affect compartment sorting. The
optionrxode2.syntax.require.ode.first
no longer does anything. -
The handling of zeros "safely" has changed (see #775)
-
when
safeZero=TRUE
and the denominator of a division expression
is zero, use the Machine's small number/eps
(you can see this
value with.Machine$double.eps
) -
when
saveLog=TRUE
and the x in thelog(x)
is less than or
equal to zero, change this tolog(eps)
-
when
safePow=TRUE
and the expressionx^y
has a zero forx
and a negative number fory
replacex
witheps
.
Since the protection for divide by zero has changed, the results
will also change. This is a more conservative protection mechanism
than was applied previously. -
-
Random numbers from
rxode2
are different when usingdop853
,
lsoda
orindLin
methods. These now seed the random numbers in
the same way asliblsoda
, so the random number provided will be
the same with different solving methods. -
The arguments saved in the
rxSolve
for items likethetaMat
will
be the reduced matrices used in solving, not the full matrices (this
will likely not break very many items)
Possible breaking changes (though unlikely)
iCov
is no longer merged to the event dataset. This makes solving
withiCov
slightly faster (#743)
New features
-
You can remove covariances for every omega by piping with
%>% ini(diag())
you can be a bit more granular by removing all
covariances that have eithereta.ka
oreta.cl
by:%>% ini(diag(eta.ka, eta.cl))
or anything with correlations with
eta.cl
with%>% ini(diag(eta.cl))
-
You can also remove individual covariances by
%>% ini(-cov(a, b))
or%>% ini(-cor(a,b))
. -
You can specify the type of interpolation applied for added dosing
records (or other added records) for columns that are kept with the
keep=
option inrxSolve()
. This new option is
keepInterpolation
and can belocf
for last observation carried
forward,nocb
which is the next observation carried backward, as
well asNA
which puts aNA
in all imputed data rows. See #756.-
Note: when interpolation is linear/midpoint for
factors/characters it changes to locf with a warning (#759) -
Also note, that the default keep interpolation is
na
-
-
Now you can specify the interpolation method per covariate in the model:
-
linear(var1, var2)
says bothvar1
andvar2
would use linear
interpolation when they are a time-varying covariate. You could
also uselinear(var1)
-
locf()
declares variables using last observation carried forward -
nocb()
declares variables using next observation carried backward -
midpoint()
declares variables using midpoint interpolation
-
-
linear()
,locf()
,locb()
,midpoint()
,params()
,cmt()
anddvid()
declarations are now ignored when loading arxode2
model withrxS()
-
Strings can be assigned to variables in
rxode2
. -
Strings can now be enclosed with a single quote as well as a double
quote. This limitation was only in the rxode2 using string since
the R-parser changes single quotes to double quotes. (This has no
impact withrxode2({})
and ui/function form). -
More robust string encoding for symengine (adapted from
utils::URLencode()
andutils::URLdecode()
) -
Empty arguments to
rxRename()
give a warning (#688) -
Promoting from covariates to parameters with model piping (via
ini()
) now
allows setting bounds (#692) -
Added
assertCompartmentName()
,assertCompartmentExists()
,
assertCompartmentNew()
,testCompartmentExists()
,
assertVariableExists()
testVariableExists()
,
assertVariableNew()
,assertVariableName()
, and
assertParameterValue()
to verify that a value is a valid nlmixr2
compartment name, nlmixr2 compartment/variable exists in the model,
variable name, or parameter value (#726; #733) -
Added
assertRxUnbounded()
,testRxUnbounded()
,warnRxBounded()
to allownlmixr2
warn about methods that ignore boundaries #760 -
Added functions
tad0()
,tafd0()
,tlast0()
andtfirst0()
that
will give0
instead ofNA
when the dose has not been
administered yet. This is useful for use in ODEs sinceNA
s will
break the solving (so can be used a bit more robustly with models
like Weibull absorption). -
rxode2
is has no more binary link tolotri
, which means that
changes in thelotri
package will not requirerxode2
to be
recompiled (in most cases) and will not crash the system. -
rxode2
also has no more binary linkage toPreciseSums
-
The binary linkage for
dparser
is reduced to C structures only,
making changes in dparser less likely to cause segmentation faults
inrxode2
if it wasn't recompiled. -
A new model property has been added to
$props$cmtProp
and
$statePropDf
. Both are data-frames showing which compartment has
properties (currentlyini
,f
,alag
,rate
anddur
)
in therxode2
ui model. This comes from the lower
level model variable$stateProp
which has this information
encoded in integers for each state. -
A new generic method
rxUiDeparse
can be used to deparse meta
information into more readable expressions; This currently by
default supports lower triangular matrices by lotri, but can be
extended to support other types of objects like 'nlmixr2's
foceiControl()
for instance.
Bug fixes
-
Fix
ui$props$endpoint
when the ui endpoint is defined in terms of
the ode instead of lhs. See #754 -
Fix
ui$props
when the ui is a linear compartment model withoutka
defined. -
Model extraction
modelExtract()
will now extract model properties. Note that the model property ofalag(cmt)
andlag(cmt)
will give the same value. See #745 -
When assigning reserved variables, the parser will error. See #744
-
Linear interpolation will now adjust the times as well as the values
whenNA
values are observed. -
Fix when keeping data has
NA
values that it will not crash R; Also
fixed some incorrectNA
interpolations. See #756 -
When using
cmt()
sometimes the next statement would be corrupted
in the normalized syntax (like for instancelocf
); This bug was
fixed (#763) -
keep
will now error when trying to keep items that are in the
rxode2 output data-frame and will be calculated (#764)
Big change
- At the request of CRAN, combine
rxode2parse
,rxode2random
, and
rxode2et
into this package; The changes in each of the packages are
now placed here:
rxode2et (no changes before merge)
rxode2et 2.0.13
- Fix import of data where there are NA times
rxode2et 2.0.12
- Fix formatting issues identified by m1mac, as requested by CRAN
rxode2et 2.0.11
-
Make the stacking more flexible to help rxode2 have more types of plots
-
Add
toTrialDuration
by Omar Elashkar to convert event data to trial duration data -
Fix Issue #23 and prefer variable values over NSE values
rxode2et 2.0.10
-
Fix dollar sign accessing of objects (like data frames), as pointed
out by @frbrz (issue #16) -
Use
rxode2parse
functions for internal event table creation (where
they were moved to). -
Dropped C++14 and let the system decide.
rxode2et 2.0.9
-
Split off
et()
,eventTable()
and related functions. -
Also split off
rxStack()
andrxCbindStudyIndividual()
in this
package. -
Added a
NEWS.md
file to track changes to the package.
rxode2random (before merge)
- Fix a bug when simulating nested variables (#25)
rxode2random 2.1.0
- Breaking Change changed distributions from the standard C++
<random>
toboost::random
. Since this is not dependent on the
compiler, it makes the random numbers generated from Mac, Windows
and Linux the same for every distribution. Unfortunately with a new
random number transformation, the simulation results will likely be
different than they were before. The exception to this is the
uniform number, which was always the same between platforms.
rxode2random 2.0.13
- Fixed formatting issues (as requested by CRAN and identified on
m1mac
)
rxode2random 2.0.12
-
Added function
dfWishart
which gives (by simulation) an
approximation of the degrees of freedom of a Wishart to match a
rse
value. -
Added function
swapMatListWithCube
which swaps omegaList with
omegaCube values -
Ensure that the outputs are integers (instead of long integers) as
requested by CRAN for some checking functions.
rxode2random 2.0.11
- Fix qassert LTO
rxode2random 2.0.10
- Moved fast factor to
rxode2parse
to allowetTrans
to be moved there
rxode2random 2.0.9
- Initial release of
rxode2random
, which separates the parallel
safe, random number generation from 'rxode2' into a separate package to
reduce 'rxode2' compilation time. Th...
v2.1.3
rxode2 2.1.3
Bug fixes
-
Make sure that the object is a uncompressed rxode2 ui for solving with
rxSolve
(See #661) -
Fix #670 by using the last simulated observation residual when there
are trailing doses.
New features
-
Create a function to see if a rxode2 solve is loaded in memory
(rxode2::rxSolveSetup()
) -
Create a new function that fixes the rxode2 population values in the
model (and drops them in the initial estimates);rxFixPop()
Other changes
-
Pendantic no-remap (as requested by CRAN)
-
gcc USBAN fix (as requested by CRAN)
What's Changed
- Lin cmt b fixed by @mattfidler in #646
- Fallback to archive by @mattfidler in #648
- 661 make sure the UI is uncompressed before checking for meta information by @mattfidler in #662
- Update events-classic by @mattfidler in #652
- Poped check free by @mattfidler in #664
- 670 a different model with est = rxsolve crashes r by @mattfidler in #671
- Add rxFPixPGop by @mattfidler in #673
- Update random tests and readme by @mattfidler in #676
- increase tol by @mattfidler in #678
- pedantic-no-remap by @mattfidler in #680
- 681 gcc usban fixes by @mattfidler in #682
Full Changelog: v2.1.2...v2.1.3
v2.1.2
rxode2 2.1.2
Other changes
-
rxUi
compression now defaults to fast compression -
Fixes String literal formatting issues as identified by CRAN (#643)
-
Removes linear compartment solutions with gradients for intel c++
compiler (since they crash the compiler).
What's Changed
- Move Rinternals inclusion order down by @mattfidler in #635
- Add fast compression by @mattfidler in #641
- Add forder and rxInv string fixes as requested by CRAN by @mattfidler in #644
Full Changelog: v2.1.0...v2.1.2
v2.1.0
rxode2 2.1.0
Breaking changes
-
Steady state with lag times are no longer shifted by the lag time
and then solved to steady state by default. In addition the steady
state at the original time of dosing is also back-calculated. If you
want the old behavior you can bring back the option with
ssAtDoseTime=FALSE
. -
"dop853" now uses the
hmax
/h0
values from therxControl()
or
rxSolve()
. This may change some ODE solving using "dop853" -
When not specified (and xgxr is available), the x axis is no longer
assumed to be in hours
New features
-
User defined functions can now be R functions. For many of these R
functions they can be converted to C withrxFun()
(you can see the
C code afterwards withrxC("funName")
) -
Parallel solving of models that require sorting (like modeled lag
times, modeled duration etc) now solve in parallel instead of downgrading
to single threaded solving -
Steady state infusions with a duration of infusions greater than the
inter-dose interval are now supported. -
Added
$symengineModelNoPrune
and$symengineModelPrune
for
loading models into rxode2 withrxS()
-
When plotting and creating confidence intervals for multiple
endpoint models simulated from a rxode2 ui model, you can
plot/summarize each endpoint withsim
. (ie.confint(model, "sim")
orplot(model, sim)
).If you only want to summarize a subset of endpoints, you can focus
on the endpoint by pre-pending the endpoint withsim.
For example
if you wanted to plot/summarize only the endpointeff
you would
usesim.eff
. (ieconfint(model, "sim.eff")
orplot(model, sim.eff)
) -
Added
model$simulationIniModel
which prepend the initial
conditions in theini({})
block to the classicrxode2({})
model. -
Now
model$simulationModel
andmodel$simulationIniModel
will save
and use the initialization values from the compiled model, and will
solve as if it was the original ui model. -
Allow
ini(model) <- NULL
to drop ini block andas.ini(NULL)
givesini({})
(Issue #523) -
Add a function
modelExtract()
to extract model lines to allow
modifying them and then changing the model by piping or simply
assigning the modified lines withmodel(ui) <- newModifiedLines
-
Add Algebraic mu-referencing detection (mu2) that allows you to
express mu-referenced covariates as:
cl <- exp(tcl + eta.cl + wt_cl * log(WT/70.5))
Instead of the
cl <- exp(tcl + eta.cl + wt_cl * log.WT.div.70.5)
That was previously required (where log.WT.div.70.5
was calculated
in the data) for mu expressions. The ui
now has more information to
allow transformation of data internally and transformation to the old
mu-referencing style to run the optimization.
-
Allow steady state infusions with a duration of infusion greater than
the inter-dose interval to be solved. -
Solves will now possibly print more information when issuing a
"could not solve the system" error -
The function
rxSetPipingAuto()
is now exported to change the way you
affect piping in your individual setup -
Allow covariates to be specified in the model piping, that is
mod %>% model(a=var+3, cov="var")
will add"var"
as a covariate. -
When calculating confidence intervals for
rxode2
simulated objects
you can now useby
to stratify the simulation summary. For
example you can now stratify by gender and race by:confint(sim, "sim", by=c("race", "gender"))
-
When calculating the intervals for
rxode2
simulated objects you
can now useci=FALSE
so that it only calculates the default
intervals without bands on each of the percentiles; You can also
choose not to match the secondary bands limits withlevels
but use
your ownci=0.99
for instance -
A new function was introduced
meanProbs()
which calculates the
mean and expected confidence bands under either the normal or t
distribution -
A related new function was introduced that calculates the mean and
confidence bands under the Bernoulli/Binomial distribution
(binomProbs()
) -
When calculating the intervals for
rxode2
simulated objects you
can also usemean=TRUE
to use the mean for the first level of
confidence usingmeanProbs()
. For this confidence interval you can
override then
used in the confidence interval by usingn=#
. You
can also change this to a prediction interval instead using
pred=TRUE
. -
Also when calculating the intervals for
rxode2
simulated object
you can also usemean="binom"
to use the binomial distributional
information (and ci) for the first level of confidence using
binomProbs()
. For this confidence interval you can override the
n
used in the confidence interval by usingn=#
. You can also
change this to a prediction interval instead usingpred=TRUE
. With
pred=TRUE
you can override the number of predicted samples with
m=#
-
When plotting the
confint
derived intervals from anrxode2
simulation, you can now subset based on a simulated value like
plot(ci, Cc)
which will only plot the variableCc
that you
summarized even if you also summarizedeff
(for instance). -
When the rxode2 ui is a compressed ui object, you can modify the ini
block with$ini <-
or modify the model block with$model <-
.
These are equivalent toini(model) <-
andmodel(model) <-
,
respectively. Otherwise, the object is added to the user defined
components in the function (ie$meta
). When the object is
uncompressed, it simply assigns it to the environment instead (just
like before). -
When printing meta information that happens to be a
lotri
compatible matrix, uselotri
to express it instead of the default
R expression. -
Allow character vectors to be converted to expressions for piping
(#552) -
rxAppendModel()
will now take an arbitrary number of models and
append them together; It also has better handling of models with
duplicate parameters and models withoutini()
blocks (#617 / #573
/ #575). -
keep
will now also keep attributes of the input data (with special
handling forlevels
); This means a broader variety of classes will
be kept carrying more information with it (for example ordered
factors, data frame columns with unit information, etc) -
Piping arguments
append
forini()
andmodel()
have been
aligned to perform similarly. Thereforeini(append=)
now can take
expressions instead of simply strings andmodel(append=)
can also
take strings. Also model piping now can specify the integer line
number to be modified just like theini()
could. Also
model(append=FALSE)
has been changed tomodel(append=NULL)
.
While the behavior is the same when you don't specify the argument,
the behavior has changed to align withini()
when piping. Hence
model(append=TRUE)
will append andmodel(append=FALSE)
will now
pre-pend to the model.model(append=NULL)
will modify lines like
the behavior ofini(append=NULL)
. The default ofmodel(line)
modifying a line in-place still applies. While this is a breaking
change, most code will perform the same. -
Labels can now be dropped by
ini(param=label(NULL))
. Also
parameters can be dropped with the idiommodel(param=NULL)
or
ini(param=NULL)
changes the parameter to a covariate to align with
this idiom of dropping parameters -
rxRename
has been refactored to run faster
Internal new features
-
Add
as.model()
for list expressions, which impliesmodel(ui) <- ui$lstExpr
will assign model components. It will also more
robustly work with character vectors -
Simulated objects from
rxSolve
now can access the model variables
with$rxModelVars
-
Simulation models from the UI now use
rxerr.endpoint
instead of
err.endpoint
for thesigma
residual error. This is to align
with the convention that internally generated variables start with
rx
ornlmixr
-
Sorting only uses timsort now, and was upgraded to the latest
version from Morwenn
Bug fixes
-
Simulating/solving from functions/ui now prefers params over
omega
andsigma
in the model (#632) -
Piping does not add constants to the initial estimates
-
When constants are specified in the
model({})
block (likek <- 1
), they will not
be to theini
block -
Bug fix for
geom_amt()
when theaes
transformation hasx
-
Bug fix for some covariate updates that may affect multiple compartment
models (like issue #581)
Maintenance fixes
- Modify plot code to work with development
xgxr
What's Changed
- Update pkgdown by @billdenney in #508
- export .matchesLangTemplate() by @billdenney in #516
- Add mu2 detection by @mattfidler in #524
- Add as.ini(NULL) which fixes ini(model) <- NULL by @mattfidler in #525
- Remove duplicate by @mattfidler in #529
- 531 when time is na a backdoor debugging is needed by @mattfidler in #532
- Extract model lines initial function by @mattfidler in #534
- S0521 patch 2 by @mattfidler in #540
- Create RxODEchs.po by @s0521 in #539
- Create R-RxODEchs.po by @s0521 in #538
- Link to info on symengine installation; spelling fixes by @billdenney in #541
- Fix and test for nse by @mattfidler in #545
- Fix/test $ by @mattfidler in https://github.com/nlmixr2/rxode2/pull/...
v2.0.14
rxode2 2.0.14
-
CRAN requested that FORTRAN
kind
be changed as it was not portable;
This was commented code, and simply removed the comment. -
Bug-fix for
geom_amt()
; also now useslinewidth
and at leastggplot2 3.4.0
-
Some documentation was cleaned up from
rxode2
2.0.13
Full Changelog: v2.0.13...v2.0.14
v2.0.13
-
A bug was fixed so that the
zeroRe()
function works with correlated omega
values. -
A bug was fixed so that the
rename()
function works with initial
conditions for compartments (cmt(0)
)
What's Changed
- zeroRe() works with correlated omega matrices by @billdenney in #482
- Allow append to work with parameter promotion by @billdenney in #478
- Single thetas by @mattfidler in #489
- 495 solve function by @mattfidler in #497
- Add test and fix for #495 by @mattfidler in #496
- 487 piping bug rename doesnt work with initial conditions by @mattfidler in #498
- Simplify zeroRe to use
ini()
; Fix #490 by @billdenney in #501
Full Changelog: v2.0.12...v2.0.13