create_qca_data: create_qca_data

View source: R/create_qca_data.R

create_qca_dataR Documentation

create_qca_data

Description

Function to create a basic dataset of cases and outcome.

Usage

create_qca_data(network, attr_case, attr_outcome = NULL, bipartite = NULL)

Arguments

network

An object of class 'network'.

attr_case

The node-level attributes that are the cases (usually 'vertex.names').

attr_outcome

This argument is optional. If the outcome is a node_level attribute, it can be defined as the outcome already. A according column named 'Output' will be added to the dataset. If an other output, like an node-level indice or another network configuration shall be the outcome, just add them with one of the other functions of this package (or manually) and define them as the outcome in the QCA package. Otherwise omit it.

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 'bipartite = "b1"', if they are on the second level (sometimes referred as the event level), choose 'bipartite = "b2"'. Otherwise omit it.

Details

Creating this data set and defining cases and outcome is always the first step. Other variables or network-indices can be added in subsequent steps. Please note that the tibble format is used due to convenience. After adding the desired variables, the QCA-data-tibble can be finalized/converted with the finalize_qca_data-function!

Value

Creates a data set (tibble) with two columns ('Cases' and the corresponding 'Outcome').

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.

Dusa, Adrian (2019). QCA with R. A Comprehensive Resource. Springer International Publishing.

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 <- create_qca_data(network, attr_cases = "vertex.names", attr_outcome = "Type", bipartite = "b2")



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