Skip to contents

Calculates type-III analysis-of-variance tables for model objects produced by gamMRSea (in the MRSea package). Wald chisquare tests are calculated by default although, F-tests may be specified.

Usage

# S3 method for gamMRSea
anova(object, varshortnames = NULL, panelid = NULL, test = "Wald")

Arguments

object

A gamMRSea model object

varshortnames

(default = NULL). Character vector denoting the short names to use for any smooth terms. May already be specified as part of the model object.

panelid

vector of length of the data used in object. Specified if robust standard errors are to be used.

test

(default='wald'). May also specify "F".

Value

An object of class "anova".

Examples


# load data
data(ns.data.re)
ns.data.re$foldid<-getCVids(ns.data.re, folds=5)
 
model<-gamMRSea(birds ~ observationhour + as.factor(floodebb) + as.factor(impact),  
              family='poisson', data=ns.data.re)
anova(model)        
#> Analysis of 'Wald statistic' Table
#> Model: poisson, link: log
#> Response: birds
#> Marginal Testing
#> Max Panel Size = 1 (independence assumed); Number of panels = 27798
#> 
#>                     Df     X2 P(>|Chi|)    
#> observationhour      1 3722.9 < 2.2e-16 ***
#> as.factor(floodebb)  2  658.1 < 2.2e-16 ***
#> as.factor(impact)    1   18.9 1.376e-05 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1