for \(0<\theta_{j}<1\), \(x_{j}\geq 0\), and \(\sum_{j=1}^{d}x_{j}=N\), where \(\theta_{1},...,\theta_{d}\) are cell probabilities and \(N\) is the size.
# NOT RUN {theta.vec=c(0.3,0.3,0.25,0.15) ; N=4mydata=draw.multinomial(no.row=1e5,d=4,theta=c(0.3,0.3,0.25,0.15),N=4)
apply(mydata,2,mean)-N*theta.vec
# }