[R] Direction and scaling of cumulative distribution in ecdfplot

Jeff Stevens stev0175 at googlemail.com
Sun Mar 14 20:10:16 CET 2010


I have two questions regarding the ecdfplot function in the
latticeExtra package.

1. How can I plot the fraction of values >= x rather than <=x, like
the what = "1-F" argument in the Ecdf function in the Hmisc package?

2. When I try to log-transform the y-axis, I get a warning that it
can't have log Y-scale, and it fails to scale properly:
How can I log-transform the y-axis in ecdfplot?  Here is a test
example of my analysis in R version 2.10.1 in Ubuntu 9.10:
> resp <- c(0.23, 0.09, 0.05, 0.02, 0.38, 1, 0.04, 0.01, 0.17, 0.04, 0.01, 0.17, 0.5)
> id <- c(rep(1, 5), rep(2, 4), rep(3, 4))
> testdata <- data.frame(id, resp)
> ecdfplot(~resp | id, data = testdata, scales = list(x = list(relation = "free", log = TRUE),y = list(log = TRUE)), type = "p")
Warning message:
In densityplot.formula(x = ~resp | id, data = list(id = c(1, 1,  :
  Can't have log Y-scale


Many thanks,
Jeff

--
Jeff Stevens
Research Scientist
Center for Adaptive Behavior and Cognition
Max Planck Institute for Human Development
Lentzealle 94
14195 Berlin, Germany



More information about the R-help mailing list