View source: R/create_qca_data.R
| create_qca_data | R Documentation |
Function to create a basic dataset of cases and outcome.
create_qca_data(network, attr_case, attr_outcome = NULL, bipartite = NULL)
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. |
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!
Creates a data set (tibble) with two columns ('Cases' and the corresponding 'Outcome').
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.
## Not run: qca_data <- create_qca_data(network, attr_cases = "vertex.names", attr_outcome = "Type", bipartite = "b2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.