Re: [R] p value for joint probability

2011-02-01 Thread Petr Savicky
On Mon, Jan 31, 2011 at 09:42:27PM +0100, moleps wrote: Dear all, Given rr-data.frame(r1-rnorm(1000,10,5),r2-rnorm(1000,220,5)) Hello. There is already an answer to your question. However, i think that the above command works in a different way than you expect. The embedded assignments

Re: [R] p value for joint probability

2011-02-01 Thread moleps
My terminology is probably way off. I´ll try again in plain english. I´d like to generate a scatter plot of r1 r2 and color code each pair according to the probability of observing the pair given that the two samples (r1 r2) are drawn from two independent normal distributions.

Re: [R] p value for joint probability

2011-02-01 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of moleps Sent: Tuesday, February 01, 2011 11:32 AM To: Peter Ehlers Cc: r-help@r-project.org Subject: Re: [R] p value for joint probability My terminology is probably way off

Re: [R] p value for joint probability

2011-02-01 Thread Mike Marchywka
Date: Tue, 1 Feb 2011 12:10:31 -0800 From: nord...@dshs.wa.gov To: r-help@r-project.org Subject: Re: [R] p value for joint probability -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of moleps Sent: Tuesday

Re: [R] p value for joint probability

2011-02-01 Thread David Winsemius
On Feb 1, 2011, at 2:31 PM, moleps wrote: My terminology is probably way off. I´ll try again in plain english. I´d like to generate a scatter plot of r1 r2 and color code each pair according to the probability of observing the pair given that the two samples (r1 r2) are drawn from two

Re: [R] p value for joint probability

2011-02-01 Thread Petr Savicky
On Tue, Feb 01, 2011 at 08:31:57PM +0100, moleps wrote: My terminology is probably way off. I´ll try again in plain english. I´d like to generate a scatter plot of r1 r2 and color code each pair according to the probability of observing the pair given that the two samples (r1 r2) are

Re: [R] p value for joint probability

2011-02-01 Thread moleps
Allright.. Appreciate the input on non-zero terminology (:-). What I wanted was: rr-data.frame(r1=rnorm(1000,10,5),r2=rnorm(1000,220,5)) with(rr,plot(r1,r2)) r3-kde2d(r1,r2,lims=c(2,18,200,240)) filled.contour(r3) //M On 1. feb. 2011, at 21.26, David Winsemius wrote: On Feb 1, 2011, at

[R] p value for joint probability

2011-01-31 Thread moleps
Dear all, Given rr-data.frame(r1-rnorm(1000,10,5),r2-rnorm(1000,220,5)) How can I add a column (rr$p) for the joint probability of each r1 r2 pair? I know how to add the column.. I just dont know how to compute the p value for joint probabilities given the two samples. //M

Re: [R] p value for joint probability

2011-01-31 Thread Peter Ehlers
On 2011-01-31 12:42, moleps wrote: Dear all, Given rr-data.frame(r1-rnorm(1000,10,5),r2-rnorm(1000,220,5)) How can I add a column (rr$p) for the joint probability of each r1 r2 pair? If you take the values in each pair to be observations from two independent Normal distributions, it's