Modifying missing tie data
These functions offer tools for imputing missing tie data. Currently two options are available:
na_to_zero()
replaces any missing values with zeros, which are the modal value in sparse social networks.na_to_mean()
replaces missing values with the average non-missing value.na_to_zero(.data) na_to_mean(.data)
.data
: An object of a manynet-consistent class:
{base}
R{base}
R or tibble from {tibble}
{igraph}
package{network}
package{tidygraph}
packageA data object of the same class as the function was given.
missTest <- ison_adolescents %>% add_tie_attribute("weight", c(1,NA,NA,1,1,1,NA,NA,1,1)) %>% as_matrix missTest na_to_zero(missTest) na_to_mean(missTest)
Krause, Robert, Mark Huisman, Christian Steglich, and Tom A.B. Snijders. 2020. "Missing data in cross-sectional networks: An extensive comparison of missing data treatment methods". Social Networks, 62: 99-112. tools:::Rd_expr_doi("10.1016/j.socnet.2020.02.004")
Other modifications: manip_as
, manip_correlation
, manip_deformat
, manip_from
, manip_levels
, manip_nodes
, manip_paths
, manip_permutation
, manip_preformat
, manip_project
, manip_reformat
, manip_scope
, manip_split
, manip_ties