Learn R Programming

POT (version 1.1-11)

anova.bvpot: Anova Tables: Bivariate Case

Description

Computes analysis of deviance for ``bvpot'' object

Usage

# S3 method for bvpot
anova(object, object2, ..., half = FALSE)

Value

This function returns an object of class anova. These objects represent analysis-of-deviance tables.

Arguments

object, object2

Two objects of class ``bvpot'', most often return of the fitbvgpd function.

...

Other options to be passed to the anova function.

half

Logical. For some non-regular testing problems the deviance difference is known to be one half of a chi-squared random variable. Set half to TRUE in these cases.

Warning

Circumstances may arise such that the asymptotic distribution of the test statistic is not chi-squared. In particular, this occurs when the smaller model is constrained at the edge of the parameter space. It is up to the user recognize this, and to interpret the output correctly.

In some cases the asymptotic distribution is known to be one half of a chi-squared; you can set half = TRUE in these cases.

Author

Mathieu Ribatet (Alec Stephenson for the ``Warning'' case)

See Also

anova, anova.uvpot

Examples

Run this code
x <- rgpd(1000, 0, 1, -0.25)
y <- rgpd(1000, 2, 0.5, 0)
M0 <- fitbvgpd(cbind(x,y), c(0, 2))
M1 <- fitbvgpd(cbind(x,y), c(0,2), model = "alog")
anova(M0, M1)

##Non regular case
M0 <- fitbvgpd(cbind(x,y), c(0, 2))
M1 <- fitbvgpd(cbind(x,y), c(0, 2), alpha = 1)
anova(M0, M1, half = TRUE)

Run the code above in your browser using DataLab