On 11/11/20 2:11 PM, Marcelo Laia wrote:
Hi,
I am running these approaches:
Model 1
ggplot( dat , aes(x=DAP, y=Altura, color=as.factor(Espacamento) )) +
geom_point(size=0.5) +
stat_smooth(method = "lm",
formula = y ~ x + I(x^2), size = 1) +
facet_grid(Espacame
Hi Rui,
You are very welcome!
On 11/11/20 at 11:10, Rui Barradas wrote:
>
> dput(head(dat, 20))
>
structure(list(Bloco = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), Espacamento = c("3 x 1",
"3 x 1", "3 x 1", "3 x 1", "3 x 1", "3 x 1", "3 x 1", "3 x 1",
Hello,
Try removing I() from I(log(y)). But it's hard to say without a
reproducible example, please post the output of
dput(dat)
or, if dat is big, the output of
dput(head(dat, 20))
Hope this helps,
Rui Barradas
Às 22:11 de 11/11/20, Marcelo Laia escreveu:
Hi,
I am running these approa
help@r-project.org"
Subject: Re: [R] ggplot2 stat_smooth
>
>> On Jun 29, 2016, at 2:17 PM, Nathan Pace wrote:
>>
>> I want to add a logistic plot to data.
>>
>> My call to ggplot is:
>>
>>
>> ggplot(data = SSI.dt, aes(x = elapsed,
> On Jun 29, 2016, at 2:17 PM, Nathan Pace wrote:
>
> I want to add a logistic plot to data.
>
> My call to ggplot is:
>
>
> ggplot(data = SSI.dt, aes(x = elapsed, y = 1 - control)) + geom_point() +
> stat_smooth(method = 'glm', family = binomial) +
> xlab('Surgery Duration (min)') + ylab('Pr
,
Thierry
Van: Michael Friendly [frien...@yorku.ca]
Verzonden: dinsdag 17 december 2013 19:42
Aan: ONKELINX, Thierry; R-help
Onderwerp: Re: [R] ggplot2: stat_smooth for family=binomial with cbind(Y,
N) formula
Thanks very much for this helpful reply, Thierry
Using aes(wei
Thanks very much for this helpful reply, Thierry
Using aes(weight=trials) in stat_smooth() was part of what I was missing
and solves my main
question.
However, for this data, I want to show the extrapolated prediction over
a wider range than in
the data. Adding xlim() doesn't help here-- the
Dear Michael,
Calculate the propotions. Then it is easy to use the weight option of glm
data("SpaceShuttle", package="vcd")
SpaceShuttle$trials <- 6
fm <- glm(cbind(nFailures, 6 - nFailures) ~ Temperature, data = SpaceShuttle,
family = binomial)
fm2 <- glm(nFailures/trials ~ Temperature, data =
8 matches
Mail list logo