For every marker, the standard error of the marker effect under inverse-variance weighting and under the unweighted analysis relative to its standard error under the rotation, predicted from the design without a scan. The variance of the marker effect under a working covariance \(V_w\) is evaluated under the true covariance \(\Sigma = \sigma_g^2 A + \Omega\) by the sandwich expression, and the rotation, whose working covariance is \(\Sigma\) itself, gives the generalised least squares minimum. The working covariances are \(\sigma_g^2 A + \mathrm{diag}(\Omega)\) for inverse-variance weighting and \(\sigma_g^2 A + cI\) for the unweighted analysis, with \(c\) the mean diagonal element of \(\Omega\). Nothing is rotated or scanned 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 (no NA).
- sigma2_g
the genetic variance on the scale of the relationship matrix. By default the estimate from the rotated model without a marker with the residual variance fixed at one (
x$fit$one$vg).- chunk_size
markers per block of matrix products.
Value
a data frame of class efficiency, one row per marker:
marker, maf (frequency of the less frequent allele), se_rotated
(the predicted standard error under the rotation at the given variances),
inverse_variance and unweighted (standard-deviation factors relative
to the rotation, at or above one; their squares are the ratios on the
variance scale). NA for a marker with no variance. Attributes
sigma2_g, sigma2_g_source, share (the estimation_share()) and
n, p.
Examples
ex <- rotationGWAS:::toy_trial(n = 40, n_markers = 60, seed = 2)
r <- rotation(ex$means, ex$Omega, ex$relationship, ex$covariates)
e <- efficiency(r, ex$markers)
summary(e)
#> Standard error of the marker effect relative to the rotation (factor at or above one), over 60 markers
#> median 95% max
#> inverse-variance 1.0066 1.0121 1.0138
#> unweighted 1.0095 1.0175 1.0194
#> Genetic variance 3.095 (rotated model without a marker, residual variance fixed at one); estimation share 0.236, on the average semivariance