plot_interaction_pattern_network: Plot interaction-pattern sepcific sub-networks

Description Usage Arguments Value Examples

View source: R/plot_interaction_pattern_network.R

Description

Plots a sub network associated with a particular interaction pattern with nodes placed according to their posterior mean latent positions.

Usage

1
2
plot_interaction_pattern_network(CCAS_Object, interaction_pattern_index,
  plot_color_category = NULL, generate_plot = TRUE)

Arguments

CCAS_Object

The object returned by the ccas() main estimation function.

interaction_pattern_index

The index of the cluster specific communication network we wish to plot.

plot_color_category

The name of a categorical covariate the user wishes to color nodes by. For example, nodes might be colored by gender. This function only currently supports plotting by a categroical variable containing five or less unique values. Defaults to NULL, in which case all nodes are plotted in the same color.

generate_plot

Logical indicating whether plot should be printed. Defaults to TRUE, but can be set to FALSE if the user only wishes to access the mean latent positions of actors.

Value

An data.frame containing the mean latent coordinates of each actor.

Examples

1
2
3
4
5
6
7
8
## Not run: 
# load in saved model output from ccas() function.
data(Model_Output)
mean_positions <- plot_interaction_pattern_network(Model_Output,
                                 interaction_pattern_index = 1,
                                 plot_color_category = "Gender")

## End(Not run)

matthewjdenny/CCAS documentation built on May 21, 2019, 1:01 p.m.