# Any way to efficiently run Poisson regression thousands of times?

**URL:** <https://discourse.julialang.org/t/any-way-to-efficiently-run-poisson-regression-thousands-of-times/106727>\
**Category:** Finance and Economics\
**Tags:** regression, glm\
**Created:** [November 26, 2023, 1:46am UTC](https://discourse.julialang.org/t/any-way-to-efficiently-run-poisson-regression-thousands-of-times/106727 "2023-11-26T01:46:40Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![Dan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dan/32/42581_2.png) [@Dan](https://discourse.julialang.org/u/Dan)\
**Post date:** [December 2, 2023, 9:18pm UTC](https://discourse.julialang.org/t/any-way-to-efficiently-run-poisson-regression-thousands-of-times/106727/16 "2023-12-02T21:18:58Z")

</div>

It would be useful to also take this post as an opportunity to link to the related new question: [Nesting the GLM.jl in the objective function when formulating the ReverseDiff gradient generates StackOverflowError](https://discourse.julialang.org/t/nesting-the-glm-jl-in-the-objective-function-when-formulating-the-reversediff-gradient-generates-stackoverflowerror/107050)

That question is a better description for the end-goal as @mcreel suggested. Especially, it also has a clue (yes, it is a clue, because readers need to undo the transformations done to protect the ‘proprietary’ application), to the weights generation.

The weights in that question are all scalar multiples of each other, which essentially means `predict_data` in that question is independent of the `para[3]` scaling factor and only depends on `data[:,:w]`. It also means inference on `para[3]` is impossible (it’s statistically unidentifiable).

---

_[View the full topic](https://discourse.julialang.org/t/any-way-to-efficiently-run-poisson-regression-thousands-of-times/106727)._
