[R] Confidence intervals around the MIC (Maximal information coefficient)
Rui Barradas
ruipbarradas at sapo.pt
Sun Dec 10 16:34:07 CET 2017
Hello,
First of all, when I tried to use function mic I got an error.
mic(cbind(C, D))
Error in mic(cbind(C, D)) : could not find function "mic"
So I've changed your function myCor and all went well, with a warning
relative to BCa intervals.
myCor <- function(data, index){
mine(data[index, ])$MIC
}
results=boot(data = cbind(C,D), statistic = myCor, R = 2000)
boot.ci(results,type="all")
Hope this helps,
Rui Barradas
On 12/10/2017 3:19 PM, varin sacha via R-help wrote:
> Dear R-Experts,
>
> Here below is my R code (reproducible example) to calculate the confidence intervals around the spearman coefficient.
>
> ##########
> C=c(2,4,5,6,3,4,5,7,8,7,6,5,6,7,7,8,5,4,3,2)
> D=c(3,5,4,6,7,2,3,1,2,4,5,4,6,4,5,4,3,2,8,9)
> cor(C,D,method= "spearman")
> library(boot)
> myCor=function(data,index){
> cor(data[index, ])[1,2]
> }
> results=boot(data=cbind(C,D),statistic=myCor, R=2000)
> boot.ci(results,type="all")
> ##########
>
>
> Now, I would like to calculate the CIs around the MIC (Maximal information coefficient). The MIC can be calculated thanks to the library(minerva). I don’t get the CIs for the MIC, I don’t know how to change my R codes to get the CIs around the MIC. Any help would be highly appreciated :
>
> ##########
> library(minerva)
> mine(C,D)
> library(boot)
> myCor=function(data,index){
> mic(data[index, ])[1,2]
> }
> results=boot(data=cbind(C,D),statistic=myCor, R=2000)
> boot.ci(results,type="all")
> ##########
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list