Cal_rg_h2g_jk_alltraits: genomic-block jackknife and compute rg + h2g

View source: R/Cal_rg_h2g_jk_alltraits.R

Cal_rg_h2g_jk_alltraitsR Documentation

genomic-block jackknife and compute rg + h2g

Description

This function performs genomic-block jackknife and computes rg + h2g.

Usage

Cal_rg_h2g_jk_alltraits(
  n_block = 200,
  hmp3,
  phenotype,
  munged_sumstats,
  ld_path,
  wld_path,
  sample_prev = NULL,
  population_prev = NULL
)

Arguments

n_block

number of jackknife blocks.

hmp3

Directory for hapmap 3 snplist.

phenotype

Vector of the phenotype name

munged_sumstats

All LDSC-munged GWAS .stat.gz

ld_path

Path to directory containing ld score files.

wld_path

Path to directory containing weight files.

sample_prev

Vector of sample prevalence, in the same order of input GWAS summary statistics.

population_prev

Vector of population prevalence, in the same order of input GWAS summary statistics.

Value

A named list containing block jackknife estimates of SNP-heritability and genetic correlation across all input phenotypes. The list includes the following elements:

  • h2array: A matrix of per-block SNP-heritability estimates on the observed scale. Rows correspond to jackknife blocks, and columns correspond to input phenotypes.

  • liah2array: A matrix of per-block SNP-heritability estimates on the liability scale, with the same row and column structure as h2array.

  • rgarray: A three-dimensional array of pairwise genetic correlation estimates. The first two dimensions represent phenotype pairs (rows and columns), and the third dimension indexes the jackknife blocks.

  • gcovarray: A three-dimensional array of pairwise genetic covariance estimates, aligned in structure with rgarray.

Each element provides per-block estimates that can be used to compute standard errors or confidence intervals via the block jackknife method.


pleioh2g documentation built on March 9, 2026, 5:07 p.m.