impactplot: impactplot Plots relative contribution to CPUE trend of each...

View source: R/cpueplots.R

impactplotR Documentation

impactplot Plots relative contribution to CPUE trend of each Factor

Description

impactplot plots out the contribution to a standardized CPUE trend of each of the factors included in the standardization. The number on each graph is the sum of squared differences between the previous model and the current model - as a measure of the relative effect of the factor concerned. Positive effects are shown as blue bars, negative effects are shown as red bars.

Usage

impactplot(inout, mult = 3, FY = FALSE)

Arguments

inout

is the list output from the standLM function containing the standardization

mult

default value is 3 - it is used to scale the bars on the plot.

FY

- are the years fishing seasons or calender years; defaults to FALSE, which assumes calendar years for the x-axis.

Value

generates a plot of the impact of each factor on the CPUE trend, in addition, the function returns, invisibly, two tables as a list, the first $result summarizes the impact of each factor included in the analysis, including the sum of absolute differences between each model and the one before it (the top plot is for the complete model). The second table $deviates lists the actual differences between the particular vaiables and the previous models.

Examples

## Not run: 
 data(sps)
 splabel = "Species"
 sps$Year <- factor(sps$Year)
 sps$Month <- factor(sps$Month)
 sps$Vessel <- factor(sps$Vessel)
 labelM <- c("Year","Vessel","Month")
 mods <- makemodels(labelM)
 out <- standLM(mods,sps,splabel)
 impactplot(out,mult=3)

## End(Not run)

haddonm/rforcpue documentation built on Oct. 12, 2024, 11:55 p.m.