Description Usage Arguments Details Value See Also Examples
View source: R/generate_data.R
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.
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)
|
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 ( |
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. |
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.
fit |
An |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.