Hi there dear R users,

By using the code below that plots two distributions and calculates a bootstrap 
hypothesis test of equality, similarity of these two distributions was 
calculated. What I'm interested now is to find out a size of the area where 
both distributions are overlapping. I know that mathematically this should be 
done with integrals but have no idea how to do it the most efficiently with R. 
Any help will be greatly appreciated! Best regards, Ana

library(sm)
data <- rnorm(40,0,1)#provides data
rang <- sample(1:2,40, replace=TRUE,prob=c(.3,.7))#provides how data should 
be separated (1 - distribution one and 2 - distribution two)
sm.density.compare(data,rang,model="equal", nboots=1000)
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to