PermMeta.Hist: histplot for the result of 'meta.MCPerm' or 'meta.TradPerm'

Description Usage Arguments Details Author(s) See Also Examples

View source: R/PermMeta.Hist.R

Description

histplot for the result of 'meta.MCPerm' or 'meta.TradPerm'.

Usage

1
2
3
PermMeta.Hist(PermMeta, plot = "Qp", fill_col = NULL, border_col = "black", 
    arrows_col = "red", main = "Hist plot for heterogeneity Q p_vlaue", 
	 xlab = "Q p_value", ylab = "Density", digits = 3)

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 "Qp"(default), "I2", "merged_LnOR", "merged_LnOR_VAR" or "merged_LnOR_p". And the value must be simulation data. 'Qp', "I2", "merged_LnOR", "merged_LnOR_VAR" and "merged_LnOR_p" separetly plots the return value 'perm_Qp', 'perm_I2', 'perm_merged_LnOR', 'perm_merged_VARLnOR', 'perm_merged_p'.

fill_col

the filled color(default NULL) for the body of histplot.

border_col

the color(default 'black') for the border of histplot.

arrows_col

the color(default 'red') of arrows which mark the place of the observed value.

main

the main title (on top), default value is "Hist plot for heterogeneity Q p_vlaue".

xlab,ylab

X axis label, default value is 'Q p_value'. Y axis label, default value is 'Density'.

digits

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

Details

Histplot for the return value('perm_Qp','perm_I2','perm_merged_LnOR','perm_merged_VARLnOR', 'perm_merged_p') of 'meta.MCPerm' or 'meta.TradPerm'. And through arrows and legend to mark the observed value.

The symbols in the legend: 'Q_stat' is the Q statistic for meta data heterogeneity; 'Q_p' is the p value of Q value(chi square distribution,the number of studies in meta analysis minus one is degree of freedom of Q value.); 'p.corrected' is the corrected p value by permutation; 'I2_stat' is the statistic I2(calculated by formula max(Q-d.f./Q, 0)) for meta data heterogeneity; 'merged_LnOR' is the merged log odd ratio of observed data; 'merged_LnOR_VAR' is the variance of log odd ratio for observed data; 'merged_LnOR_p' is the p value of log odd ratio of observed data which obey normal distribution.

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

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.LnOR.boxplot, PermMeta.LnOR.qqnorm, 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
## 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.Hist.pdf",height=6,width=6)
# PermMeta.Hist(result,plot="Qp",fill_col=NULL,border_col='black',
    # arrows_col='red',main="Hist plot for heterogeneity Q p_vlaue",xlab="Q p_value")
# PermMeta.Hist(result,plot="I2",fill_col=NULL,border_col='black',
    # arrows_col='red',main="Hist plot for heterogeneity I2",xlab="I2")
# PermMeta.Hist(result,plot="merged_LnOR",fill_col=NULL,border_col='black',
    # arrows_col='red',main="Hist plot for merged_LnOR",xlab="merged_LnOR")
# PermMeta.Hist(result,plot="merged_LnOR_VAR",fill_col=NULL,border_col='black',
    # arrows_col='red',main="Hist plot for merged_LnOR_VAR",xlab="merged_LnOR_Variance")
# PermMeta.Hist(result,plot="merged_LnOR_p",fill_col=NULL,border_col='black',
    # arrows_col='red',main="Hist plot for merged_LnOR_p",xlab="merged_LnOR_p.value")
# dev.off()

MCPerm documentation built on May 29, 2017, 11:27 a.m.