простая визуализация модели GAM в R - PullRequest
0 голосов
/ 27 ноября 2018

Я использую это:

library(datasets)
library(ggplot2)

model <- gam(
    Petal.Width ~

    s(Sepal.Length)

    , data = iris
    , method = "REML"
)

ggplot(iris, aes(x = Petal.Width, y = Sepal.Length)) +
geom_point() +
geom_smooth(method = "gam", formula = Petal.Width ~ s(Sepal.Length))

, но получите эту ошибку:

Warning message:
Computation failed in `stat_smooth()`:
object 'Petal.Width' not found 

Есть идеи?Спасибо!

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...