LK.test {EWGoF}R Documentation

GoF tests based on the likelihood for the Exponential distribution

Description

Computes the Exponential GoF tests based on the three following statistics: the score of Cox-Oakes (CO), Wald (W) and likelihood ratio (LR) GoF tests. These tests include the Exponential distribution in the Weibull distribution and apply a parametric test to check whether the shape parameter is equal to one.

Usage

LK.test(x, type = "CO", nsim = 200)

Arguments

x

a numeric vector of data values.

type

the type of the test statistic used. "CO" is the default used test of Cox-Oakes,"W" for Wald, "LR" for likelihood ratio test statistic.

nsim

an integer specifying the number of replicates used in Monte Carlo.

Details

The test statistic of Cox and Oakes is equivalent to the score test applied to the shape parameter of the Weibull distribution. The expression of the score is given using the observed information matrix and not the exact one.

Value

An object of class htest.

Author(s)

Meryam KRIT

References

Cox D.R. and Oakes D., Analysis of survival data, Chapman and Hall, 1984.

Examples

x <- rgamma(20,0.3)

#Apply the Cox and Oakes test (score) test
LK.test(x,type="CO")

# Apply the test based on Wald
LK.test(x,type="W")

# Apply the test based on the likelihood ratio
LK.test(x,type="LR")

[Package EWGoF version 2.2.2 Index]