add_attr_uniqueness: add_attr_uniqueness

View source: R/add_attr_uniqueness.R

add_attr_uniquenessR Documentation

add_attr_uniqueness

Description

add_attr_uniqueness

Usage

add_attr_uniqueness(network, qca_data, attr = NULL, bipartite = NULL)

Arguments

network

An object of class 'network'.

qca_data

The QCA-dataset you want to extend.

attr

The node-level attribute for that you would like to calculate an uniqueness-score. Note that this function works only with node-attributes of type 'character'!

bipartite

If the network is bipartite, select the level the cases and the outcome are on. If they are on the first level (sometimes referred as the actor level) of a bipartite network, choose 'b1', if they are on the second level (sometimes referred as the event level), choose 'b2'. Otherwise omit it.

Details

Sometimes it might be interesting to know, if an attribute of a case is rather unique (or very common) and whether this uniqueness might be a necessary and/or sufficient condition for the outcome. You can add a simple uniqueness-metric for a selected node-level attribute of your cases with this function.

Value

The preexisting QCA-dataset enhanced with a new column consisting of the uniqueness scores for each node-level attribute of the selected cases.

References

Butts, Carter T. (2008). network: a Package for Managing Relational Data in R. Journal of Statistical Software, 24(2). https://www.jstatsoft.org/v24/i02/paper.

Kirill Müller and Hadley Wickham (2021). tibble: Simple Data Frames. R package version 3.1.4. https://CRAN.R-project.org/package=tibble.

Examples

## Not run: qca_data <- add_attr_uniqueness(network, qca_data, attr = "Type", bipartite = "b2")


haraldsick/qcsna documentation built on Nov. 8, 2022, 9:36 p.m.