Description Usage Arguments Value Note See Also Examples
This function calculates the raw moments of a polynomial PDMP.
The calculation is not based on simulated data but uses the generator
of the PDMP to create a system of ordinary differential equations.
The moments can be calculated from the solution of this system of ode's.
In some cases, the system of ode's is infinetly large and can therefore
not be solved. A modification is necessary, meaning that all equations for
moments whose order is greater than a given order will be replaced by
fixed values. This process is called moment closure. There are
different possibilities, which values to set. They depend on the parameter
closure
. The following options are implemented:
zero
: Set all values to zero.
normal
: Set values as moments of a normal distributed variable.
lognormal
: Set values as moments of a lognormal distributed variable.
gamma
: Set values as moments of a gamma distributed variable.
Parameter centralize
determines, if raw or central moments should
be replaced by fixed values.
1 2 3 4 5 6 7 8 | momApp(obj, maxorder = 4, na.rm = TRUE, closure = c("zero", "zero",
"normal", "lognormal", "gamma"), centralize = c(TRUE, FALSE, TRUE,
FALSE, FALSE))
## S4 method for signature 'polyPdmpModel'
momApp(obj, maxorder = 4, na.rm = TRUE,
closure = c("zero", "zero", "normal", "lognormal", "gamma"),
centralize = c(TRUE, FALSE, TRUE, FALSE, FALSE))
|
obj |
object of class |
maxorder |
integer defining the highest order of moments that are
considered. Higher orders are droped and replaced by fixed values. The
replacement method is specified in parameter |
closure |
character vector. Every entry defines one possibility of
moment closure, i.e. changing the system of ODEs into a closed form
that is solvable. Possible values are |
centralize |
boolean vector with the same length as |
The function returns an S3-object of class momApp
.
It contains 6 different elements:
model
: the polyPdmpModel obj
out
: a list. The i-th entry is the result of function
ode
, performed on the system of ode which
was created with moment closure closure[i]
.
Column names are added to make the result
understandable.
moments
: a data.frame with the resulting raw moments.
maxorder
: value of parameter maxorder
closure
: value of parameter closure
centralize
: value of parameter centralize
This method works only for PDMPs with one discrete variable.
momApp-methods
for further analysing the result.
1 2 3 4 5 | data(genePolyBF)
a <- momApp(genePolyBF, maxorder = 4)
plot(a)
print(a)
summary(a)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.