# network.conditional: Produce conditional probabilities of dyads of elements, and... In NetFACS: Network Applications to Facial Communication Data

 network.conditional R Documentation

## Produce conditional probabilities of dyads of elements, and graph object based on conditional probabilities

### Description

For all dyadic combinations that appear in the test dataset, this function returns the probability of A occurring (P(A)), the probability of B occurring (P(B)), the probability of A and B occurring simultaneously (P(A+B)), and the probability of A occurring if B is given (P(A|B)). It also creates a graph object that can be plotted

### Usage

network.conditional(
netfacs.data,
min.prob = 0,
min.count = 0,
ignore.element = NULL,
plot.bubbles = FALSE
)

### Arguments

 netfacs.data object resulting from netfacs() function min.prob minimum conditional probability that should be shown in the graph min.count minimum number of times that a combination should occur before being included in the graph ignore.element string vector, can be used to exclude certain elements when creating the plots plot.bubbles if TRUE, then the nodes in the network plots will be surrounded by bubbles; if FALSE, the edges connect the names directly

### Value

Function returns a dataframe that includes all dyadic combinations and their observed and conditional probabilities

### Examples

### how do angry facial expressions differ from non-angry ones?
data(emotions_set)
angry.face <- netfacs(
data = emotions_set[[1]],
condition = emotions_set[[2]]\$emotion,
test.condition = "anger",
ran.trials = 100,
combination.size = 2
)

conditional.net <- network.conditional(
netfacs.data = angry.face,
min.prob = 0.01,
min.count = 3,
ignore.element = "25",
plot.bubbles = FALSE
)

conditional.net\$conditional.probalities

NetFACS documentation built on March 18, 2022, 7:40 p.m.