pearson_scatter: scatter plot and calculate Pearson correlation coefficient...

Description Usage Arguments Details Author(s) See Also Examples

View source: R/pearson_scatter.R

Description

scatter plot and calculate Pearson correlation coefficient for paired data.

Usage

1
2
pearson_scatter(Trad_data, MC_data, scatter_col = "gray28", line_col = "black", 
    title = NULL, xlab = "TradPerm P-value", ylab = "MCPerm P-value")

Arguments

Trad_data

numeric vector, e.g. the result('perm_Qp'/'perm_I2'/'perm_p') of function 'meta.TradPerm'.

MC_data

numeric vector, e.g. the result('perm_Qp'/'perm_I2'/'perm_p') of function 'meta.MCPerm'.

scatter_col

the color(default 'gray28') of the scatter points.

line_col

the color(default 'black') of the line x=y.

title

The main title (on top).

xlab,ylab

X axis label, default value is 'TradPerm P-value'. Y axis label, default value is 'MCPerm P-value'.

Details

Scatter plot and Pearson correlation coefficient(two.sided) for 'perm_Qp'/'perm_I2'/'perm_p' of 'meta.TradPerm' and 'meta.MCPerm' are to test the consistency between them.

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.Hist, PermMeta.boxplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Trad=read.table("Trad_result.txt",sep=" ",header=FALSE)
# MC=read.table("MC_result.txt",sep=" ",header=FALSE)
# par(mfrow=c(3,1))
# pearson_scatter(as.numeric(Trad[,4]),as.numeric(MC[,4]),
    # title="Q p_value ",
    # xlab="TradPerm Qp_value",
    # ylab="MCPerm Qp_value")
# pearson_scatter(as.numeric(Trad[,6]),as.numeric(MC[,6]),
    # title="I2 p_value",
    # xlab="TradPerm I2p_value",
    # ylab="MCPerm I2p_value")	 
# pearson_scatter(as.numeric(Trad[,9]),as.numeric(MC[,9]),
    # title="p_value",
    # xlab="TradPerm p_value",
    # ylab="MCPerm p_value")

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