```
# NOT RUN {
gdata <- data.frame(x2 = runif(nn <- 500))
gdata <- transform(gdata, y1 = rgenpois2(nn, mean = exp(2 + x2),
loglink(-1, inverse = TRUE)))
gfit2 <- vglm(y1 ~ x2, genpoisson2, data = gdata, trace = TRUE)
coef(gfit2, matrix = TRUE)
summary(gfit2)
# }
```

Run the code above in your browser using DataCamp Workspace