runInfluence: Assessing the influece of each correlated block on both the...

View source: R/runInfluence.R

runInfluenceR Documentation

Assessing the influece of each correlated block on both the precision of the parameter estimates (COVRATIO statistics) and the sensitivity of model predictions (PRESS statistics).

Description

Assessing the influece of each correlated block on both the precision of the parameter estimates (COVRATIO statistics) and the sensitivity of model predictions (PRESS statistics).

Usage

runInfluence(model, id = NULL, save = FALSE, dots = FALSE)

Arguments

model

Fitted model object (glm, gamMRSea or gam)

id

blocking structure

save

(default=FALSE). Logical stating whether plot should be saved into working directory.

dots

(default=FALSE). If TRUE, progress dots are printed.

Details

Always run timeInfluenceCheck first to see how long it will take to produce the plots.

Value

Two plots one each for COVRATIO and PRESS statistics, giving the influence of each block on precision of the parameter estimates and the sensitivity of model predictions. List object:

influenceData

List of blocks, COVRATIO statistics and PRESS statistics used for making the plot of PRESS and COVRATIO statistics.

influencePoints

Row id of blocks in influenceData that lie outside the 95% quantile of COVRATIO statistics and above the 95% quantile of PRESS statistics.

Examples

# load data
data(ns.data.re)

ns.data.re$blockid<-paste(ns.data.re$GridCode, ns.data.re$Year, ns.data.re$MonthOfYear, 
                    ns.data.re$DayOfMonth, sep='')
ns.data.re$blockid<-as.factor(ns.data.re$blockid)

model<-gamMRSea(birds ~ observationhour + as.factor(floodebb) + as.factor(impact),  
              family='poisson', data=ns.data.re)

timeInfluenceCheck(model, ns.data.re$blockid)

## Not run: 
# **WARNING** this example takes a long time
influences<-runInfluence(model, ns.data.re$blockid)

## End(Not run)

lindesaysh/MRSea documentation built on May 11, 2024, 11:30 p.m.