Hi, I am building a Media mix model, but it gives me the following error (summarized):

ValueError: Mass matrix contains zeros on the diagonal.

The derivative of RV `beta_Seasonality3`

.ravel()[0] is zero.

The derivative of RV `beta_Seasonality3`

.ravel()[1] is zero.

The derivative of RV `mu_Banners_log__`

.ravel()[0] is zero.

The derivative of RV `mu_Radio_log__`

.ravel()[0] is zero.

The derivative of RV `alpha_Radio_logodds__`

.ravel()[0] is zero.

The derivative of RV `mu_TV_log__`

.ravel()[0] is zero.

The derivative of RV `alpha_TV_logodds__`

.ravel()[0] is zero.

“”"

The likelihood is built with pm.Normal.

In the dataset I have float 0.0 (zeroes) values, because there are some weeks that there is zero spend,

plus the seasonality values are hot encoded as floats 0.0 and 1.0.

Is there a different pm.model than the normal that can manage dataset with zero values?

I’ve also tried to replace the zero values with 0.1, but stil the same.

Hope somebody can help.

Thanks,

Marcello