Guest User

Untitled

a guest
Nov 10th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. # testing significance of brand 14[21]
  2. p_load(aod)
  3. s <- vcov(model_1)
  4. head(s)
  5. wald.test(b = coef(model_1), Sigma = s,Terms = 21)
  6. ## value obtained: phi 0.33. This level will be grouped with the standard insurance[1].
  7.  
  8. # Grouping Brand 1 (standar insurance) and 14
  9. baseFREQ$brandy = baseFREQ$brandx
  10. baseFREQ$brandy[baseFREQ$brandx %in% c("1","14")] = "1"
  11.  
  12. model_2 <-glm.nb(nclaims ~ zone_ + vehcut + agecut + as.factor(brandy) +
  13. fuel + offset(log(exposition)), data = baseFREQ)
  14. summary(model_2)
Add Comment
Please, Sign In to add comment