[R] Separating out data values
Hadley Wickham
hadley at rice.edu
Sun Jul 4 22:20:49 CEST 2010
Hi Mark,
Try this to get you started:
table(roe1 > median(roe1), roe0 > median(roe0))
Hadley
On Sun, Jul 4, 2010 at 6:29 AM, Mark Carter <mcturra2000 at yahoo.co.uk> wrote:
> I'm not very good at statistics, but I know enough to be dangerous. I'm completely new to R, having just discovered it yesterday. Now that the introductions are out of the way ...
>
> I have a table with three columns, only two of which are relevant to the discussion: roe0 and roe1. Plotting roe0 against roe1 shows that there is a convincing correlation between them, and is confirmed by the correlation coefficient. So far, so good. What I'd like to do is answer the question: what is the probability that roe1 is above the median (of roe1) given that roe0 is above the median (of roe0). Is there a simple way of doing this in R?
>
>
>
>
>
> ______________________________________________
> R-help at 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.
>
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
More information about the R-help
mailing list