Skip to contents

Fits a model with multiple genes simultaneously, accounting for LD between them. Port of R GenomicSEM's multiGene(). Reuses the multi-SNP engine.

Usage

multiGene(covstruc, Genes, LD, GeneSE = "F", Genelist = "F")

Arguments

covstruc

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

Genes

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

LD

LD correlation matrix between genes

GeneSE

Gene SE override (default "F" = auto, numeric = override)

Genelist

Optional gene list to subset (character vector)

Value

A list with converged, chisq, df, and params

Examples

if (FALSE) { # \dontrun{
# `covstruc` from `ldsc()`, `Genes` from a TWAS-style per-gene table,
# and `LD` from the gene-level correlation matrix.
result <- multiGene(
  covstruc = covstruc,
  Genes = gene_df,     # data.frame with beta, se, var per gene
  LD = ld_matrix       # n_genes x n_genes correlation matrix
)
result$results
} # }