Skip to content
/ influ Public

A package for the R language which generates step plots, influence plots, coefficient-distribution-influence (CDI) plots, and influence metrics for linear models.

Notifications You must be signed in to change notification settings

trophia/influ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

influ

What is it?

A package for the R language which generates step plots, influence plots, coefficient-distribution-influence (CDI) plots, and influence metrics for linear models as described in the paper [Bentley, N., Kendrick, T. H., Starr, P. J., & Breen, P. A. (2011). Influence plots and metrics: tools for better understanding fisheries catch-per-unit-effort standardisations. ICES Journal of Marine Science, 69: 84-88. doi:10.1093/icesjms/fsr174](https://icesjms.oxfordjournals.org/cgi/reprint/fsr174? ijkey=zZGx3RoK1zkxhaL&keytype=ref) (There is a pre-print, pre-review version here but the above link is recommended as it gives full access to the final version)

How do I get it?

The package is still in development. A beta version is available under Releases. Eventually influ will be submitted to the Comprehensive R Archive Network for direct installation via the install.packages R function.

How do I use it?

We recommend looking at the influ vignette first. But if you don't have time for even that, here's an even quicker run down....

#Install the package after downloading it
install.packages("/path/to/influ_0.X.zip",repos=NULL) #Windows
install.packages("/path/to/influ_0.X.tar.gz",repos=NULL) #Linux

#Load the package
library(influ)

#Fit a glm model (the first term, in this case year, should be a factor!)
myModel = glm(log(catch)~year+effort+month+area+depth+method,data=myData)
 
##Create an influence object for that model
myInfl = Influence$new(myModel)
myInfl$calc()

##Look at the summary data.frame and execute the various methods
## to create plots
myInfl$summary
myInfl$stanPlot()
myInfl$stepPlot()
myInfl$influPlot()
myInfl$cdiPlot('month')
myInfl$cdiPlotAll()

There is also a reference manual and if that fails you could always try the source code!

Who has contributed to development?

The initial development of this software was done by Nokome Bentley, Trophia Ltd and funded by the New Zealand Seafood Industry Council Ltd.

About

A package for the R language which generates step plots, influence plots, coefficient-distribution-influence (CDI) plots, and influence metrics for linear models.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages