Skip to main content
added 1 character in body; edited tags
Source Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663

I was wondering how you would generate data from a Poisson regression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors $X_1$ and $X_2$ which are distributed $N(0,1)$. And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

$$\log(Y) = 0+ 1\cdot X_1 + 1\cdot X_2$$

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson regression samples that would be awesome!

Thanks!

I was wondering how you would generate data from a Poisson regression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors $X_1$ and $X_2$ which are distributed $N(0,1)$. And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

$$\log(Y) = 0+ 1\cdot X_1 + 1\cdot X_2$$

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson regression samples that would be awesome!

Thanks!

I was wondering how you would generate data from a Poisson regression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors $X_1$ and $X_2$ which are distributed $N(0,1)$. And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

$$\log(Y) = 0+ 1\cdot X_1 + 1\cdot X_2$$

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson regression samples that would be awesome!

added 25 characters in body; edited title
Source Link
user88
user88

Generate data samples from Poisson Regressionregression

I was wondering how you would generate data from a Poisson Regressionregression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors X1$X_1$ and X2$X_2$ which are distributed N(0,1)$N(0,1)$. And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

log(Y) = 0+ 1X1 + 1X2$$\log(Y) = 0+ 1\cdot X_1 + 1\cdot X_2$$

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson Regressionregression samples that would be awesome!

Thanks!

Generate data samples from Poisson Regression

I was wondering how you would generate data from a Poisson Regression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors X1 and X2 which are distributed N(0,1). And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

log(Y) = 0+ 1X1 + 1X2

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson Regression samples that would be awesome!

Thanks!

Generate data samples from Poisson regression

I was wondering how you would generate data from a Poisson regression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors $X_1$ and $X_2$ which are distributed $N(0,1)$. And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

$$\log(Y) = 0+ 1\cdot X_1 + 1\cdot X_2$$

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson regression samples that would be awesome!

Thanks!

Source Link
Michael
  • 2.5k
  • 4
  • 26
  • 34

Generate data samples from Poisson Regression

I was wondering how you would generate data from a Poisson Regression equation in R? I'm kind of confused how to approach the problem.

So if I assume we have two predictors X1 and X2 which are distributed N(0,1). And the intercept is 0 and both of the coefficients equal 1. Then my estimate is simply:

log(Y) = 0+ 1X1 + 1X2

But once I have calculated log(Y) - how do I generate poisson counts based on that? What is the rate parameter for the Poisson distribution?

If anyone could write a brief R script that generates Poisson Regression samples that would be awesome!

Thanks!