bootSemNeT: Bootstrapped Semantic Network Analysis

bootSemNeTR Documentation

Bootstrapped Semantic Network Analysis

Description

Bootstrap techniques to generate semantic networks and compute global network characteristics

Usage

bootSemNeT(
  ...,
  method = c("CN", "NRW", "PF", "TMFG"),
  methodArgs = list(),
  type = c("case", "node"),
  prop = 0.5,
  sim,
  weighted = FALSE,
  iter = 1000,
  cores
)

Arguments

...

Matrices or data frames. Cleaned response matrices (e.g., responses$clean from textcleaner) or binary response matrices (e.g., binary output from textcleaner)

method

Character. Network estimation method to use. Current options include:

  • TMFG Triangulated Maximally Filtered Graph

  • CN Community Network

  • NRW Naive Random Walk

  • PF Pathfinder

methodArgs

List. A list of additional arguments for the network estimation function. See links in argument method for additional arguments (see also Examples)

type

Character. Type of bootstrap to perform

  • node Generates partial networks based on dropping a certain proportion of nodes (see argument prop)

  • case Samples with replacement the same number of participants as in the original dataset

prop

Numeric. Only for type = "node". Proportion of nodes to remain in the network. Defaults to .50

sim

Character. Similarity measure to use. Defaults to "cosine". See similarity for other options

weighted

Boolean. Should weighted ASPL and CC be used? Defaults to FALSE. Set to TRUE for weighted ASPL and CC

iter

Numeric. Number of iterations in bootstrap. Defaults to 1000

cores

Numeric. Number of computer processing cores to use for bootstrapping samples. Defaults to n / 2 total number of cores. Set to any number between 1 and maximum amount of cores on your computer (see parellel::detectCores())

Value

Returns a list containing:

dataMeas

A matrix for the network input in the data argument, where columns are the semantic network measures from semnetmeas and rows are their values from each bootstrapped sample (results in a matrix with the dimensions iter by 3)

dataSumm

Summary statistics across the bootrapped samples for the network input in the data argument

prop

Outputs the proportion used from the prop argument

iter

Outputs the number of bootstrapped samples used from the iter argument

If a paired network is input, then also returns:

pairedMeas

A matrix for the network input in the paired argument, where columns are the semantic network measures from semnetmeas and rows are their values from each bootstrapped sample (results in a matrix with the dimensions iter by 3)

pairedSumm

Summary statistics across the bootrapped samples for the network input in the paired argument

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

Examples

# Simulate Dataset
one <- sim.fluency(20)

# Run bootstrap node-drop (partial) networks
one.result <- bootSemNeT(one, prop = .50, iter = 100,
sim = "cosine", cores = 2, method = "TMFG", type = "node")

# Run bootstrap case-drop networks
## Includes additional equating argument: minCase
one.result <- bootSemNeT(one, iter = 100, sim = "cosine",
cores = 2, method = "TMFG", type = "case", methodArgs = list(minCase = 2))


# Bootstrap case-wise networks
## Get openness data
low <- open.clean[which(open.group == "Low"),]
high <- open.clean[which(open.group == "High"),]

## Run
### Inlcudes additional NRW argument: threshold
open <- bootSemNeT(low, high, iter = 100, cores = 2, method = "NRW", type = "case",
methodArgs = list(type = "num", threshold = 3))



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