xmu_gsem_expand_snp: Expand SNP Summary Statistics into a Full Covariance Matrix

View source: R/xmuGSEM.R

xmu_gsem_expand_snpR Documentation

Expand SNP Summary Statistics into a Full Covariance Matrix

Description

Takes a baseline covariance structure (covstruc) of traits and incorporates the summary statistics of a single SNP to produce a combined (k+1) \times (k+1) covariance matrix (S) and corresponding asymptotic covariance matrix (V).

Usage

xmu_gsem_expand_snp(
  covstruc,
  beta_i,
  se_i,
  varSNP_i,
  varSNPSE2,
  GC = "standard",
  coords = NULL
)

Arguments

covstruc

A list containing the base trait covariance matrix ⁠$S⁠ and its asymptotic covariance ⁠$V⁠.

beta_i

Numeric vector of length $k$. The GWAS betas (effects) of the SNP on the $k$ traits.

se_i

Numeric vector of length $k$. The GWAS standard errors for the SNP on the $k$ traits.

varSNP_i

Numeric. The variance of the SNP (typically 2 \times MAF \times (1 - MAF)).

varSNPSE2

Numeric. The asymptotic variance of the SNP's variance estimate.

GC

Character. Genomic control method applied to the cross-trait sampling covariances. Options are "standard", "conserv", or "none".

coords

Optional matrix mapping coordinates for the asymptotic covariance matrix.

Value

A list containing:

  • S: The expanded (k+1) \times (k+1) covariance matrix.

  • V: The expanded ((k+1)(k+2)/2) \times ((k+1)(k+2)/2) asymptotic covariance matrix.


umx documentation built on Oct. 11, 2026, 5:07 p.m.