Dear all, I have 2 data sets (A and B) with normal distributions. When I plot them together, they overlay/share one part of plot. I want to extract from each A and B that shared area. Actually I want to sum A+B and then to compare the result with the individual shared area of A and B to know how much (in %) each one represents. (Am I clear?) The folowing codes do not represent exactly my data, however the final result (plot) is very similar to what I get in the end with my data. I can provide my original data if necessary. A<-seq(-4,4,.01) B<-seq(-4,4,.01) densities<-dnorm(A, 0,1) densities2<-dnorm(B, 0,1) plot(A,densities, type="l", col="red") lines(B+2,densities2, type="l") I am very grateful for any support, help, advise and etc ... :) best wishes Jackson -- Jackson M. Rodrigues Department of Palynology and Climate Dynamics Albrecht-von-Haller-Institute for Plant Sciences Georg-August-University G?ttingen Untere Karspuele 2 37073 G?ttingen/Germany Tel.: 0049 (0) 176 8186 4994 *"In order to succeed, we must first believe that we can."* *Nikos Kazantzakis* [[alternative HTML version deleted]]
Viechtbauer Wolfgang (STAT)
2015-Oct-31 17:29 UTC
[R] How to calculate the shared area of 2 plots?
Something like this?
http://stats.stackexchange.com/questions/12209/percentage-of-overlapping-regions-of-two-normal-distributions
Best,
Wolfgang
--
Wolfgang Viechtbauer, Ph.D., Statistician | Department of Psychiatry and
Neuropsychology | Maastricht University | P.O. Box 616 (VIJV1) | 6200 MD
Maastricht, The Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com
________________________________________
From: R-help [r-help-bounces at r-project.org] On Behalf Of Jackson Rodrigues
[jacksonmrodrigues at gmail.com]
Sent: Saturday, October 31, 2015 5:18 PM
To: r-help at r-project.org
Subject: [R] How to calculate the shared area of 2 plots?
Dear all,
I have 2 data sets (A and B) with normal distributions. When I plot them
together, they overlay/share one part of plot.
I want to extract from each A and B that shared area.
Actually I want to sum A+B and then to compare the result with the
individual shared area of A and B to know how much (in %) each one
represents. (Am I clear?)
The folowing codes do not represent exactly my data, however the final
result (plot) is very similar to what I get in the end with my data.
I can provide my original data if necessary.
A<-seq(-4,4,.01)
B<-seq(-4,4,.01)
densities<-dnorm(A, 0,1)
densities2<-dnorm(B, 0,1)
plot(A,densities, type="l", col="red")
lines(B+2,densities2, type="l")
I am very grateful for any support, help, advise and etc ... :)
best wishes
Jackson
--
Jackson M. Rodrigues
Department of Palynology and Climate Dynamics
Albrecht-von-Haller-Institute for Plant Sciences
Georg-August-University G?ttingen
Untere Karspuele 2
37073 G?ttingen/Germany
Tel.: 0049 (0) 176 8186 4994
*"In order to succeed, we must first believe that we can."*
*Nikos Kazantzakis*
[[alternative HTML version deleted]]
______________________________________________
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.