community_graph {memnet} | R Documentation

## Create community graph

### Description

Create a graph from verbal fluency data by adding edges for words that occur within a window size `l` and retaining those that occur more frequently than `min_cooc` and the expectations number of chance productions co- occurences based on `1-crit`.

### Usage

    community_graph(dat, l = 3L, min_cooc = 2L, crit = 0.05)

### Arguments

`dat` | list of character vectors containing the fluency productions.
`l` | an integer specifying the window size. The internal upper limit of `l` is the number of productions.
`min_cooc` | integer specifying the minimum number of times two words have to coocur within a window size of `l` to consider including an edge between them.
`crit` | a numeric within `[0,1]` specifiying the type-1 error rate of including an edge between unconnected words.

### Value

A matrix

### References

Goni, J., Arrondo, G., Sepulcre, J., Martincorena, I., de Mendizábal, N. V., Corominas-Murtra, B., ... & Villoslada, P. (2011). The semantic organization of the animal category: evidence from semantic verbal fluency and network theory. Cognitive processing, 12(2), 183-196.

Wulff, D. U., Hills, T., & Mata, R. (2018, October 29). Structural differences in the semantic networks of younger and older adults. https://doi.org/10.31234/osf.io/s73dp

### Examples

    # get animal fluency data
    data(animal_fluency)

    # infer influence network
    inferred_network = community_graph(animal_fluency)

    # Simulate -----

    # generate watts strogatz graph
    network = grow_ws(n = 200, k = 10, p = .5)

    # generate fluency data
    # sets string equal TRUE as community_graph expects mode character
    fluency_data = fluency(get_adjlist(network), rep(10, 100), string = TRUE)

    # infer fluency network
    inferred_network = community_graph(fluency_data)

[Package memnet version 0.1.0 Index]