View source: R/METAL_forestplot.R
METAL_forestplot | R Documentation |
forest plot as R/meta's forest for METAL outputs
METAL_forestplot(
tbl,
all,
rsid,
flag = "",
package = "meta",
method = "REML",
split = FALSE,
...
)
tbl |
Meta-anslysis summary statistics. |
all |
statistics from all contributing studies. |
rsid |
SNPID-rsid mapping file. |
flag |
a variable in tbl such as cis/trans type. |
package |
"meta" or "metafor" package. |
method |
an explcit flag for fixed/random effects model. |
split |
when TRUE, individual prot-MarkerName.pdf will be generated. |
... |
Additional arguments to |
This functions takes a meta-data from METAL (tbl) and data from contributing studies (all) for forest plot. It also takes a SNPID-rsid mapping (rsid) as contributing studies often involve discrepancies in rsid so it is appropriate to use SNPID, i.e., chr:pos_A1_A2 (A1<=A2).
The study-specific and total sample sizes (N
) can be customised from METAL commands. By default, the input triplets each contain
a MarkerName
variable which is the unique SNP identifier (e.g., chr:pos:a1:a2) and the tbl
argument has variables
A1
and A2
as produced by METAL while the all
argument has EFFECT_ALLELE
and REFERENCE_ALLELE
as with a study
variable
indicating study name. Another variable common the tbl
and all
is prot
variable as the function was developed in a protein
based meta-analysis. As noted above, the documentation example also has variable N
.
From these all information is in place for generation of a list of forest plots through a batch run.
CUSTOMVARIABLE N
LABEL N as N
WEIGHTLABEL N
It will generate a forest plot specified by pdf for direction-adjusted effect sizes.
Jing Hua Zhao
schwarzer07gap
\insertRefwiller10gap
## Not run:
data(OPG, package="gap.datasets")
meta::settings.meta(method.tau="DL")
METAL_forestplot(OPGtbl,OPGall,OPGrsid,width=8.75,height=5,digits.TE=2,digits.se=2,
col.diamond="black",col.inside="black",col.square="black")
METAL_forestplot(OPGtbl,OPGall,OPGrsid,package="metafor",method="FE",xlab="Effect",
showweights=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.