For each named marker, the rotated model is fitted by REML with the marker
among the fixed effects and the residual variance fixed at its target of
one, the genetic variance re-estimated. The marker effect, its standard
error from \((X'V^{-1}X)^{-1}\) without a scale factor, and a t test on
\(n - p - 1\) degrees of freedom are returned. With known variance
components this fit reproduces the single-stage analysis of the plot data,
which the genome scan, with its residual variance estimated and its
variance ratio held at the model without a marker, approximates. The
paper's rule is to refit the markers whose scan statistic lies within a
window of the significance threshold, on either side; given a
genome_scan() object those markers are selected here.
Arguments
- x
a
rotationobject.- markers
numeric matrix of marker dosages (0, 1, 2), accessions in rows with the accession names as row names, markers in columns; complete.
- which
the markers to refit: a character vector of marker names (or column indices). If
NULL,scanmust be given and the markers withinwindowof its threshold under the rotation are refitted.- scan
optionally the
genome_scanobject of the same markers; its threshold is used forsignificant, its rotated statistic is carried along, and it selects the markers whenwhichisNULL.- window
the half-width, in \(-\log_{10} p\), of the band around the threshold from which markers are selected when
whichisNULL.- threshold
the significance threshold in \(-\log_{10} p\) when no
scanis given;NULLleavessignificantasNA.
Value
a data frame of class refit, one row per marker: marker,
scan_neglog10p (when a scan is given), genetic (the genetic variance
of the refit), beta, se, t, neglog10p, significant, and
boundary (whether the genetic variance went to zero). Attributes
threshold, window, df, n, p.
Examples
ex <- rotationGWAS:::toy_trial(n = 120, n_markers = 80, seed = 2)
r <- rotation(ex$means, ex$Omega, ex$relationship, ex$covariates)
s <- genome_scan(r, ex$markers)
refit_markers(r, ex$markers, scan = s, window = 1.5)
#> Refit of 1 marker with the residual variance fixed at one (t on 116 degrees of freedom); threshold 3.204 in -log10 p, 0 significant
#> marker scan_neglog10p genetic beta se t neglog10p boundary
#> m0017 3.05 3.187 1.405 0.3995 3.516 3.204 FALSE
#> significant
#> FALSE
refit_markers(r, ex$markers, which = ex$truth$causal, scan = s)
#> Refit of 1 marker with the residual variance fixed at one (t on 116 degrees of freedom); threshold 3.204 in -log10 p, 0 significant
#> marker scan_neglog10p genetic beta se t neglog10p boundary
#> m0017 3.05 3.187 1.405 0.3995 3.516 3.204 FALSE
#> significant
#> FALSE