node.redundant.combine: Combines Redundant Nodes

Description Usage Arguments Value Author(s) References Examples

Description

Allows user to combine redundant nodes into sum scores and latent variables to reduce the redundancy of variables in their data

Usage

1
2
3
4
5
6
7
node.redundant.combine(
  node.redundant.obj,
  type = c("sum", "latent"),
  estimator = "WLSMV",
  auto = FALSE,
  ...
)

Arguments

node.redundant.obj

A node.redundant object

type

Character. Method to use to combine redundant variables.

  • "sum" Computes sum scores (i.e., means) of the variables

  • "latent" Computes latent variable scores using [lavaan]{cfa}

Defaults to "latent"

estimator

Character. Estimator to use for latent variables. Defaults to "WLSMV". See [lavaan]{cfa} for more options

auto

NOT RECOMMENDED. Boolean. Should redundant nodes be automatically combined? Defaults to FALSE. If set to TRUE, then redundant nodes will combined using the following heuristics:

1. Redundant nodes that form a 3-clique (i.e., a triangle) with the target node are automatically redundant

2. If there are no 3-cliques, then the 2-clique with the largest regularized partial correlation is selected

...

Options to be passed onto [lavaan]{cfa}

Value

Returns a list:

data

New data with redundant variables merged

merged

A matrix containing the variables that were decided to be redundant with one another

Author(s)

Alexander Christensen <alexpaulchristensen@gmail.com>

References

Christensen, A. P., Golino, H., & Silvia, P. J. (in press). A psychometric network perspective on the validity and validation of personality trait questionnaires. European Journal of Personality. doi: 10.1002/per.2265

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# obtain SAPA items
items <- psychTools::spi[,-c(1:10)]


# weighted topological overlap
redund <- node.redundant(items, method = "wTO", type = "adapt")

# partial correlation
redund <- node.redundant(items, method = "pcor", type = "adapt")

# check redundancies
key.ind <- match(colnames(items), as.character(psychTools::spi.dictionary$item_id))
key <- as.character(psychTools::spi.dictionary$item[key.ind])

# change names in redundancy output to questionnaire item description
named.nr <- node.redundant.names(redund, key)


if(interactive())
{combine <- node.redundant.combine(named.nr)}

EGAnet documentation built on Feb. 17, 2021, 1:06 a.m.