Skip to contents

This is the abstract base class for test statistic objects like CondKolmY or MEP.

Test statistics are built around the key method calc_stat() which calculates the particular test statistic (and x-y-values that can be used to plot the underlying process).

Methods


Method get_value()

Returns the value of the test statistic.

Usage

TestStatistic$get_value()

Returns

value of the test statistic


Method calc_stat()

Calculate the value of the test statistic for given data and a model to test for.

Usage

TestStatistic$calc_stat(data, model)

Arguments

data

list() containing the data

model

ParamRegrModel to test for

Returns

The modified object (self), allowing for method chaining.


Method get_plot_xy()

Returns vectors of x and y that can be used to plot the process corresponding to the test statistic.

Usage

TestStatistic$get_plot_xy()

Returns

list with plot.x and plot.y being vectors of the same length


Method print()

Overrides the print-method for objects of type TestStatistic to only print its value.

Usage

TestStatistic$print()

Returns

The object (self), allowing for method chaining.


Method geom_ts_proc()

Creates a line plot showing the underlying process of the test statistic.

Usage

TestStatistic$geom_ts_proc(...)

Arguments

...

Other arguments passed on to ggplot2::geom_line(). These are often aesthetics, used to set an aesthetic to a fixed value, like colour = "red" or size = 3.

Returns

A ggplot2 layer representing a line plot.


Method plot()

Creates a new ggplot showing the underlying process of the test statistic.

Usage

TestStatistic$plot(...)

Arguments

...

Other arguments passed on to ggplot2::geom_line(). These are often aesthetics, used to set an aesthetic to a fixed value, like colour = "red" or size = 3.

Returns

A ggplot2 object representing the complete plot, including a line geometry.


Method clone()

The objects of this class are cloneable with this method.

Usage

TestStatistic$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.