| Title: | Process Data from the Social Networks and Fertility Survey |
|---|---|
| Description: | Processes data from The Social Networks and Fertility Survey, downloaded from <https://dataarchive.lissdata.nl>, including correcting respondent errors and transforming network data into network objects to facilitate analyses and visualisation. |
| Authors: | Gert Stulp [aut, cre] (ORCID: <https://orcid.org/0000-0003-0173-5554>) |
| Maintainer: | Gert Stulp <[email protected]> |
| License: | CC BY 4.0 |
| Version: | 0.1.2 |
| Built: | 2026-05-16 05:51:03 UTC |
| Source: | https://github.com/gertstulp/fertnet |
Change column types for social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
change_column_types(data)change_column_types(data)
data |
Tibble which is the result of |
Tibble with corrected column types and updated labels
read_data() |> translate() |> change_column_types()read_data() |> translate() |> change_column_types()
Create dataframe of alter attributes based on social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
create_alter_attr(data)create_alter_attr(data)
data |
Tibble which is the result of |
Tibble with variable alter_attr which includes a dataframe with alter attributes for each respondent
data <- read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels() create_alter_attr(data[1, ])data <- read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels() create_alter_attr(data[1, ])
Create dataframe of edgelist based on social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
create_edgelist(data = NULL, vars = NULL)create_edgelist(data = NULL, vars = NULL)
data |
Tibble which is the result of |
vars |
Vector with variable names of 25 variables describing alter-alter-ties |
Tibble with variable edgelist which includes a dataframe with edgelist for each respondent
data <- read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels() create_edgelist(data[1, vars_alter_ties])data <- read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels() create_edgelist(data[1, vars_alter_ties])
Create dataframes of alter attributes and edgelists and store them in list-columns for social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
create_nw(data)create_nw(data)
data |
Tibble which is the result of |
Tibble with list-columns containing alter attributes and edgelists
read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels() |> create_nw()read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels() |> create_nw()
Produces corrected relationship labels for social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
create_relation_labels(data)create_relation_labels(data)
data |
Tibble which is the result of |
Tibble in which data on relationship labels are corrected and improved
read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels()read_data() |> translate() |> change_column_types() |> fix_errors() |> create_relation_labels()
Create tidygraph objects from social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
create_tidygraph(data)create_tidygraph(data)
data |
Tibble which is the result of |
Tibble with variable tidygraph that includes tidygraph objects for all respondents
produce_data() |> create_tidygraph()produce_data() |> create_tidygraph()
Fixes reporting errors and inconsistencies in social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
fix_errors(data)fix_errors(data)
data |
Tibble which is the result of |
Tibble in which data errors are fixed and data worries are flagged
read_data() |> translate() |> change_column_types() |> fix_errors()read_data() |> translate() |> change_column_types() |> fix_errors()
Get respondent background variables (LISS: avars_201802_EN_1.0p.sav) for social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
get_background_vars(file = "avars_201802_EN_1.0p.sav")get_background_vars(file = "avars_201802_EN_1.0p.sav")
file |
Path to file avars_201802_EN_1.0p.sav (or renamed variant) |
Tibble of data with background variables for social networks and fertility data
get_background_vars()get_background_vars()
Produces tidy dataset of social networks and fertility data (LISS: wj18a_EN_1.0p.sav) with network data as listcolumns
produce_data( tidygraph_col = FALSE, background_vars = FALSE, remove_timing_vars = TRUE )produce_data( tidygraph_col = FALSE, background_vars = FALSE, remove_timing_vars = TRUE )
tidygraph_col |
Should a variable |
background_vars |
Should respondent background variables be added? Requires presence of avars_201802_EN_1.0p.sav (default: FALSE) |
remove_timing_vars |
Should variables on timing of survey responses be removed? (default: TRUE) |
Tibble of social networks and fertility data (LISS: wj18a_EN_1.0p.sav) with network data as listcolumns
produce_data() produce_data(TRUE, TRUE, FALSE)produce_data() produce_data(TRUE, TRUE, FALSE)
Reads-in social networks and fertility data (LISS: wj18a_EN_1.0p.sav)
read_data(file = "wj18a_EN_1.0p.sav")read_data(file = "wj18a_EN_1.0p.sav")
file |
Path to file wj18a_EN_1.0p.sav (or renamed variant) |
Tibble of social networks and fertility data
read_data("wj18a_EN_1.0p.sav")read_data("wj18a_EN_1.0p.sav")
Remove variables related to timing of giving answers in survey
remove_timing_vars(data)remove_timing_vars(data)
data |
Tibble sent within function |
Tibble without timing variables
Translate LISS variable names of social networks and fertility data (LISS: wj18a_EN_1.0p.sav) into sensible English names
translate(data)translate(data)
data |
Tibble which is the result of |
Tibble with sensible column names
read_data() |> translate()read_data() |> translate()