Q.TradPerm: Correct p.value for Heterogeneity statistics Q in meta...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/Q.TradPerm.R

Description

Correct p.value for Heterogeneity statistics Q in meta analysis by TradPerm method.

Usage

1
2
Q.TradPerm(genotypeData, affectionData, split, sep, naString, model = "allele", 
    method = "MH", repeatNum = 1000)

Arguments

genotypeData

a matrix with one column and multiple rows, each row contains genotype data for case and control samples of certain study. Note the field separtor of each line must be same, and same with parameter 'affectionData'.

affectionData

a matrix with one column and multiple rows, each row contains the affection stats of case and control samples of certain study which must correspond to 'genotypeData'. Note the field separtor of each line must be same,and same with parameter 'genotypeData'.

split

the field separator character, which separates elements on each line of the parameter 'genotypeData' and 'affectionData'. 'Split' and 'sep' cannot be same.

sep

character separator used to divide genotype between alleles "Allele1<sep>Allele2" in parameter 'genotypeData'. 'Split' and 'sep' cannot be same.

naString

a character string for NA values of genotype data in parameter 'genotypeData'.

model

a character string indicating the type of model("allele","dominant" or "recessive") supplied to the data. The risk allele(see details) is marked as allele1. The allele model indicates allele1 versus allele2, the dominant model indicates <allele1/allele1> + <allele1/allele2> versus <allele2/allele2>, the recessive model indicates <allele1/allele1> versus <allele1/allele2> + <allele2/allele2>. Default value is 'allele'.

method

a character string indicating the method('Inverse','MH' or 'Peto') to calculate Q value. Default value is 'MH'. See details.

repeatNum

an integer specifying the number of replicates used in the Monte Carlo permutation. Default value is 1000.

Details

Allele 1 and allele 2 to each study have OR values. The risk allele is the allele which the number of studies which OR>1 more than half of the number of all studies.

Q value fit chi square distribution,the number of studies in meta analysis minus one is degree of freedom of Q value.

TradPerm details see chisq.TradPerm.

Value

risk_allele

the symbol of risk allele.See details.

Q

the Q statistics for observed meta data.

Qp

the p value for Q,See details.

corrected_Qp

the percentage of less than Qp value in simulative Qp values.

Note

'Split':the field separtor of each line for parameter 'genotypeData' and 'affectionData' must be same. 'Split' and 'sep' cannot be same.

Author(s)

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

References

Julian P.T.Higgins, Simon G.Thompson(Statistics in Medicine,2002): Quantifying heterogeneity in a meta-analysis.

Julian P.T.Higgins, Simon G.Thompson, Jonathan J Deeks(BMJ,2003):Measuring inconsistency in meta-analyses.

See Also

meta.MCPerm, meta.TradPerm, Q.MCPerm, I2.TradPerm, I2.MCPerm, chisq.MCPerm, chisq.TradPerm, VS.Hist, VS.KS, VS.Allele.Hist, VS.Genotype.Hist, PermMeta.LnOR.Hist, PermMeta.Hist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## import data
# data(MetaGenotypeData)
## delete first line which contains the names of each column
# temp=MetaGenotypeData[-1,];
# rowNum=nrow(temp)
# gen=matrix(0,nrow=rowNum,ncol=1);
# aff=matrix(0,nrow=rowNum,ncol=1);
# for(j in 1:rowNum){
	 # gen[j,]=paste(temp[j,14],temp[j,15],sep=" ");
	 # case_num=length(unlist(strsplit(temp[j,14],split=" ")));
	 # control_num=length(unlist(strsplit(temp[j,15],split=" ")));
	 # case_aff=paste(rep(2,case_num),collapse=" ");
	 # control_aff=paste(rep(1,control_num),collapse=" ");
	 # aff[j,]=paste(case_aff,control_aff,sep=" ");
# }
# result=Q.TradPerm(gen,aff,split=" ",sep="/",naString="-",
    # model="allele",method="MH",repeatNum=1000) 
# result

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