Learn R Programming

EGAnet (version 0.9.8)

node.redundant.combine: Combines Redundant Nodes

Description

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

Usage

node.redundant.combine(
  node.redundant.obj,
  type = c("sum", "latent"),
  estimator = "WLSMV",
  auto = FALSE,
  ...
)

Arguments

node.redundant.obj
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

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. 10.1002/per.2265

Examples

Run this code
# NOT RUN {
# obtain SAPA items
items <- psychTools::spi[,-c(1:10)]

# }
# NOT RUN {
# 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)
# }
# NOT RUN {
if(interactive())
{combine <- node.redundant.combine(named.nr)}

# }

Run the code above in your browser using DataLab