generate_blin: Generate data from the continuous BLIN model In blin: Bipartite Longitudinal Influence Network (BLIN) Estimation

Description

This function generates data from the bipartite logitudinal influence network (BLIN) model Y_t = A^T ∑_{k=1}^{lag} Y_{t-k} + ∑_{k=1}^{lag} Y_{t-k} B + X_t β + τ E_t.

Usage

 1 2 3 generate_blin(S, L, tmax, lag = 1, tau = 1, sigmaY = 1, muAB = 0, sigmaAB = 1, rankA = S, rankB = L, use_cov = TRUE, seed = NA, sparse = NA) 

Arguments

 S Dimension of A. L Dimension of B. tmax Number of observations of relational data. lag Autoregressive lag in model, defaults to 1. tau Optional error standard deviatiom, defaults to 1. sigmaY Optional standard deviation of entries in Y_t, defaults to 1. muAB Optional mean of entries in decomposition of matrices A = UV^T and B = WZ^T, defaults to 0. sigmaAB Optional standard deviation of entries in decomposition matrices of A = UV^T and B = WZ^T, defaults to 1. rankA Rank of influence network matrix A, defaults to full rank. rankB Optional rank of influence network matrix B, defaults to full rank. use_cov Optional logical used to indicate whether to include X_t β in the model (TRUE) or not (FALSE), defaults to TRUE. seed Optional numeric to set seed before generating, defaults to NA (no seed set). sparse Optional degree of sparsity in A and B, i.e. sparsity=.9 means 10% of the entries in A and B are set to zero at random. Defaults to NA (no entries set to zero).

Details

This function generates a continuous bipartite longitudinal relational data set from the BLIN model, Y_t = A^T ∑_{k=1}^{lag} Y_{t-k} + ∑_{k=1}^{lag} Y_{t-k} B + X_t β + τ E_t, where \{ Y_t \}_t is a set of S \times L matrices representing the bipartite relational data at each observation t. The set \{X_t \}_t is a set of S \times L \times p arrays describing the influence of the coefficient vector beta. Finally, each matrix E_t consists of iid standard normal random variables.

The matrices A and B are square matrices respesenting the influence networks among S senders and L receivers, respectively. The matrix A has decomposition A = UV^T, where each of U and V is an S \times {rankA} matrix of iid standard normal random variables with mean muAB and standard deviation sigmaAB. Similarly, the matrix B has decomposition B = WZ^T, where each of W and Z is an L \times {rankB} matrix of iid standard normal random variables with standard deviation sigmaAB and mean muAB for W and mean -muAB for Z. Lastly, the covariate array X_t has 3 covariates: the first is an intercept, the second consists of iid Bernoulli random variables, and the third consists of iid standard normal random variables. All coefficients are β_i = 0 for i = 1,2,3.

Value

 fit An blin object containing summary information.

blin_mle
 1 2 3 4 5 6 7 S <- 5 L <- 4 tmax <- 10 data <- generate_blin(S,L,tmax, lag=2, sparse=.8) names(data) dim(data$X) data$A