simulated data of Poisson Distribution? I was developing a set of simulated data of the following properties.
def <- defData(def, varname = "GT", dist = "poisson", formula = "0.14 * BB", link = "log")
I was expecting if my BB value if 50.214891, the GT will be e^(0.14*50.214891)=1096.63 but the outcome is shown as 1081. I am wondering what am I missing

 A: Poisson observations must be non-negative integers, so you should not ever observe a value like $1096.63$.
That $1096.63$ is the parameter of the conditional Poisson distribution predicted by your regression equation. Then you draw a value from that $\text{Poisson}(1096.63)$ distribution, which happens to be $1081$.
This goes into something similar for a logistic regression. The logistic regression predicts a probability (the parameter of the binomial distribution, analogous to the $1096.63$ parameter of your Poisson), but the observations are categorical: either $0$ or $1$ (analogous to your observed/simulated $1081$). For you, the Poisson link is the natural logarithm, so the inverse link is the $\exp$ function. Adapted to Poisson...
set.seed(2021)
x1 = rnorm(1000)           # some continuous variables 
x2 = rnorm(1000)
z = 1 + 2*x1 + 3*x2        # linear combination with a bias (so your model)
lambda = exp(z)            # pass through an inverse link function
y = rpois(1000,lambda)     # Poisson response variable

