a reasonable answer can be extracted from a given body
of data.
~ John Tukey
-Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] Namens Michael Friendly
Verzonden: donderdag 17 april 2014 4:03
Aan: R-help
Onderwerp: [R] ggplot2: using coord_trans
onden: donderdag 17 april 2014 4:03
Aan: R-help
Onderwerp: [R] ggplot2: using coord_trans for logit -> probability
I'm trying to see if & how I can use coord_trans() with ggplot2 to transform the Y axis
of a plot on the logit scale to the probability scale, as opposed to recalculating
Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Namens
Michael Friendly
Verzonden: donderdag 17 april 2014 4:03
Aan: R-help
Onderwerp: [R] ggplot2: using coord_trans for logit -> probability
I'm trying to see if & how I can use
Sorry I jumped the gun. That does not provide you with the same plot as gg2
that you are aiming for.
-T
On Wed, Apr 16, 2014 at 7:37 PM, Tim Marcella wrote:
> I think all you have to do is add type="response" to your call for the
> predictions.
>
> Does this work for you
>
> # get fitted value
I think all you have to do is add type="response" to your call for the
predictions.
Does this work for you
# get fitted values on the logit scale
pred <- data.frame(Arthritis,
predict(arth.logistic, se.fit=TRUE,type="response"))
library(ggplot2)
library(scales)
# plot on logit
I'm trying to see if & how I can use coord_trans() with ggplot2 to
transform the
Y axis of a plot on the logit scale to the probability scale, as opposed
to recalculating
everything "manually" and constructing a new plot.
Here is a simple example of the 'base' plot I'd like to transform:
data(
6 matches
Mail list logo