Type: Package
Date: 2015-12-23
Title: Calculate MeDiA_K Distance
Version: 1.0
Author: Zizhuo Ren, Hesen Peng, Tianwei Yu
Maintainer: Zizhuo Ren<zizhuoren@gmail.com>
Description: Calculates MeDiA_K (means Mean Distance Association by K-nearest neighbor) in order to detect nonlinear associations.
License: GPL-2 | GPL-3 [expanded from: GPL]
LazyData: TRUE
Imports: Rcpp (≥ 0.11.3)
LinkingTo: Rcpp, RcppEigen
Packaged: 2015-12-24 09:33:04 UTC; renzizhuo
NeedsCompilation: yes
Repository: CRAN
Date/Publication: 2015-12-24 13:46:16

functions to calculate pvalue

Description

This function is created to calculate p values about MeDiA_k

Usage


Media_pvalue(iTest,jTest,times,selectvec)

Arguments

iTest

a numeric matrix

jTest

a numeric matrix which has the same rows as iTest

selectvec

an integer vector which contains a series of K values you want to get

times

an integer indicates permutation times

Value

Media_pvalue(iTest,jTest,times,selectvec) return a numeric vectors contains p values based on the selectvec(K value you want to select)

Examples


iTest <- matrix(rnorm(1000),100)
jTest<- matrix(rnorm(200),100)
times<- 100
selectvec <- c(1:10)
Media_pvalue(iTest,jTest,times,selectvec)



Set of functions in example RcppEigen package

Description

These two functions are created to calculate different values about MeDiA_k

Usage


dis_value(iTest,jTest,select)
permute(iTest,jTest,times,selectvec)

Arguments

iTest

a numeric matrix

jTest

a numeric matrix which has the same rows as iTest

select

an integer which means get k values you want to get

selectvec

an integer vector which contains a series of K values you want to get

times

an integer indicates permutation times

Value

dis_val(iTest,jTest,select) returns a distance permute(iTest,jTest,times,selectvec) return a list contains mean and sd values based on the selectvec(K value you want to select)

Examples


iTest <- matrix(rnorm(1000),100)
jTest<- matrix(rnorm(200),100)
select<- 5
times<- 100
selectvec <- c(1:10)
dis_value(iTest,jTest,select)
permute(iTest,jTest,times,selectvec)