PlotFit function

Plot the fitted network models

Plot the fitted network models

Takes the output from other functions (including PredictLinks()) to visualise the fit to the data and predictions of missing links.

PlotFit( list, Matrix_to_plot, OrderBy = "Default", addDots = TRUE, title = NULL, Combine = "+", RemoveTP = FALSE, GuidesOff = TRUE )

Arguments

  • list: A list-format network (output from xxx)
  • Matrix_to_plot: Which matrix / matrices to plot. One or more of 'C_def','C', 'M', 'B', 'SBM'
  • OrderBy: How to order the plot. One of 'Default','Degree','Manual', 'LatentTrait','SBM', 'AsPerMatrix'
  • addDots: Should dots be added to show observations. TRUE, FALSE or 'Size', to plot by interaction strength
  • title: A title. By default it will use the value of Matrix_to_plot
  • Combine: How should multiple matrices be combined. Either '+' which averages them (default), or '*' which multiples
  • RemoveTP: Should true positives be set to NA in order to highlight differences in predictions. Default is FALSE
  • GuidesOff: Should the legends be switched off. Defaults to TRUE

Returns

A ggplot object, which by default will print to the device, but can be added to make further tweaks

Details

See the vignette for a more through description and examples.

Examples

## Not run: data(Safariland, package = 'bipartite') Predictions<- PredictLinks(Safariland) PlotFit(Predictions, Matrix_to_plot = 'SBM') ## End(Not run)
  • Maintainer: Chris Terry
  • License: GPL-3
  • Last published: 2024-06-10

Useful links