get_b_se: Get b and se from AF, n, and z

View source: R/get_b_se.R

get_b_seR Documentation

Get b and se from AF, n, and z

Description

The function obtains effect size and its standard error.

Usage

get_b_se(f, n, z)

Arguments

f

Allele frequency.

n

Sample size.

z

z-statistics.

Value

b and se.

Examples

## Not run: 
  library(dplyr)
  # eQTLGen
  cis_pQTL <- merge(read.delim('eQTLGen.lz') %>%
              filter(GeneSymbol=="LTBR"),read.delim("eQTLGen.AF"),by="SNP") %>%
              mutate(data.frame(get_b_se(AlleleB_all,NrSamples,Zscore)))
  head(cis_pQTL,1)
        SNP    Pvalue SNPChr  SNPPos AssessedAllele OtherAllele Zscore
  rs1003563 2.308e-06     12 6424577              A           G 4.7245
             Gene GeneSymbol GeneChr GenePos NrCohorts NrSamples         FDR
  ENSG00000111321       LTBR      12 6492472        34     23991 0.006278872
  BonferroniP hg19_chr hg19_pos AlleleA AlleleB allA_total allAB_total
            1       12  6424577       A       G       2574        8483
  allB_total AlleleB_all          b          se
        7859   0.6396966 0.04490488 0.009504684

## End(Not run)

gap documentation built on Aug. 26, 2023, 5:07 p.m.