Skip to contents

Stacks the row, column and dyadic covariates into a single \(n \times n \times p\) array in which slice \(k\) holds the dyad-level values of the \(k\)th predictor. A sender attribute is broadcast down the rows, a receiver attribute is broadcast across the columns, and a dyadic covariate is copied verbatim. An intercept slice of ones is prepended unless it is switched off or would duplicate an already-constant predictor.

Usage

design_array(Xrow=NULL,Xcol=NULL,Xdyad=NULL,intercept=TRUE,n,warn=TRUE)

Arguments

Xrow

an n x pr matrix of row (sender) covariates

Xcol

an n x pc matrix of column (receiver) covariates

Xdyad

an n x n x pd array of dyadic covariates

intercept

logical; prepend a constant slice of ones

n

number of rows/columns

warn

logical; warn when missing covariate values are zero-filled (default TRUE). Set FALSE when the caller has already propagated the missingness into the response.

Value

an n x n x (pr+pc+pd+intercept) 3-way array

Author

lame authors