This function generates data from the bipartite logitudinal influence network (BLIN) model \(Y_t = A^T \sum_{k=1}^{lag} Y_{t-k} + \sum_{k=1}^{lag} Y_{t-k} B + X_t \beta + \tau E_t\).
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)Dimension of A.
Dimension of B.
Number of observations of relational data.
Autoregressive lag in model, defaults to 1.
Optional error standard deviatiom, defaults to 1.
Optional standard deviation of entries in \(Y_t\), defaults to 1.
Optional mean of entries in decomposition of matrices \(A = UV^T\) and \(B = WZ^T\), defaults to 0.
Optional standard deviation of entries in decomposition matrices of \(A = UV^T\) and \(B = WZ^T\), defaults to 1.
Rank of influence network matrix \(A\), defaults to full rank.
Optional rank of influence network matrix \(B\), defaults to full rank.
Optional logical used to indicate whether to include \(X_t \beta\) in the model (TRUE) or not (FALSE), defaults to TRUE.
Optional numeric to set seed before generating, defaults to NA (no seed set).
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).
An blin object containing summary information.
This function generates a continuous bipartite longitudinal relational data set from the BLIN model, \(Y_t = A^T \sum_{k=1}^{lag} Y_{t-k} + \sum_{k=1}^{lag} Y_{t-k} B + X_t \beta + \tau 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 \(\beta_i = 0\) for \(i = 1,2,3\).
# NOT RUN {
S <- 5
L <- 4
tmax <- 10
data <- generate_blin(S,L,tmax, lag=2, sparse=.8)
names(data)
dim(data$X)
data$A
# }
Run the code above in your browser using DataLab