evd (version 2.1-0)

anova.evd: Compare Nested EVD Objects

Description

Compute an analysis of deviance table for two or more nested evd objects.

Usage

## S3 method for class 'evd':
anova(object, object2, \dots)

Arguments

object
An object of class "evd".
object2
An object of class "evd" that represents a model nested within object.
...
Further successively nested objects.

Value

  • An object of class c("anova", "data.frame"), with one row for each model, and the following five columns
  • M.DfThe number of parameters.
  • DevianceThe deviance.
  • DfThe number of parameters of the model in the previous row minus the number of parameters.
  • ChisqThe deviance minus the deviance of the model in the previous row.
  • Pr(>chisq)The p-value calculated by comparing the quantile Chisq with a chi-squared distribution on Df degrees of freedom.

Warning

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

See Also

fbvevd, fextreme, fgev, forder

Examples

Run this code
uvdata <- rgev(100, loc = 0.13, scale = 1.1, shape = 0.2)
trend <- (-49:50)/100
M1 <- fgev(uvdata, nsloc = trend)
M2 <- fgev(uvdata)
M3 <- fgev(uvdata, shape = 0)
anova(M1, M2, M3)

bvdata <- rbvevd(100, dep = 0.75, model = "log")
M1 <- fbvevd(bvdata, model = "log")
M2 <- fbvevd(bvdata, model = "log", dep = 0.75)
anova(M1, M2)

Run the code above in your browser using DataLab