Suvarna Garge (Editor)

Bayesian multivariate linear regression

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Bayesian multivariate linear regression

In statistics, Bayesian multivariate linear regression is a Bayesian approach to multivariate linear regression, i.e. linear regression where the predicted outcome is a vector of correlated random variables rather than a single scalar random variable. A more general treatment of this approach can be found in the article MMSE estimator.

Details

Consider a regression problem where the dependent variable to be predicted is not a single real-valued scalar but an m-length vector of correlated real numbers. As in the standard regression setup, there are n observations, where each observation i consists of k-1 explanatory variables, grouped into a vector x i of length k (where a dummy variable with a value of 1 has been added to allow for an intercept coefficient). This can be viewed as a set of m related regression problems for each observation i:

y i , 1 = x i T β 1 + ϵ i , 1 y i , m = x i T β m + ϵ i , m

where the set of errors { ϵ i , 1 , , ϵ i , m } are all correlated. Equivalently, it can be viewed as a single regression problem where the outcome is a row vector y i T and the regression coefficient vectors are stacked next to each other, as follows:

y i T = x i T B + ϵ i T .

The coefficient matrix B is a k × m matrix where the coefficient vectors β 1 , , β m for each regression problem are stacked horizontally:

B = [ ( β 1 ) ( β m ) ] = [ ( β 1 , 1 β k , 1 ) ( β 1 , m β k , m ) ] .

The noise vector ϵ i for each observation i is jointly normal, so that the outcomes for a given observation are correlated:

ϵ i N ( 0 , Σ ϵ ) .

We can write the entire regression problem in matrix form as:

Y = X B + E ,

where Y and E are n × m matrices. The design matrix X is an n × k matrix with the observations stacked vertically, as in the standard linear regression setup:

X = [ x 1 T x 2 T x n T ] = [ x 1 , 1 x 1 , k x 2 , 1 x 2 , k x n , 1 x n , k ] .

The classical, frequentists linear least squares solution is to simply estimate the matrix of regression coefficients B ^ using the Moore-Penrose pseudoinverse:

B ^ = ( X T X ) 1 X T Y .

To obtain the Bayesian solution, we need to specify the conditional likelihood and then find the appropriate conjugate prior. As with the univariate case of linear 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

ρ ( E | Σ ϵ ) | Σ ϵ | n / 2 exp ( 1 2 t r ( E T E Σ ϵ 1 ) ) ,

writing the error E in terms of Y , X , and B yields

ρ ( Y | X , B , Σ ϵ ) | Σ ϵ | n / 2 exp ( 1 2 t r ( ( Y X B ) T ( Y X B ) Σ ϵ 1 ) ) ,

We seek a natural conjugate prior—a joint density ρ ( B , Σ ϵ ) which is of the same functional form as the likelihood. Since the likelihood is quadratic in B , we re-write the likelihood so it is normal in ( B B ^ ) (the deviation from classical sample estimate).

Using the same technique as with Bayesian 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 and vectorization transformations).

First, let us apply sum-of-squares to obtain new expression for the likelihood:

ρ ( Y | X , B , Σ ϵ ) | Σ ϵ | ( n k ) / 2 exp ( t r ( 1 2 S T S Σ ϵ 1 ) ) | Σ ϵ | k / 2 exp ( 1 2 t r ( ( B B ^ ) T X T X ( B B ^ ) Σ ϵ 1 ) ) , S = Y X B ^

We would like to develop a conditional form for the priors:

ρ ( B , Σ ϵ ) = ρ ( Σ ϵ ) ρ ( B | Σ ϵ ) ,

where ρ ( Σ ϵ ) is an inverse-Wishart distribution and ρ ( B | Σ ϵ ) is some form of normal distribution in the matrix B . This is accomplished using the vectorization transformation, which converts the likelihood from a function of the matrices B , B ^ to a function of the vectors β = v e c ( B ) , β ^ = v e c ( B ^ ) .

Write

t r ( ( B B ^ ) T X T X ( B B ^ ) Σ ϵ 1 ) = v e c ( B B ^ ) T v e c ( X T X ( B B ^ ) Σ ϵ 1 )

Let

v e c ( X T X ( B B ^ ) Σ ϵ 1 ) = ( Σ ϵ 1 X T X ) v e c ( B B ^ ) ,

where A B denotes the Kronecker product of matrices A and B, a generalization of the outer product which multiplies an m × n matrix by a p × q matrix to generate an m p × n q matrix, consisting of every combination of products of elements from the two matrices.

Then

v e c ( B B ^ ) T ( Σ ϵ 1 X T X ) v e c ( B B ^ )

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.

References

Bayesian multivariate linear regression Wikipedia