# How to model count data with decay

Cross Validated Asked by Learning stats by example on October 15, 2020

I’m trying to understand how I might model count data where there’s diminishing marginal utility and a stochastic process.

So, let’s say we’re modeling the number of “useful intelligence tips” given to us by Russian agents dependent on how many shots of vodka we give them. I want to show that past a certain point, the number of useful tips starts to decay.

The way I’d think of this is by making the rate parameter lambda dynamic by time t.

So at time t = 1 we might say we get rpois(1,10) pieces of intel n. Poisson distributed n pieces of intel, with mean 10.

But let’s say we start to see decay so that by time t = 100 only 2 pieces of intel are returned. We can model time t = 100 with rpois(1,100).

My thinking on this is we build a vector so that lambda is dynamic and varies at each point t:

lambda_t[t] = t * rexp(1, rate = z).

We then just need to solve for z.

for (1:t) Y[t] ~ rpois(1, lambda_t[t]);

Does this approach make sense? I’ve written in pseudo-code using a bit of stan syntax and R syntax as I imagine I’ll mix the two. But I really am curious how count data is generally modeled when the counts vary over t.

## Related Questions

### When to test For Equality of Medians, and when Stochastic Equality?

1  Asked on November 2, 2021 by julian-karch

### Why is it OK to model demographics as random effects in bayesian multilevel models?

4  Asked on November 2, 2021 by graham-wright

### Reading multilevel model syntax in intuitive ways in R (lme4)

1  Asked on November 2, 2021 by rnorouzian

### Proof Law of Iterated Expectations

1  Asked on November 2, 2021 by juan-bromas

### Interpret Negative-Binomial mixed-model output in R

1  Asked on November 2, 2021 by user553480

### Choosing between Ordinal logistic Regression and Multiple linear regression

2  Asked on November 2, 2021 by kabindra-shahi

### Does a significant interaction necessarily implies that at least one of the simple effects will be significant?

1  Asked on November 2, 2021

### proof of Cramer-Rao lower bound

0  Asked on November 2, 2021 by manav

### Modeling binomial outcomes with repeated measures

1  Asked on November 2, 2021 by mkn1

### How would econometricians answer the objections and recommendations raised by Chen and Pearl (2013)?

2  Asked on November 2, 2021 by colorstatistics

### Can I use different data types in a general linear mixed effects model?

1  Asked on November 2, 2021 by nickb

### What is a rigorous, mathematical way to obtain the shortest confidence interval given a confidence level?

4  Asked on November 2, 2021

### How to calculate test error

1  Asked on November 2, 2021

### Paired vs independent t-test for A/B test with underlying trends

2  Asked on November 2, 2021 by bigyan

### Are all Machine Learning algorithms divided into Classification and Regression, not just supervised learning?

4  Asked on November 2, 2021 by soulduck

### Multivariate time series forecasting with trend and seasonality

0  Asked on November 2, 2021 by anish-raina

### On the difference between the main effect in a one-factor and a two-factor regression

2  Asked on November 2, 2021 by arnaud-mortier

### Is there a joint test of model coefficients, effectively testing for main and interaction effects in quantile linear mixed model?

0  Asked on November 2, 2021 by katikarnata

### Linear trend with time-series does not fit the data perfectly. Is that OK?

2  Asked on November 2, 2021