The function, after minimal preprocessing, calls the underlying C code
and computes the linear statistic, its expectation and covariance and,
optionally, nresample samples from its permutation distribution.
When both ix and iy are missing, the number of rows of
X and Y is the same, ie the number of observations.
When X is missing and ix a factor, the code proceeds as
if X were a dummy matrix of ix without explicitly
computing this matrix.
Both ix and iy being present means the code treats them
as subsetting vectors for X and Y. Note that ix = 0
or iy = 0 means that the corresponding observation is missing
and the first row or X and Y must be zero.
lmult allows left-multiplication of a contrast matrix when X
was (equivalent to) a factor.