We first fit the model \(y = X \beta + \epsilon\)
where \(X\) is a matrix of covariates (or just an intercept) and
\(\epsilon\) is multivariate normal with mean 0 and covariance
matrix \(\sigma^2 [h^2 (2 K) + I]\) where
\(K\) is the kinship matrix and \(I\) is the identity matrix.
We then take \(h^2\) as fixed and then scan the genome, at
each genomic position fitting the model \(y = P \alpha + X \beta
+ \epsilon\) where \(P\) is a matrix of genotype
probabilities for the current position and again \(X\) is a
matrix of covariates \(\epsilon\) is multivariate normal with
mean 0 and covariance matrix \(\sigma^2 [h^2 (2 K) +
I]\), taking \(h^2\) to be known.
For each of the inputs, the row names are used as
individual identifiers, to align individuals. The genoprobs
object should have a component "is_x_chr" that indicates
which of the chromosomes is the X chromosome, if any.
The ... argument can contain several additional control
parameters; suspended for simplicity (or confusion, depending on
your point of view). tol is used as a tolerance value for linear
regression by QR decomposition (in determining whether columns are
linearly dependent on others and should be omitted); default
1e-12. intcovar_method indicates whether to use a high-memory
(but potentially faster) method or a low-memory (and possibly
slower) method, with values "highmem" or "lowmem"; default
"lowmem". max_batch indicates the maximum number of phenotypes
to run together; default is unlimited. maxit is the maximum
number of iterations for converence of the iterative algorithm
used when model=binary. bintol is used as a tolerance for
converence for the iterative algorithm used when model=binary.
eta_max is the maximum value for the "linear predictor" in the
case model="binary" (a bit of a technicality to avoid fitted
values exactly at 0 or 1).
If kinship is absent, Haley-Knott regression is performed.
If kinship is provided, a linear mixed model is used, with a
polygenic effect estimated under the null hypothesis of no (major)
QTL, and then taken as fixed as known in the genome scan.
If kinship is a single matrix, then the hsq
in the results is a vector of heritabilities (one value for each phenotype). If
kinship is a list (one matrix per chromosome), then
hsq is a matrix, chromosomes x phenotypes.