timcdlucas / INLAutils

R package providing utilities for INLA
Other
26 stars 10 forks source link

Some errors #23

Closed timcdlucas closed 7 years ago

timcdlucas commented 8 years ago

library(INLA) library(INLAutils)

data <- data.frame(y = rpois(100, 10), x1 = rnorm(100))

data$x2 <- sin(data$y / 2) + rnorm(100, sd = 0.1)

ggplot(data, aes(y, x2)) + geom_point()

model <- inla(y ~ x1 + x2, data = data, family = 'poisson')

autoplot(model)

timcdlucas commented 8 years ago

which = c(1, 2) errors.

Should plot 1 and give warning about 2.