716 questions
1 vote
3 answers
115 views
What does PoissonRegression.predict() actually return in sklearn?
What is being returned by PoissonRegression.predict() in sklearn when I am predicting target values from data? Is it the actual predicted value of the target?
Best practices
0 votes
3 replies
45 views
Poisson Regression with non-integer values
I have an outcome variable that is represented in days. However, this variable also includes half day values. So, for example, this variable is represented by 0, 0.5, 1.5, etc. The distribution itself ...
1 vote
0 answers
100 views
Issue with fepois when trying to run a poisson event study in R
I'm trying to use fepois to run a poisson event study in R. The results of the model are always one coefficient for my event time. > model_poisson <- fepois( + accident_count ~ i(...
2 votes
1 answer
91 views
issue in MLE of New Generalized Poisson lindley Distribution
I am working with the New Generalized Poisson Lindley (NGPL) distribution, which is a two-parameter discrete distribution defined by parameters α (alpha) and β (beta). I wrote an R function to ...
3 votes
0 answers
85 views
R Optimization Issue: Accurate Estimates for alpha1, alpha2, theta but beta1 and beta2 Estimates are Incorrect [closed]
I’m estimating parameters for the Lindley (BGPL) distribution with five parameters: alpha1, beta1, alpha2, beta2, and theta, using optim() in R for MLE. However, the MLE results are not accurate—...
-1 votes
1 answer
120 views
Comparing numpy versus scipy when sampling random values from a poisson distribution [closed]
I am generating random samples from both numpy and scipy for a Poisson distribution, but it appears that scipy never produces values of x=0. Scipy seems to be off by x=1, i.e., it is shifted to the ...
0 votes
0 answers
97 views
Why does PCL's Poisson reconstruction return the weird result?
I want to load a ply file like bunny and then do poisson reconstruction. And I use the following code to do it: #include <pcl/point_types.h> #include <pcl/point_cloud.h> #include <pcl/...
-1 votes
1 answer
69 views
How can we calculate mean absolute error (MAE) for zero-inflated Poisson regression and zero-inflated negative binomial regression?
I am trying to use Python to calculate mean absolute error (MAE) while doing zero-inflated Poisson regression and zero-inflated negative binomial regression. I separated data into training data and ...
3 votes
1 answer
331 views
Adding two-way fixed effects for zero inflated Poisson model
I am working with a zero inflated Poisson model. I am using the glmmTMB My outcome variable is the number of burglaries in all of Texas between 2000 and 2015. My unit of analysis are counties (county)....
0 votes
1 answer
437 views
R fixest: Main variables of interest are fixed effects in a huge data set
I am interested in estimating a Poisson fixed effects model with: where is the "age" of the observation. I am interested in the coefficients, not the other fixed effects. My first ...
0 votes
0 answers
52 views
Specify priors for only one parameter in INLA
I have the model: I1 <- inla(n ~ median + weight + length, control.predictor = list(compute = TRUE), quantiles = c(0.025, 0.975), control.compute=list(dic = TRUE, ...
1 vote
1 answer
450 views
Offsets in predict.glm(), given that the fitted poisson model already considered offsets - R
I want to predict a fitted poisson glm on newdata, given that it was fitted using offset=log(Exposure), but I get confused with the inclusion of the term "offset" inside of predict.glm(). I ...
0 votes
1 answer
59 views
Issue with including a quadratic term into a GLM quasi-poisson
I am currently looking at country-wide population ‘censuses’ that were conducted by feeding vultures at all restaurant sites simultaneously. Simultaneous census counts were conducted twice in June ...
2 votes
2 answers
109 views
Generating a column of probabilities in r for a dataframe
I have a dataframe dfof football matches and corresponding mean scoring rates for each team. The first 2 columns are Home and Away teams, the 3rd and 4th columns are mean scoring rates for Home and ...
0 votes
1 answer
622 views
How do I address R function glmmTMB warning "In (function (start, objective, gradient = NULL, hessian = NULL, : NA/NaN function evaluation"?
I am trying to use R function glmmTMB::glmmTMB() to fit a generalized linear mixed-effects model to a dataset. However, I am being presented with a warning which reads Warning message: In (function (...