Closed timcdlucas closed 7 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)
which = c(1, 2) errors.
which = c(1, 2)
Should plot 1 and give warning about 2.
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)