Inverse gamma prior brms

I would like to use an inverse gamma prior (my data has a lot of zeros so I want to avoid negative variances) but I am not sure how to specify it. This is what I have come up with, and it runs without any errors, does it look correct to any of you?

prior ← set_prior(“igamma(2, 0.5)”, class = “sigma”)

  • Operating System: Ventura 13.3.1
  • brms Version: ‘2.19.0’

Say you fit the model and name it my_fit. You should be able to confirm your priors by executing my_fit$prior.