Skip to contents

Fits a model with multiple SNPs simultaneously, accounting for LD between them. Port of R GenomicSEM's multiSNP().

Usage

multiSNP(covstruc, SNPs, LD, SNPSE = FALSE, SNPlist = NA)

Arguments

covstruc

LDSC result (named list with S, V, I, N, m components)

SNPs

Data frame of SNP summary statistics (with beta, se, var columns per SNP)

LD

LD correlation matrix between SNPs

SNPSE

SNP SE override (default FALSE = auto, numeric = override)

SNPlist

Optional SNP list to subset (character vector)

Value

A list with converged, chisq, df, and params

Examples

if (FALSE) { # \dontrun{
# `covstruc` from `ldsc()`, `SNPs` from `sumstats()` subset to the
# target SNPs, and `LD` from a reference panel (e.g. LDlinkR or PLINK).
result <- multiSNP(
  covstruc = covstruc,
  SNPs = snp_df,       # data.frame with beta, se, var per SNP
  LD = ld_matrix,      # n_snps x n_snps correlation matrix
  SNPSE = 0.0005
)
result$results
} # }