# Plot and print methods for gof output.

### Description

Plot and print methods for goodness-of-fit output for network models.

### Usage

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ```
## S3 method for class 'boxplot'
plot(x, relative = TRUE, transform = function(x) x,
xlim = NULL, main = x$label, xlab = x$label, ylab = "Frequency",
border = "darkgray", boxplot.lwd = 0.8, outline = FALSE,
median = TRUE, median.col = "black", median.lty = "solid",
median.lwd = 2, mean = TRUE, mean.col = "black",
mean.lty = "dashed", mean.lwd = 1, ...)
## S3 method for class 'gof'
plot(x, mfrow = TRUE, ...)
## S3 method for class 'pr'
plot(x, add = FALSE, main = x$label, avg = c("none",
"horizontal", "vertical", "threshold"), spread.estimate =
c("boxplot", "stderror", "stddev"), lwd = 3, rgraph = TRUE,
col = "#5886be", random.col = "#5886be44", pr.poly = 0, ...)
## S3 method for class 'roc'
plot(x, add = FALSE, main = x$label, avg = c("none",
"horizontal", "vertical", "threshold"), spread.estimate =
c("boxplot", "stderror", "stddev"), lwd = 3, rgraph = TRUE,
col = "#bd0017", random.col = "#bd001744", ...)
## S3 method for class 'rocpr'
plot(x, main = x$label, roc.avg = c("none",
"horizontal", "vertical", "threshold"),
roc.spread.estimate = c("boxplot", "stderror", "stddev"),
roc.lwd = 3, roc.rgraph = TRUE, roc.col = "#bd0017",
roc.random.col = "#bd001744", pr.avg = c("none", "horizontal",
"vertical", "threshold"), pr.spread.estimate = c("boxplot",
"stderror", "stddev"), pr.lwd = 3, pr.rgraph = TRUE,
pr.col = "#5886be", pr.random.col = "#5886be44", pr.poly = 0,
...)
## S3 method for class 'univariate'
plot(x, main = x$label, sim.hist = TRUE,
sim.bar = TRUE, sim.density = TRUE, obs.hist = FALSE,
obs.bar = TRUE, obs.density = TRUE, sim.adjust = 1,
obs.adjust = 1, sim.lwd = 2, obs.lwd = 2, sim.col = "black",
obs.col = "red", ...)
## S3 method for class 'boxplot'
print(x, ...)
## S3 method for class 'gof'
print(x, ...)
## S3 method for class 'pr'
print(x, ...)
## S3 method for class 'roc'
print(x, ...)
## S3 method for class 'rocpr'
print(x, ...)
## S3 method for class 'univariate'
print(x, ...)
``` |

### Arguments

`add` |
Add the ROC and/or PR curve to an existing plot? |

`avg` |
Averaging pattern for the ROC and PR curve(s) if multiple target time steps were used. Allowed values are |

`border` |
Color of the borders of the boxplots. |

`boxplot.lwd` |
Line width of boxplot. |

`col` |
Color of the ROC or PR curve. |

`lwd` |
Line width. |

`main` |
Main title of a GOF plot. |

`mean` |
Plot the mean curve for the observed network? |

`mean.col` |
Color of the mean of the observed network statistic. |

`mean.lty` |
Line type of mean line. For example "dashed" or "solid". |

`mean.lwd` |
Line width of mean line. |

`median` |
Plot the median curve for the observed network? |

`median.col` |
Color of the median of the observed network statistic. |

`median.lty` |
Line type of median line. For example "dashed" or "solid". |

`median.lwd` |
Line width of median line. |

`mfrow` |
Should the GOF plots come out separately ( |

`obs.adjust` |
Bandwidth adjustment parameter for the density curve. |

`obs.bar` |
Draw a bar for the median of the statistic for the observed networks? |

`obs.col` |
Color for the observed network(s). |

`obs.density` |
Draw a density curve fot the statistic for the observed networks? |

`obs.hist` |
Draw a histogram for the observed networks? |

`obs.lwd` |
Line width for the observed network(s). |

`outline` |
Print outliers in the boxplots? |

`pr.avg` |
Averaging pattern for the PR curve(s) if multiple target time steps were used. Allowed values are |

`pr.col` |
Color of the PR curve. |

`pr.lwd` |
Line width. |

`pr.poly` |
If a value of |

`pr.random.col` |
Color of the PR curve of the random graph prediction. |

`pr.rgraph` |
Should an PR curve also be drawn for a random graph? This serves as a baseline against which to compare the actual PR curve. |

`pr.spread.estimate` |
When multiple target time steps are used and curve averaging is enabled, the variation around the average curve can be visualized as standard error bars ( |

`random.col` |
Color of the ROC or PR curve of the random graph prediction. |

`relative` |
Print relative frequencies (as opposed to absolute frequencies) of a statistic on the y axis? |

`rgraph` |
Should an ROC or PR curve also be drawn for a random graph? This serves as a baseline against which to compare the actual ROC or PR curve. |

`roc.avg` |
Averaging pattern for the ROC curve(s) if multiple target time steps were used. Allowed values are |

`roc.col` |
Color of the ROC curve. |

`roc.lwd` |
Line width. |

`roc.random.col` |
Color of the ROC curve of the random graph prediction. |

`roc.rgraph` |
Should an ROC curve also be drawn for a random graph? This serves as a baseline against which to compare the actual ROC curve. |

`roc.spread.estimate` |
When multiple target time steps are used and curve averaging is enabled, the variation around the average curve can be visualized as standard error bars ( |

`sim.adjust` |
Bandwidth adjustment parameter for the density curve. |

`sim.bar` |
Draw a bar for the median of the statistic for the simulated networks? |

`sim.col` |
Color for the simulated networks. |

`sim.density` |
Draw a density curve fot the statistic for the simulated networks? |

`sim.hist` |
Draw a histogram for the simulated networks? |

`sim.lwd` |
Line width for the simulated networks. |

`spread.estimate` |
When multiple target time steps are used and curve averaging is enabled, the variation around the average curve can be visualized as standard error bars ( |

`transform` |
A function which transforms the y values used for the boxplots. For example, if some of the values become very large and make the output illegible, |

`x` |
An object created by one of the |

`xlab` |
Label of the x-axis of a GOF plot. |

`xlim` |
Horizontal limit of the boxplots. Only the maximum value must be provided, e.g., |

`ylab` |
Label of the y-axis of a GOF plot. |

`...` |
Arbitrary further arguments. |

### Details

These plot and print methods serve to display the output generated by the `gof`

function and its methods. See the help page of gof-methods for details on how to compute gof.

### Author(s)

Philip Leifeld (http://www.philipleifeld.com)

### See Also

btergm-package gof gof-methods gof-statistics