Learn R Programming

lame (version 1.3.4)

.ame_propagate_cov_na: Propagate covariate missingness into the response

Description

For an AME fit, a dyad whose covariate value is missing cannot contribute a covariate-coefficient observation. Rather than silently imputing the missing covariate as 0 (which biases the coefficient when the covariate is not mean-centred), the dyad is treated as an unobserved tie and handled by data augmentation. This helper sets the affected Y cells to NA; lame already does this internally, and this brings ame into line.

Usage

.ame_propagate_cov_na(Y, Xrow = NULL, Xcol = NULL, Xdyad = NULL)

Value

Y with covariate-missing cells set to NA.

Arguments

Y

an n x n response matrix.

Xrow, Xcol, Xdyad

row, column and dyadic covariates (or NULL).