Learn R Programming

Renext (version 3.1-4)

anova.Renouv: Compute an analysis of deviance table for two nested Renouv objects

Description

Compute an analysis of deviance table for two nested Renouv objects

Usage

# S3 method for Renouv
anova(object, object1, trace = 1L, ...)

Value

An object of class "anova" inheriting from class "data.frame".

Arguments

object

A Renouv model as fitted with Renouv.

object1

A Renouv object such that object is nested in object1.

trace

Level of verbosity. The value 0 prints nothing.

...

Not used yet.

Details

Of special interest is the case when the distribution of the excesses used in object is exponential while object1 uses a two-parameters alternative in the GPD family. We know then that the convergence to the asymptotic distribution is slow, and a numerical approximation of the true distribution of the test statistic is used when possible, i.e. when the objects do not use MAX or OTS data and the number of exceedances is between 8 and 500.

See Also

anova, LRExp.test.

Examples

Run this code
## test using historical data
fit1Exp <- Renouv(Garonne,  distname.y = "exponential", plot = FALSE)
fit1GPD <- Renouv(Garonne, distname.y = "GPD", plot = FALSE)
anova(fit1Exp, fit1GPD)

## test without using historical data
x <- Garonne$OTdata$Flow
dur <- Garonne$OTinfo$effDuration

fit2Exp <- Renouv(x,  threshold = 2700,  effDuration = dur,
                  distname.y = "exponential", plot = FALSE)
fit2GPD <- Renouv(x, threshold = 2700, effDuration = dur,
                  distname.y = "GPD", plot = FALSE)
anova(fit2Exp, fit2GPD)

Run the code above in your browser using DataLab