boxplot for the return value 'perm_LnOR' or 'perm_VARLnOR' of 'meta.MCPerm' or 'meta.TradPerm'

Share:

Description

boxplot for the return value 'perm_LnOR' or 'perm_VARLnOR' of 'meta.MCPerm' or 'meta.TradPerm'.

Usage

1
2
3
PermMeta.LnOR.boxplot(PermMeta, plot = "LnOR", plot_study = "all", order = "no", 
    main = "LnOR,no order", true_value_pch = 3, pch_col = "red", 
	 pos = 3, text_col = "blue", digits = 2)

Arguments

PermMeta

the result of function 'meta.TradPerm' or 'meta.MCPerm'.

plot

a character string indicating which return value of function 'meta.TradPerm' or 'meta.MCPerm' to be plot. The value can be "LnOR"(default), "LnOR_VAR". "LnOR" and "LnOR_VAR" separetly plots the return value 'perm_LnOR' and 'perm_VARLnOR'.

plot_study

a numeric vector indicates which study(ies) in meta analysis to be plotted. Default value is 'all', which indicates all studies in meta analysis to be plotted.

order

a character string specifying the boxplot ascending order. The order can be 'LnOR', 'LnOR_VAR', 'VAR_LnOR', 'sample' and 'no'(default). See details.

main

the main title (on top), default value is 'LnOR,no order'.

true_value_pch

the pch(default 3) to mark the observed value in the boxplot of simulation data.

pch_col

the color of pch, default value is 'red'.

pos

a position specifier for text of the observed value around the pch.Values of 1, 2, 3(default) and 4, respectively indicate positions below, to the left of, above and to the right of the specified coordinates.

text_col

the color(default 'blue') for the text of the observed value.

digits

integer(default 2) indicating the number of decimal places.

Details

Boxplot for the return value('perm_LnOR','perm_VARLnOR') of 'meta.MCPerm' or 'meta.TradPerm'. And through 'pch' and text to mark the observed value. The boxplot can order by 'LnOR', 'LnOR_VAR', 'VAR_LnOR', 'sample' and 'no'.

'LnOR' indicates the boxplot order by the log odd ratio calculated by each study observed genotype count. 'LnOR_VAR' indicates the boxplot order by the variance of log odd ratio calculated by formule 1/ai+1/bi+1/ci+1/di(ai/bi/ci/di separetly are case/control two alleles count). 'VAR_LnOR' indicates the variance of simulation log odd ratios. 'sample' indicates the boxplot order by the sample size of each study. 'no' indicates that the boxplot order is same as the order of parameter 'plot_study'.

MCPerm details see chisq.MCPerm. TradPerm details see chisq.TradPerm.

Value

plot

character value of parameter 'plot'.

plot_num

the number of the selected studies to be plotted.

plot_order

character value of parmeter 'order'.

order_index

a numeric vector of the order of studies.

true_LnOR

a numeric vector of log odd ratio calculated by observed value of each study. And the order is corresponding to the 'order_index'.

LnOR_VAR

a numeric vector of the log odd ratio variance(1/ai+1/bi+1/ci+1/di) calculated by observed value of each study. And the order is corresponding to the 'order_index'.

VAR_LnOR

a numeric vector of the variance of the simulated log odd ratios got by permutation. And the order is corresponding to the 'order_index'.

sample

a numeric vector of the sample size of the plotted studies, and the order is corresponding to the 'order_index'.

Author(s)

Lanying Zhang and Yongshuai Jiang <jiangyongshuai@gmail.com>

See Also

meta.MCPerm, meta.TradPerm, chisq.MCPerm, chisq.TradPerm, VS.Hist, VS.KS, VS.Genotype.Hist, VS.Allele.Hist, PermMeta.LnOR.Hist, PermMeta.LnOR.CDC, PermMeta.Hist, PermMeta.boxplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
## import data
# data(MetaGenotypeCount)
## delete first line
# temp=MetaGenotypeCount[-1,];
# result=meta.MCPerm(case_11=as.numeric(temp[,14]),case_12=as.numeric(temp[,16]),
	 # case_22=as.numeric(temp[,18]),control_11=as.numeric(temp[,15]),
	 # control_12=as.numeric(temp[,17]),control_22=as.numeric(temp[,19]),
	 # model="allele",fixed_method="MH",random_method="DL",repeatNum=1000)
## set working directory to save the plots.
# setwd("D:\")
# pdf("PermMeta.LnOR.boxplot.pdf",height=6,width=9)
# par(mfrow=c(2,3))
# PermMeta.LnOR.boxplot(result,plot="LnOR",plot_study="all",order="no")
# PermMeta.LnOR.boxplot(result,plot="LnOR",plot_study="all",order="LnOR",
    # main="LnOR, order by LnOR")
# PermMeta.LnOR.boxplot(result,plot="LnOR",plot_study="all",order="LnOR_VAR",
    # main="LnOR, order by LnOR_VAR")
# PermMeta.LnOR.boxplot(result,plot="LnOR",plot_study="all",order="VAR_LnOR",
    # main="LnOR, order by VAR_LnOR")
# PermMeta.LnOR.boxplot(result,plot="LnOR",plot_study="all",order="sample",
    # main="LnOR, order by sample")

# PermMeta.LnOR.boxplot(result,plot="LnOR_VAR",plot_study=c(1,4,14,12),order="no",
    # main="LnOR_VAR, no order")
# PermMeta.LnOR.boxplot(result,plot="LnOR_VAR",plot_study=c(1,4,14,12),order="LnOR",
    # main="LnOR_VAR, order by LnOR")
# PermMeta.LnOR.boxplot(result,plot="LnOR_VAR",plot_study=c(1,4,14,12),order="LnOR_VAR",
    # main="LnOR_VAR, order by LnOR_VAR")
# PermMeta.LnOR.boxplot(result,plot="LnOR_VAR",plot_study=c(1,4,14,12),order="VAR_LnOR",
    # main="LnOR_VAR, order by VAR_LnOR")
# PermMeta.LnOR.boxplot(result,plot="LnOR_VAR",plot_study=c(1,4,14,12),order="sample",
    # main="LnOR_VAR, order by sample")
# dev.off()

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.