Error: Family 'von_mises' require a response smaller than or equal to 3.14

Dear all,

I am newhere and using brms.

I want to investigate effects of fixed and random variables in the hour time from camera trap records from Brazilian wild mammals.

I transformed the hour time data (circular data) into radian ranging from 0.001 to 6.28, however the brm function indicated:

“Error: Family ‘von_mises’ require a response smaller than or equal to 3.14159265358979.”

Should I use a specific transformation in my data?
Should I trucate my data to -pi to pi?

Any advance here will be helpful!

I used the hms2rad for hour time to radian

hms2rad(time)

This is my model

Model_anta = brm(time.rad ~ UC + Com.D + City.D + (1|Comunidade),
                  
                  data = data.a,
                  
                  family = von_mises(link = "tan_half"),
                  
                  #prior = Prior_Theta,
                  
                  sample_prior= TRUE,
                  
                  warmup = 50,
                  
                  iter = 100,
                  
                  control = list(adapt_delta = 0.9),
                  
                  chains = 2,
                  
                  cores = 2)```


* Operating System: Windows
* brms Version:  2.21.0
1 Like

Yes, values should be between -pi and pi, whereas yours are between 0 and 2pi. So e.g. subtract pi from your values to get the correct range.

1 Like

Great @Ax3man! My model run right now.

1 Like