Diagnostic.Plots: Create diagnostic plots

Description Usage Arguments Value Author(s) Examples

Description

This function will generate mixed effect model diagnostic plots following optimization with 'Resistance.Optimization'

Usage

1
Diagnostic.Plots(resist.matrix.path, genetic.dist.vec, XLAB, YLAB, plot.dir)

Arguments

resist.matrix.path

Provide the full path to the square distance matrix produced by Circuitscape (file ending with "_resistances.out") Example: paste0(Optim.input$Results.dir,"Final_CS_Surfaces/XXX_resistances.out"

genetic.dist.vec

Vector of pairwise genetic distances (can supply as "Optim.input$Response.vec" after executing Optim.prep function)

XLAB

Label for x-axis (Defaults to "Estimated resistance")

YLAB

Label for y-axis (Defaults to "Genetic distance")

plot.dir

Directory to output PDF of diagnostic plots (can use "paste0(Optim.input$Results.dir,"Plots/"))" to output PDF in same directory as other response plots)

Value

This function will produce a single PDF called DiagnotisticPlots containing four plots. 1) The relationship between the optimized resistance value and your pairwise distance provided as a response (genetic distance) 2) Scatter plot of the mixed effect model residuals in relation to resistance distance 3) Distribution of residuals 4) Q-Q plot

Author(s)

Bill Peterman

Examples

1
# Diagnostic.Plots(resist.matrix.path=paste0(Optim.input$Results.dir,"Final_CS_Surfaces/resist1_resistances.out"),genetic.dist.vec=Optim.input$Response.vec,XLAB="Transformed resistance",YLAB="Pairwise distance",plot.dir=paste0(Optim.input$Results.dir,"Plots/"))

wpeterman/ResistanceOptimization documentation built on May 4, 2019, 9:48 a.m.