## missing ties imputation using r0-net wave 1.
## select set of nodes
rm(list=ls())
library(igraph)
##
## Attaching package: 'igraph'
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
## The following object is masked from 'package:base':
##
## union
library(intergraph)
library(network)
## network: Classes for Relational Data
## Version 1.15 created on 2019-04-01.
## copyright (c) 2005, Carter T. Butts, University of California-Irvine
## Mark S. Handcock, University of California -- Los Angeles
## David R. Hunter, Penn State University
## Martina Morris, University of Washington
## Skye Bender-deMoll, University of Washington
## For citation information, type citation("network").
## Type help("network-package") to get started.
##
## Attaching package: 'network'
## The following objects are masked from 'package:igraph':
##
## %c%, %s%, add.edges, add.vertices, delete.edges,
## delete.vertices, get.edge.attribute, get.edges,
## get.vertex.attribute, is.bipartite, is.directed,
## list.edge.attributes, list.vertex.attributes,
## set.edge.attribute, set.vertex.attribute
load("w1_igraph_subsets.RData")
w1.ig
## IGRAPH 831b829 UN-- 182998 327741 --
## + attr: name (v/c), fb_age (v/n), chicago (v/n), sex_male (v/n),
## | degree (v/n)
## + edges from 831b829 (vertex names):
## [1] 22222827--_xDvXlS7mwBWvVOnR0_zm_S1REI
## [2] 22223149--HK32l4sI-okhtszh8moPwUh4XDE
## [3] 22228300--QEu7oYINTvMDC0zngc26yu-GA-Y
## [4] 22228550--dAEIeSaUPvFwUNt8AWGTKVq8ar4
## [5] 22228547--hTJkzVa-Q7LFjKAh7McMitgZO28
## [6] 11111019--G_zYyGY3sfr8mV20u22knTw4ssE
## [7] 22222382--G_zYyGY3sfr8mV20u22knTw4ssE
## + ... omitted several edges
deg.ig.fb.net <- degree(w1.ig)
summary(deg.ig.fb.net)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 1.000 1.000 3.582 1.000 4729.000
id.ig.fb.net.greq.30 <- which(deg.ig.fb.net >= 30)
vtx.ig.fb.net.greq.30 <- V(w1.ig)$name[id.ig.fb.net.greq.30]
w1.ig.deg.greq.30 <- induced.subgraph(w1.ig, v=vtx.ig.fb.net.greq.30)
w1.net.deg.greq.30 <- asNetwork(w1.ig.deg.greq.30)
save.image(file="w1_missing_tie_imputation_networks.RData")