Plots heatmaps of parameter estimates or posterior support values of species' environmental responses, i.e. how species in Y responds to covariates in X
post: posterior summary of Beta parameters obtained from getPostEstimate
param: controls which parameter is plotted, current options include "Mean" for posterior mean estimate, "Support" for the level of statistical support measured by posterior probability for a positive or negative response, and "Sign" to indicate whether the response is positive, negative, or neither of these given the chosen supportLevel
plotTree: logical. Whether species' environmental responses is to be mapped onto the phylogeny used in model fitting
SpeciesOrder: controls the ordering of species, current options are "Original", "Tree", and "Vector". If SpeciesOrder = "Vector", an ordering vector must be provided (see SpVector). If plotTree = TRUE, SpeciesOrder is ignored
SpVector: controls the ordering of species if SpeciesOrder = "Vector". If a subset of species are listed, only those will be plotted. For alphabetic ordering, try match(1:hM$ns, as.numeric(as.factor(colnames(hM$Y))))
covOrder: controls the ordering of covariates, current options are "Original" and "Vector". If covOrder = "Vector", an ordering vector must be provided (see covVector)
covVector: controls the ordering of covariates if covOrder = "Vector". If a subset of covariates are listed, only those will be plotted
spNamesNumbers: logical of length 2, where first entry controls whether species names are added to axes, and second entry controls whether species numbers are added
covNamesNumbers: logical of length 2, where first entry controls whether covariate names are added to axes, and second entry controls whether covariate numbers are added
supportLevel: controls threshold posterior support for plotting
split: if plotTree = TRUE, controls the division of the plotting window between the tree and the heatmap.
cex: controls character expansion (font size). Three values, controlling covariate names, species names, and color legend axis labels
colors: controls the colors of the heatmap, default value colorRampPalette(c("blue","white","red"))
colorLevels: number of color levels used in the heatmap
mar: plotting margins
marTree: plotting margins for phylogenetic tree
mgp: can be used to set the location of the scale bar
main: main title for the plot.
smallplot: passed to image.plot
bigplot: passed to image.plot
newplot: set to false if the plot will be part of multi-panel plot initialized with par(mfrow)
Examples
# Plot posterior support values of species' environmental responsesbetaPost=getPostEstimate(TD$m,"Beta")plotBeta(TD$m, post=betaPost, param="Support")# Plot parameter estimates of species' environmental responses together with the phylogenetic treebetaPost=getPostEstimate(TD$m,"Beta")plotBeta(TD$m, post=betaPost, param="Mean", plotTree=TRUE)