distribution.plot: Plots the observed probability for an element against the...

View source: R/distribution_plot.R

distribution.plotR Documentation

Plots the observed probability for an element against the distribution of the null model

Description

The function takes all single elements in a netfacs object, and plots the distribution of probabilities under the null hypothesis, marking where the observed probability falls

Usage

distribution.plot(netfacs.data)

Arguments

netfacs.data

object resulting from netfacs() function

Value

Function returns a ggplot showing for each element the distribution of expected probabilities (blue) and the observed probability (black line)

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
)

# show distribution of AU4
distribution.plot(netfacs.data = angry.face)$"4"

NetFACS documentation built on Dec. 7, 2022, 1:12 a.m.