Type: | Package |
Title: | A Dynamic Bipartite Latent Space Model to Analyse Irish Companies' Boards from 2003 to 2013 |
Version: | 1.4 |
Date: | 2019-8-20 |
Description: | Provides the dataset and an implementation of the method illustrated in Friel, N., Rastelli, R., Wyse, J. and Raftery, A.E. (2016) <doi:10.1073/pnas.1606295113>. |
License: | GPL-3 |
Imports: | Rcpp (≥ 0.12.19) |
LinkingTo: | Rcpp, RcppArmadillo |
Depends: | R (≥ 3.5.0) |
NeedsCompilation: | yes |
Packaged: | 2019-08-21 14:56:18 UTC; riccardo |
Author: | Riccardo Rastelli [aut, cre] |
Maintainer: | Riccardo Rastelli <riccardoras@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2019-08-29 07:30:10 UTC |
A Dynamic Bipartite Latent Space Model to Analyse Irish Companies' Boards from 2003 to 2013
Description
Provides the dataset and an implementation of the method illustrated in Friel, N., Rastelli, R., Wyse, J. and Raftery, A.E. (2016) <DOI:10.1073/pnas.1606295113>.
Author(s)
Riccardo Rastelli Maintainer: Riccardo Rastelli <riccardoras@gmail.com>
References
Friel, N., Rastelli, R., Wyse, J. and Raftery, A.E. (2016) <DOI:10.1073/pnas.1606295113>
Board Composition For Companies Quoted On The Irish Stock Exchange From 2003 To 2013
Description
Board composition for companies quoted on Irish Stock Exchange from 2003 to 2013. Board compositions are only observed at the end of each year.
Usage
data("IrishDirectoratesData")
Format
IrishDirectoratesData
is a list containing:
edgelist
the edgelist for a bipartite dynamic network. Each row of this dataframe corresponds to an undirected edge in the network. For each row, the first entry identifies the time frame where the edge occurs, the second entry represents the director, whereas the third identifies the company. The presence of an edge at a certain time frame between a director and a company means that the director was part of the company's board at the end of the corresponding year.
years
lookup table for the time frame labels.
directors_names
lookup table for directors' names.
companies_names
lookup table for companies' names.
Details
The adjacency cube can be constructed from the edgelist. Please see example for sample code.
Source
Irish Stock Exchange (http://www.ise.ie/).
References
Friel, N., Rastelli, R., Wyse, J. and Raftery, A.E. (2016) <DOI:10.1073/pnas.1606295113>.
Examples
data(IrishDirectoratesData)
attach(IrishDirectoratesData)
N <- length(directors_names)
M <- length(companies_names)
tframes <- length(years)
# construct the binary adjacency cube
adj <- array(0,c(N,M,tframes))
for (l in 1:nrow(edgelist)) adj[edgelist[l,2],edgelist[l,3],edgelist[l,1]] = 1
dimnames(adj) = list(directors_names, companies_names, years)
# calculate the degrees of directors and boards
out_degrees <- apply(adj,c(1,3),sum)
in_degrees <- apply(adj,c(2,3),sum)
# create a binary matrix with ones corresponding to interlocked directors
interlocked_directors <- ifelse(out_degrees > 1, 1, 0)
# create a binary matrix with ones corresponding to interlocking companies
interlocking_companies <- matrix(0,M,tframes)
for (t in 1:tframes) for (i in 1:N) for (j in 1:M) if (adj[i,j,t] == 1) {
if (interlocked_directors[i,t] > 0) interlocking_companies[j,t] = 1
}
# extract labels of interlocking companies
selected_companies <- which(rowSums(interlocking_companies) > 0)
# extract labels of remaining active directors
new_out_degrees <- apply(adj[,selected_companies,], c(1,3), sum)
selected_directors <- which(rowSums(new_out_degrees) > 0)
# create the new adjacency cube for the reduced data, as shown in the referenced paper
adj_reduced <- adj[selected_directors, selected_companies, ]
Fitted Dynamic Bipartite Latent Position Model.
Description
Fitted Dynamic Bipartite Latent Position Model (dblpm) that serves as initialisation for the Metropolis-within-Gibbs algorithm
Usage
data("IrishDirectoratesFit")
Format
The list IrishDirectoratesFit
has one element called tail
which contains the values for each of the model parameters.
References
Friel, N., Rastelli, R., Wyse, J. and Raftery, A.E. (2016) <DOI:10.1073/pnas.1606295113>.
dblpm_mcmc
Description
Runs the Metropolis-within-Gibbs sampler on the given Dynamic Bipartite Latent Position Model (dblpm network).
Usage
dblpm_mcmc(network, niter, burnin, thin, x_var, w_var, gamma_var, beta_var, verbose = T)
Arguments
network |
A list identifying a dblpm network. |
niter |
Number of iterations after thinning and burnin. |
burnin |
Number of iterations to be discaded before starting the count for niter. The burnin iterations are not thinned. |
thin |
After burnin, keep one sampled observation every |
x_var |
Proposal variance for the positions of sender nodes. |
w_var |
Proposal variance for the positions of receiver nodes. |
gamma_var |
Proposal variance for the intercept gamma. |
beta_var |
Proposal variance for the intercept beta. |
verbose |
|
Value
computing_time |
Number of seconds required for the sampling process. |
samples |
Sampled values for each of the model parameters. |
tail |
dblpm network sampled in the last iteration. |
Examples
data(IrishDirectoratesFit)
IrishDirectoratesFit <- dblpm_mcmc(network = IrishDirectoratesFit$tail,
niter = 3, burnin = 6, thin = 3,
x_var = 4.75, w_var = 0.25, gamma_var = 1.825, beta_var = 0.2175,
verbose = TRUE)
# to replicate the results of the paper: niter = 10000, burnin = 500000, thin = 50
dblpm_posterior
Description
Evaluates the posterior value for a given Dynamic Bipartite Latent Position Model (dblpm network).
Usage
dblpm_posterior(network)
Arguments
network |
A list identifying a dblpm network. |
Value
computing_time |
Number of seconds required for the evaluation. |
likelihood_value |
Likelihood value for the given network. |
posterior_value |
Posterior value for the given network. |
Examples
data(IrishDirectoratesFit)
res <- dblpm_posterior(network = IrishDirectoratesFit$tail)