Hi everyone,

I tried to build a poisson regression model using the brm() and the command

brm_fit <- brm(grid_diversity ~ grid_bio1 + grid_bio4 + grid_bio11 + grid_bio12 + grid_bio15 + grid_speciation + grid_aridityIndex + grid_wd, data=test, family=poisson()). The response variable was count of species. Other variables were numeric.

**But I got the error:**

Compiling the C++ model

Start sampling

SAMPLING FOR MODEL ‘3453be8fad0bec5136a860e9f38761fa’ NOW (CHAIN 1).

Chain 1: Rejecting initial value:

Chain 1: Log probability evaluates to log(0), i.e. negative infinity.

Chain 1: Stan can’t start sampling from this initial value.

Chain 1: Rejecting initial value:

Chain 1: Log probability evaluates to log(0), i.e. negative infinity.

Chain 1: Stan can’t start sampling from this initial value.

…

Chain 1: Rejecting initial value:

Chain 1: Log probability evaluates to log(0), i.e. negative infinity.

Chain 1: Stan can’t start sampling from this initial value.

Chain 1:

Chain 1: Initialization between (-2, 2) failed after 100 attempts.

Chain 1: Try specifying initial values, reducing ranges of constrained values, or reparameterizing the model.

[1] “Error in sampler$call_sampler(args_list[[i]]) : Initialization failed.”

[1] “error occurred during calling the sampler; sampling not done”

I can ran the glm(grid_diversity ~ grid_bio1 + grid_bio4 + grid_bio11 + grid_bio12 + grid_bio15 + grid_speciation + grid_aridityIndex + grid_wd, data=test, family=poisson()). The response variable in my data didn’t have zero. And I also tried the family = zero_inflated_poisson() in the brm(), but still got the same error as above. I uploaded the data I used.

Operation system I used: windows10

brms version: 2.13.0

R version: 3.6.1

Thank you very much if anyone has some ideas about my problem.

brm_test_dataset_20200615.csv (21.4 KB)