ProcessResults

A package with some key functions for processing statistical modelling results

Plotting ERGM Results

The ERGM_result_plot function allows you to visualise/plot the results from an ERGM (from ergm package output)

Example - Run ERGM

First we run an ERGM on example data

library(ergm)

data('sampson')

model <- ergm(samplike ~ edges + mutual + nodematch('group') + 
            gwesp(decay = .5, fixed = TRUE) + 
            gwidegree(decay = 1, fixed = TRUE))

library(texreg)
screenreg(model,digits=3)

Plot Results

We can now create the plot

library(ProcessResults)
var_names<-c("Edges","Mutual","Group.Match","GWESP","Indegree")
ERGM_result_plot(model,var_names,plot_title = "Example ERGM Results") #Default is with y axis labels

We can also plot this without the y-axis labels, which is useful for panel plots of results with the same coefficients

library(ProcessResults)
var_names<-c("Edges","Mutual","Group.Match","GWESP","Indegree")
ERGM_result_plot(model,var_names,plot_title = "Example ERGM Results",y_axis_lab = FALSE)


MatthewSmith430/ProcessResults documentation built on Jan. 20, 2024, midnight