randwalk: Random Walk Simulation

randwalkR Documentation

Random Walk Simulation

Description

Simulates random walks over two networks to examine the characteristics of spontaneous spreading activation (see Kenett & Austerweil, 2016)

Usage

randwalk(A, B, reps = 20, steps = 10, iter = 10000, cores)

Arguments

A

Matrix or data frame. Adjacency matrix of a semantic network

B

Matrix or data frame. A comparison adjacency matrix of a semantic network

reps

Numeric. Number of repetitions of increments in 10 steps. Defaults to 20

steps

Numeric. Number of random steps to begin with. Defaults to 10

iter

Numeric. Number of iterations for each random walk. Defaults to 10000

cores

Numeric. Number of computer processing cores to use for bootstrapping samples. Defaults to n - 1 total number of cores. Set to any number between 1 and maximum amount of cores on your computer

Value

A result matrix containing the means and standard deviations for several measures as well as p-values for a Mann-Whitney U test

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com> and Yoed Kenett <yoedkenett@gmail.com>

References

Kenett, Y. N., & Austerweil, J. L. (2016). Examining search processes in low and high creative individuals with random walks. In Paper presented at the proceedings of the 38th annual meeting of the cognitive science society. Austin, TX.

Examples

# Simulate Datasets
one <- sim.fluency(10)
two <- sim.fluency(10)

# Compute similarity matrix
cos1 <- similarity(one, method = "cosine")
cos2 <- similarity(two, method = "cosine")

# Compute networks
net1 <- TMFG(cos1)
net2 <- TMFG(cos2)

# Run random walk analysis
rw.results <- randwalk(net1, net2, iter = 100, cores = 2)




SemNeT documentation built on Aug. 12, 2023, 5:06 p.m.