freq <- glm(nclaims ~ bm + zip, weights = power, family = poisson(),
data = MTPL)
zip_df <- data.frame(zip = c(0,1,2,3), zip_rst = c(0.8, 0.9, 1, 1.2))
freq |>
restrict_coef(restrictions = zip_df) |>
autoplot()
Run the code above in your browser using DataLab