I am considering a Bayesian linear model for which the prior is not proper. The model is as usual $y = X \theta + w$ where $w \sim N(0, \sigma^2)$, and $\theta, \sigma^2$ are unknown. The distribution is a normal-inverse Gamma for parameters $\theta, \sigma^2$ (the normal part is improper). There are hyperparameters in the prior that would be nice to tune with empirical Bayes, though I am running into a problem.
I am not able to calculate what $p(y)$ is, i.e. the integral $$p(y) = \int \int p(y | \theta, \sigma^2) p(\theta | \sigma^2) p(\sigma^2) d\theta d\sigma^2$$ divides by zero, and I do not know if this is the right way to do it or where the mistake is. I have followed derivations similar to these to find $p(y)$. If we arrive at the equation we can set the hyperparameters so that we maximize the probability (as described on EB wikipedia).
The prior is constructed from some information that $$ p(\theta | \sigma^2 ) \propto (\sigma^2)^{-q/2} \exp ( - (v - A \theta)^T J (v- A\theta) /(2\sigma^2)) $$ where $v, A, J$ are known, $J$ is positive definite, but $A$ is singular. Therefore this does not define a proper distribution over $\theta$, there "is no" covariance matrix, though there is a singular precision matrix. This is not a problem in order to compute a posterior, we must just assume that $ X^TX + A^T JA $ is invertible, which we assume, then the posterior is proper. The hyperparameters to be tuned are embedded in $J$.
Calculating $p(y)$ as they do in the source leads to dividing by the determinant of the prior covariance matrix, but this is 0, since the matrix is singular. I still think that as long as the posterior is proper, which we assume, we can do empirical Bayes like described, but how? what am I missing? Any resources that consider this scenario?
In the integral, $ p(\theta | \sigma^2) $ is not a proper distribution, since it can not be normalized to 1, so there is an abuse of notation there. This is perhaps partly where the problem comes from, but I still find it hard to believe that empirical Bayes can not be applied when the posterior is proper.