% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_b_se.R
\name{get_b_se}
\alias{get_b_se}
\title{Get b and se from AF, n, and z}
\usage{
get_b_se(f, n, z)
}
\arguments{
\item{f}{Allele frequency.}

\item{n}{Sample size.}

\item{z}{z-statistics.}
}
\value{
b and se.
}
\description{
The function obtains effect size and its standard error.
}
\examples{
\dontrun{
  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
}
}
