Compute an analysis of deviance table for two nested TVGEV objects.

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

Arguments

object

A TVGEV object as fitted by TVGEV.

object1

A TVGEV object such that object is nested in object1.

trace

Level of verbosity. The value 0 prints nothing.

...

Not used yet.

Value

An object of class "anova" inheriting from class

"data.frame".

Note

The deviance of the models can not be interpreted: only the difference of the deviance is used.

Caution

The distribution of the test statistic (difference between two deviances) is obtained on the basis of the large sample theory which may not be applicable.

Examples


df <- within(TXMax_Dijon, Date <- as.Date(sprintf("%4d-01-01", Year)))

## fit without a break in trend
res0 <- TVGEV(data = df, response = "TXMax", date = "Date",
               design = breaksX(date = Date, breaks = "1970-01-01", degree = 1),
               loc = ~ t1,
               estim = "nloptr")

## the same but with a break
res1 <- TVGEV(data = df, response = "TXMax", date = "Date",
              design = breaksX(date = Date, breaks = "1970-01-01", degree = 1),
              loc = ~ t1 + t1_1970,
              estim = "nloptr")
anova(res0, res1)
#> Analysis of Deviance Table
#> 
#>      df deviance      W   Pr(>W)   
#> res0  4    361.2                   
#> res1  5    354.4 6.7982 0.009125 **
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1