INAR with negative binomial thinning

How can I simulate an INAR model with the negative binomial thinning operator?