node.redundant.names: Changes Variable Names to Descriptions for 'node.redundant'...

Description Usage Arguments Value Author(s) References Examples

View source: R/node.redundant.names.R

Description

Using a key, this function changes the variable names in the node.redundant output to descriptions

Usage

1
node.redundant.names(node.redundant.obj, key)

Arguments

node.redundant.obj

A node.redundant object

key

Character vector. A vector with variable descriptions that correspond to the order of variables from the data used as input into the node.redundant function

Value

Returns a list:

redundant

Vectors nested within the list corresponding to redundant nodes with the name of object in the list

data

Returns original data

weights

Returns weights determine by weighted topological overlap or partial correlations

key

Returns original key

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
# 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)

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