if (FALSE) {
if (require("ggplot2", quietly = TRUE)) {
# Generate some data and fit a simple model
input.df <- data.frame(x = cos(1:10))
input.df <- within(input.df, y <- 5 + 2 * cos(1:10) + rnorm(10, mean = 0, sd = 0.1))
fit <- bru(y ~ x, family = "gaussian", data = input.df)
summary(fit)
# Plot the posterior of the model's x-effect
plot(fit, "x")
}
}
Run the code above in your browser using DataLab