The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
set_utility
to class
MarkovState
to allow setting dynamically.get_cycle
to class SemiMarkovModel
to query the current cycle number.get_tcycle
to class SemiMarkovModel
to query the cycle duration.hcc.QALY
to methods for cycling in class
SemiMarkovModel
. The hcc
arguments control
whether half cycle correction is applied to the values written to the
Markov trace but do not affect the value of the end-cycle population
passed to the next cycle, or when the state populations are queried. The
new argument permits half cycle correction to be applied independently
to the trace values of state populations, costs and QALYs, which can be
useful if, for example, it is desired to display end-cycle populations
with mid-cycle costs and utilities.draw
of class DecisionTree
to avoid unintentional clipping of node labels. Modified algorithm to
make better use of unit conversions that are implicit in package grid
and to ensure that symbols for nodes retain the correct aspect ratio
when drawn in plot windows that are not square.evaluate
in class
DecisionTree
to check that the sum of probabilities for
each strategy is one, for each run. Confirmed that the check operates
correctly when the conditional probabilities of traversing an edge are
scalars or ModVars.1 - p
where p
is sampled from a Beta
distribution, for example. Revised the Tegaderm vignette to demonstrate
this feature.Action
and Reaction
to
disallow values of NA for cost and benefit.set_interval
to LeafNode
to allow
dynamic setting. Disallowed a utility of NA.LogNormModVar
and
LogNormDistribution
to reference the article in
BioInformatics
.test_that
expectations, and referenced code from the
vignette’s markdown. This avoided duplication of code between the
vignette and test code.set_utility
to LeafNode
.evaluate
method of DecisionTree
to
ensure that the components of strategy labels are ordered by the
lexicographical order of node labels. For example, if there is a
decision node labelled d1
with emanating action edges
d1a
and d1b
, and a decision node labelled
d2
with emanating action edges d2a
and
d2b
, the set of strategy labels is
{d1a_d2a, d1a_d2b, d1b_d2a, d1b_d2b}
, not
{d2a_d1a, d2a_d1b, d2b_d1a, d2b_d1b}
, even if node
d1
has a greater index than node d2
.evaluate_walks
method of
DecisionTree
to return the index of the leaf node for each
path as the row name of the numeric matrix. Formerly it was coerced into
a real value and saved in the matrix in a column called
Leaf
.reset
function of SemiMarkovModel
to default to zero population in each state. Previously the first state
was allocated 1000 people, but if vertexes were reordered, the first
state is not the same as the first one provided, leading to unexpected
behaviour.postree
method of Arborescence
to
use lexicographic order of node labels to define sibling order. Changed
local array indexing to use [[]]
and fixed unintentional
use of array slicing under some circumstances.par
in the tornado plot section of
DecisionTree
with calls to withr::with_par
.
This avoids the need to change the global plot defaults. Package
withr
added to dependency list.test_that
expectations, and referenced code from the
vignette’s markdown. This reduced duplication of code between vignette
and test harness.vertex_label
and
edge_label
to Graph
to support checked
iteration of lists of nodes and edges when retrieving labels.edge_index
, edge_at
and has_edge
in Graph
.vertex_index
,
vertex_at
and has_vertex
in
Graph
.arrow_source
and
arrow_target
to Digraph
to support checked
iteration of lists of arrows to retrieve their source or target
nodes.test-model-Sumatriptan.R
), to avoid replicating
code in test scripts.set_cost
, set_benefit
and
set_probability
to class Reaction
to allow
dynamic setting of costs, benefits and probabilities in decision trees
without the need to rebuild the model.set_cost
and set_benefit
to class
Action
to allow dynamic setting of costs and benefits in
decision trees without the need to rebuild the model.vutils.R
in folder vignettes as a home for
helper functions used in vignette building.SemiMarkovModel
by creating
private methods to manage the kernel operations of cycling the
population and tallying the costs and benefits. Approx factor of 10
improvement in speed, which is helpful with PSA.hcc.pop
and hcc.cost
in function cycle
of SemiMarkovModel
. Removed
the requirement for hcc.pop
to be TRUE if
hcc.cost
is TRUE (i.e., the corrections are applied
independently).test-model-AZT.R
), taking
code from the SM01-HIV vignette and the SemiMarkovModel test script.
Non-test chunks are referenced by the vignette to avoid repetition.
Edited and clarified the vignette and added PSA (as per Briggs example
4.7). Used DiagrammeR
to create Markov model diagram.test_that
context, thus avoiding repetition of code between
the vignette and the test case.rankdir
, width
and
height
in Digraph::as_DOT
to permit the
drawing direction and size of canvas to be adjusted in the dot
syntax.abortif
and abortifnot
to be ...
, to increase their
similarity with stopifnot
, allowing testing of multiple
conditions with a single call.threshold
in DecisionTree
now has
no default value for parameter outcome
.chance_nodes
in DecisionTree
now
has the option to return nodes, indices or labels, consistent with
similar functions for decision nodes and leaf nodes.Digraph
now contains
integers.Graph
and
Digraph
now contain integers.abortif
, which is identical to
abortifnot
but with a negated condition. Intended to make
argument checks more readable by avoiding double negatives.is_probabilistic
for ExprModVar
now returns correct result if the expression involves integers
(previously and erroneously it returned NA).is_probabilistic
for base class
ModVar
now returns FALSE
rather then
NA
.as_value
to
as_numeric
to more accurately reflect its behaviour.DecisionTree
.MarkovState$utility
.u <- ConstModVar$new(description = "", units = "", const = 2)
and passed as the utility
argument to
LeafNode
. Scalar arguments remain subject to range checking
in [-Inf,1] for normal usage and to retain the previous behaviour.as_value
to return the value
of an object if it is a ModVar
(via its get()
method) or if it is a numeric object. Intended as an internal function
to avoid type testing on polymorphic variables.is_ModVar
to test whether an
object is a model variable. Intended as an internal function to the
package.abortifnot
(a replacement for
stopifnot
using rlang but with limited capability). It is a
non-exported function intended for use in checking function arguments
without increasing the cyclomatic complexity of the function
itself.W
(list of
walks) for DecisionTree$evaluate_walks
. Added the
alternative argument Wi
in which the indices of edges in
each walk are provided, to improve efficiency in avoiding repeated
conversion between edges and indices during PSA. Added function
edge_properties
to collect information for computing path
products and sums without repeated tree walking.vertex_along
, edge_along
,
vertex_at
and edge_at
to class
Graph
to clarify the relationship between nodes and edges
and their indices, and to help optimise iterations in graph
algorithms.SemiMarkovModel$cycle()
by
generating intermediate results as matrices.ExprModVar
to
check that nested autocorrelation is supported (i.e. when at least one
model variable appears twice or more as an operand of an expression,
when it is evaluated recursively).set
for
ModVar
and ExprModVar
in the documentation for
those classes.ExprModVar
now has an empirical distribution,
which is sampled on creation, to optimize functions mu_hat
,
sigma_hat
and q_hat
, at Paola’s
suggestion.EmpiricalDistribution
and its test
harness.CohortMarkovModel
to
SemiMarkovModel
in README.OccCost
and EntryCost
columns in
SemiMarkovModel$cycle
to make them per person costs.SemiMarkovModel
.SemiMarkovModel
as caution for
converting between transition rates and per-cycle probabilities. Cited
work of Jones et al
set_probabilities
method to
SemiMarkovModel
to set transition probabilities from a
matrix.DirichletDistribution
class, mainly
to support PSA in semi-Markov models.BetaModVar
has a BetaDistribution
uncertainty.ModVar
with a “has-a” relationship to an
underlying uncertainty distribution. Incorporated ability to link
several model variables to a common underlying distribution (for use
with multinomial Dirichlet etc.).DiracDistribution
.Distribution
for each of the
currently supported distributions (Beta, Normal, Log Normal,
Gamma).Distribution
to represent multivariate
distributions.SemitMarkovModel
and its test script.Transition
(inherits from
Node
) and its test script.MarkovState
(inherits from
Edge
) and its test script.value
to method set
in class
ModVar
. This allows variables to be set to an explicit
value; used in threshold finding.threshold
function to DecisionTree
to calculate the value of a model variable at which the cost difference
becomes zero or ICER crosses a threshold.run
to by
argument of
DecisionTree$evaluate()
. Avoids application having to
reshape
output before reporting PSA results.DecisionTree$tornado
which caused
bars to be clipped under some circumstances.testthat/setup.R
.as_DOT
to Graph
and
Digraph
for export to graphviz DOT file format to aid
visualization of graphs.tolerance
in expect_equal
with
abs
in expect_true for approximate equality tests.WORDLIST
file and sundry administrative changes
for clean package build.README
file, with an example and
acknowledgements.draw()
method to DecisionTree
.tornado()
method to DecisionTree
for
univariate sensitivity analysis.DecisionTree
(1000 evaluations of a typical HTA tree takes
< 5s on a typical PC).ModelVariable
as ModVar
for
compactness, and renamed its derived classes similarly.ModelVariable
.ModelVariable
.CITATION
file to inst folder in CRAN
preparation.tests/testthat
folder with tests for
ModelVariable
.ModelVariable
class as the new base
class from which to construct the variables in an economic model. The
class includes methods to support parametrization of uncertainty in the
model variable.ModelVariable
to model
particular forms of uncertainty. These are
ConstModelVariable
, NormalModelVariable
,
GammaModelVariable
, BetaModelVariable
,
LogNormalModelVariable
. They do as expected from their
names. Some support alternative forms of parametrization.ExpressionModelVariable
. A sub-class of
ModelVariable
, objects of this class are defined with an
expression involving other model variables. The concept permits
variables to be combined in any mathematical expression that R itself
will support. Because ExpressionModelVariable
s are
themselves ModelVariables
, they can can appear in an
expression that is used to define another model variable.Node
and its sub classes to accept
ModelVariables
as arguments to costs, utilities and
probabilities, thus embedding probabilistic sensitivity analysis into
decision tree models.ModelVariable
approach to PSA.Node
classes.node.apply
and path.apply
functions, and subsumed them into Node
.node.apply
and
path.apply
, and subsumed them into Node
.Node
objects with a Document Object Model
(DOM) interface, as far as practicable.references.bib
to directly embed them in the YAML headers.
To do: explore whether references can be saved in preferred bib
format.nullfile()
, for suppressed output, in
function des
with detection of OS to support older R
versions (nullfile
was introduced to base R at 3.6.0).des
Node
,
LeafNode
, ChanceNode
,
DecisionNode
) and pathway detection and traversal
functions.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.