# adup.test: Supremum Class Upper Tail Anderson-Darling test In truncgof: GoF tests allowing for left truncated data

## Description

Supremum class version of the Upper Tail Anderson-Darling test providing a comparison of a fitted distribution with the empirical distribution.

## Usage

 ```1 2 3``` ```adup.test(x, distn, fit, H = NA, alternative = c("two.sided", "less", "greater"), sim = 100, tol = 1e-04, estfun = NA) ```

## Arguments

 `x` a numeric vector of data values `distn` character string naming the null distribution `fit` list of null distribution parameters `H` a treshold value `alternative` indicates the alternative hypothesis and must be one of "two.sided" (default), "less", or "greater". Initial letter must be specified only. `sim` maximum number of szenarios in the Monte-Carlo simulation `tol` if the difference of two subsequent p-value calculations is lower than `tol` the Monte-Carlo simulation is discontinued `estfun` an function as character string or `NA` (default). See `mctest`.

## Details

The supremum class Upper Tail Anderson-Darling test compares the null distribution with the empirical distribution function of the observed data. The test statistic is given by

ADup+ = sqrt(n) sup((j/n - zj)/(1 - zj))

ADup- = sqrt(n) sup((zj - (j-1)/n)/(1 - zj))

with zH=F_theta(H) and zj=F_theta(xj), where x_1, …, x_n are the ordered data values. Here, F_theta is the null distribution.

## Value

A list with class "mchtest" containing the following components

 `statistic` the value of the Supremum Class Upper Tail Anderson-Darling statistic `treshold` the treshold value `p.value` the p-value of the test `data.name` a character string giving the name of the data `method` the character string "Supremum Class Upper Tail Anderson-Darling test" `alternative` the alternative `sim.no` number of simulated szenarios in the Monte-Carlo simulation

## References

Chernobay, A., Rachev, S., Fabozzi, F. (2005), Composites goodness-of-fit tests for left-truncated loss samples, Tech. rep., University of Calivornia Santa Barbara

`ks.test`, `v.test`, `ad.test` for supremum class tests and `ad2.test`, `w2.test` for other quadratic class tests. For more details see `mctest`.

## Examples

 ```1 2 3 4 5``` ```set.seed(123) treshold <- 10 xc <- rlnorm(100, 2, 2) # complete sample xt <- xc[xc >= treshold] # left truncated sample adup.test(xt, "plnorm", list(meanlog = 2, sdlog = 2), H = 10) ```

### Example output

```Loading required package: MASS

Attaching package: 'truncgof'

The following object is masked from 'package:stats':

ks.test

Anderson-Darling Upper Tail Test

data:  xt
ADup = 6.7823, p-value = 0.53
alternative hypothesis: two.sided

treshold = 10, simulations: 100
```

truncgof documentation built on May 1, 2019, 10:54 p.m.