View source: R/Pval_perm_edge.R
pval.perm.corr | R Documentation |
This function calculate P values in multiple testing to check associations among any two variables(nodes) in case control studies (biological network) by comparing observed Pearson's correlations with those in permutated samples through nonparametric permutation tests.
pval.perm.corr(dat, nsim, MatchId = NULL, do.parallel = FALSE,
no_cores = NULL)
dat |
The observations of p variables in (matched) case control studies in matrix or dataframe format. The names of the variables must be specified. |
nsim |
The number of permutations for observations for each variable in the dataset-dat, nsim set to a large number such as 10000 |
MatchId |
A vector representing matched id for cases and controls. If the study doesn't have matching, then set to NULL, if matched studies, MatchId can't contain any missing values |
do.parallel |
Indicator variable(T-TRUE/F-FALSE) whether useing parallel computing with default value-F,not using parallel computing |
no_cores |
The number of computing units(cores) for parallel computing with default value-NULL when do.parallel=F,must specify the number is do.parallel=T, if PC or laptop can use the value-detectCores() - 1 or smaller |
A vector of p-values for Pearson's correlations between any two variables, with corresponding edge names connecting with '_'
dat1<-matrix(rnorm(4000),ncol=40,nrow=100)
colnames(dat1)<-paste("Var", as.character(1:40),sep="")
pval.edge<-pval.perm.corr(dat1,nsim=1000,MatchId=NULL,do.parallel=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.