test_diff {incubate}R Documentation

Test the difference for delay model parameter(s) between two uncorrelated groups, based on maximum product of spacings estimation (MPSE).

Description

It is in fact a model comparison between a null model where the parameters are enforced to be equal and an unconstrained full model. As test statistic we use twice the difference in best (=lowest) objective function value, i.e. 2 * (val_0 - val_1). This is reminiscent of a likelihood ratio test statistic albeit the objective function is not a negative log-likelihood but the negative of the maximum product spacing metric.

Usage

test_diff(
  x,
  y = stop("Provide data for group y!"),
  distribution = c("exponential", "weibull"),
  param = "delay",
  R = 400,
  ties = c("density", "equidist", "random", "error"),
  type = c("all", "bootstrap", "gof", "moran", "pearson", "lr", "lr_pp"),
  verbose = 0
)

Arguments

x

data from reference/control group.

y

data from the treatment group.

distribution

character(1). Name of the parametric delay distribution to use.

param

character. Names of parameters to test difference for. Default value is 'delay'.

R

numeric(1). Number of bootstrap samples to evaluate the distribution of the test statistic.

ties

character. How to handle ties in data vector of a group?

type

character. Which type of tests to perform?

verbose

numeric. How many details are requested? Higher value means more details. 0=off, no details.

Details

High values of this difference speak against the null-model (i.e. high val_0 indicates bad fit under 0-model and low values of val_1 indicate a good fit under the more general model1. The test is implemented as a parametric bootstrap test, i.e. we

  1. take given null-model fit as ground truth

  2. regenerate data according to this model.

  3. recalculate the test statistic

  4. appraise the observed test statistic in light of the generated distribution under H0

Value

list with the results of the test. Element P contains the different P-values, for instance from parametric bootstrap


[Package incubate version 1.2.1 Index]