analyseModel: Analyse a polynomial PDMP

Description Usage Arguments

View source: R/analyseModel.R

Description

Perform all methods that are available for a polynomial PDMP:

All plots and calculated data will be saved in different files. It is possible to only perform a part of the methods, i.e. pass already simulated data and only perform the plot methods or simulate without calculating statistics or approximated moments.

Usage

1
2
3
4
5
6
analyseModel(polyModel, model = polyModel, seeds = NULL,
  dir = file.path(getwd(), "simulations"),
  filenameprefix = descr(polyModel), momentorder = c(4, 10),
  plotorder = 1:4, plot = TRUE, modality = TRUE, sim = TRUE,
  statistics = TRUE, momApp = TRUE, lower = NULL, upper = NULL,
  funs = c("min", "max", "mean", "median", "sd"), title = descr(model))

Arguments

polyModel

an object of class polyPdmpModel

model

the corresponding object of class pdmpModel. It is used for simulation because the simulation of an object of class pdmpModel is faster than the simulation of an object of class polyPdmpModel.

seeds

number of seeds to be simulated

dir

string giving the directory where all files will be stored.

filenameprefix

string. The name of each file saved by analyseModel will start with this string.

momentorder

numerical vector. Each entry specifies the maximal order of moments that shall be calculated with momApp. The moment approximation will be performed for each entry seperately. Defaults to c(4, 10).

plotorder

vector giving all the orders of moments that shall be plotted. Defaults to 1:4.

plot

boolean variable. Should analyseModel generate plots?

modality

boolean variable. Should analyseModel test if the distribution is unimodal with is.unimodal?

sim

boolean variable. Should analyseModel do the simulation or use already simulated data? In the latter case, it will use files stored at the same places where analyseModel would store the simulations. Furthermore, no value for parameter seeds is necessary.

statistics

boolean variable. Should analyseModel calculate statistics with summarise_at? The functions that shall be applied on the data can be specified with the argument funs.

momApp

boolean variable. Should analyseModel calculate moments with momApp?

lower

numeric vector or matrix or data.frame specifying the lower bounds of the compact distribution that determines the law of the PDMP. #' It is an argument to function modalityTest and only needed if modality = TRUE. If upper . If lower is a vector, the i-th entry should give the lower bound of the i-th continous variable given in init(model), independent of a time value. If lower is a matrix or data.frame, it should have a column named time containing all time values specified in times(model). The other column names should be identical to the continous variables of the PDMP and contain the lower bounds for the corresponding variable and time value.

upper

numeric vector or matrix or data.frame specifying the upper bounds of the compact distribution that determines the law of the PDMP. It is an argument to function modalityTest and only needed if modality = TRUE. If upper is a vector, the i-th entry should give the upper bound of the i-th continous variable given in init(model), independent of a time value. If upper is a matrix or data.frame, it should have a column named time containing all time values specified in times(model). The other column names should be identical to the continous variables of the PDMP and contain the upper bounds for the corresponding variable and time value.

funs

character vector. Each entry should be the name of a function that can be applied over simulated data. It will be used by the functions plotStats and summarise_at.


CharlotteJana/pdmppoly documentation built on Sept. 4, 2019, 4:40 p.m.