modalityTest: Perform modality tests on approximated moments

Description Usage Arguments Value See Also Examples

View source: R/momApp_modalityTest.R

Description

Test if the moments generated by momApp come from a unimodal distribution with compact support. The test used is given by function is.unimodal from package momcalc. The lower and upper bounds of the compact support may depend on a time value t.

Usage

1
modalityTest(momApp, lower, upper, vars = names(init(momApp$model)))

Arguments

momApp

an object of class momApp.

lower

numeric vector or matrix or data.frame specifying the lower bounds of the compact distribution that determines the law of the PDMP momApp$model. If lower is a vector, the i-th entry should give the lower bound of the i-th variable given in vars, 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(momApp$model). The other column names should be identical to parameter vars 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 momApp$model. If upper is a vector, the i-th entry should give the upper bound of the i-th variable given in vars, independent of a time value. If upper is a matrix or data.frame, it should have a column named times containing all time values specified in times(momApp$model). The other column names should be identical to parameter vars and contain the upper bounds for the corresponding variable and time value.

vars

a character vector specifiying the names of the variables on which a modality test should be performed. The variables should be part of the PDMP momApp$model.

Value

A data.frame containing the test results.

See Also

plotModalities to plot the result.

Examples

1
2
3
4
data(genePolyBF)
support <- getSupport(genePolyBF)
modalityTest(momApp = momApp(genePolyBF), vars = "f",
             lower = support$lower, upper = support$upper)

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