| umxGSEM_ldsc | R Documentation |
Runs multivariate LD score regression on munged .sumstats.gz files from
umxGSEM_munge() via OpenMx imxLDSC. The return value is a umx covstruc:
S and I named by trait, V / N named with OpenMx residual labels
(var_SCZ, poly_BIP_SCZ, ...) so it can be passed to umxGSEM() as
covstruc.
umxGSEM_ldsc(
traits,
sample.prev,
population.prev,
ld,
wld,
trait.names = NULL,
sep_weights = FALSE,
chr = 22,
n.blocks = 200,
ldsc.log = NULL,
stand = FALSE,
select = FALSE,
chisq.max = NA
)
traits |
Character vector of paths to munged |
sample.prev |
Numeric vector of sample prevalences (cases / N).
Use |
population.prev |
Numeric vector of population prevalences for
liability-scale conversion. Use |
ld |
Path to folder containing LD score files (e.g. |
wld |
Path to weight LD score files. Ignored when |
trait.names |
Optional names for the traits (default: munged file
basenames with |
sep_weights |
If |
chr |
Highest chromosome to include when |
n.blocks |
Jackknife blocks for |
ldsc.log |
Optional path prefix for a short text log. If |
stand |
If |
select |
Chromosome subset: |
chisq.max |
Optional chi-square outlier cutoff ( |
Tutorial 1k-SNP files will run but the estimates are not usable (too few SNPs). For a real structural model use full-sumstat ldsc or Psych_LDSC.
S is K x K genetic covariance (heritabilities on the diagonal).
V is the sampling covariance of vech(S), length K(K+1)/2.
I holds LDSC intercepts (sample overlap / stratification).
Binary traits: supply both sample.prev and population.prev for liability
scaling. Continuous traits: NA (a lone 0.5 with population.prev = NA
is treated as continuous).
A list with S, V, I, N, m (and S_Stand/V_Stand if stand).
Ready for umxGSEM() / umxGSEM_label_ldsc().
umxGSEM_munge(), umxGSEM(), Psych_LDSC
Other GSEM:
Anthro_LDSC,
Psych_LDSC,
plot.umx_GWAS(),
umxGSEM(),
umxGSEM_GWAS(),
umxGSEM_dl_tutorial_files(),
umxGSEM_label_ldsc(),
umxGSEM_munge(),
umxGSEM_std(),
umxGSEM_sumstats(),
umxSummary.MxDataStatic(),
umxSummary.list()
## Not run:
tut = umxGSEM_dl_tutorial_files()
ss = umxGSEM_munge(
files = tut$sumstats, hm3 = tut$hm3,
Ns = c(105318, 16731, 173005),
trait.names = c("SCZ", "BIP", "MDD"),
output_dir = tut$dir, overwrite = TRUE
)
# Pedagogical only: ~1k SNPs. Use data(Psych_LDSC) for a real model.
covstruc = umxGSEM_ldsc(
traits = ss,
sample.prev = c(0.39, 0.45, 0.35),
population.prev = c(0.01, 0.01, 0.16),
ld = tut$ld, wld = tut$ld,
trait.names = c("SCZ", "BIP", "MDD"),
n.blocks = 20
)
umxSummary(covstruc)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.