Bayesian approach to multivariate linear regression
Instatistics,Bayesian multivariate linear regression is aBayesian approach tomultivariate linear regression, i.e.linear regression where the predicted outcome is a vector of correlatedrandom variables rather than a single scalar random variable. A more general treatment of this approach can be found in the articleMMSE estimator.
Consider a regression problem where thedependent variable to be predicted is not a singlereal-valued scalar but anm-length vector of correlated real numbers. As in the standard regression setup, there aren observations, where each observationi consists ofk−1explanatory variables, grouped into a vector
of lengthk (where adummy variable with a value of 1 has been added to allow for an intercept coefficient). This can be viewed as a set ofm related regression problems for each observationi:
where the set of errors
are all correlated. Equivalently, it can be viewed as a single regression problem where the outcome is arow vector
and the regression coefficient vectors are stacked next to each other, as follows:
Thecoefficient matrixB is a
matrix where the coefficient vectors
for each regression problem are stacked horizontally:
The noise vector
for each observationi isjointly normal, so that the outcomes for a given observation are correlated:
We can write the entire regression problem in matrix form as:
whereY andE are
matrices. Thedesign matrixX is an
matrix with the observations stacked vertically, as in the standardlinear regression setup:
The classical, frequentistslinear least squares solution is to simply estimate the matrix of regression coefficients
using theMoore-Penrosepseudoinverse:
To obtain the Bayesian solution, we need to specify the conditional likelihood and then find the appropriate conjugate prior. As with the univariate case oflinear Bayesian regression, we will find that we can specify a natural conditional conjugate prior (which is scale dependent).
Let us write our conditional likelihood as[1]
writing the error
in terms of
and
yields
We seek a natural conjugate prior—a joint density
which is of the same functional form as the likelihood. Since the likelihood is quadratic in
, we re-write the likelihood so it is normal in
(the deviation from classical sample estimate).
Using the same technique as withBayesian linear regression, we decompose the exponential term using a matrix-form of the sum-of-squares technique. Here, however, we will also need to use the Matrix Differential Calculus (Kronecker product andvectorization transformations).
First, let us apply sum-of-squares to obtain new expression for the likelihood:

We would like to develop a conditional form for the priors:
where
is aninverse-Wishart distributionand
is some form ofnormal distribution in the matrix
. This is accomplished using thevectorization transformation, which converts the likelihood from a function of the matrices
to a function of the vectors
.
Write
Let
where
denotes theKronecker product of matricesA andB, a generalization of theouter product which multiplies an
matrix by a
matrix to generate an
matrix, consisting of every combination of products of elements from the two matrices.
Then
which will lead to a likelihood which is normal in
.
With the likelihood in a more tractable form, we can now find a natural (conditional) conjugate prior.
Conjugate prior distribution
[edit]The natural conjugate prior using the vectorized variable
is of the form:[1]
where
and
Posterior distribution
[edit]Using the above prior and likelihood, the posterior distribution can be expressed as:[1]
where
.The terms involving
can be grouped (with
) using:
with
This now allows us to write the posterior in a more useful form:
This takes the form of aninverse-Wishart distribution times aMatrix normal distribution:
and
The parameters of this posterior are given by:



- ^abcPeter E. Rossi, Greg M. Allenby, Rob McCulloch.Bayesian Statistics and Marketing. John Wiley & Sons, 2012, p. 32.