BayES BayES

6.9 Multivariate Probit

Mathematical representation

y1i = x1iβ1 + 𝜀1i y2i = x2iβ2 + 𝜀2i yMi = xMiβM + 𝜀Mi ymi = 1 if ymi > 0 0 if ymi 0 m = 1,2.,M (6.17)

where the ymi’s are not observed, but, similarly to binary Probit and Logit models, their signs are determined by the corresponding observed ymis.

A more compact representation of the model is:

yi = X iβ + 𝜀i,𝜀i N 0,Σ

where:

yi M×1 = y1i y2i y Mi ,XiM×K = x1i 0 0 0 x2i 0 0 0 xMi ,βK×1 = β1 β2 β M ,𝜀iM×1 = 𝜀1i 𝜀2i 𝜀 Mi

and Σ being the covariance matrix of 𝜀i: Σ Ω1. For identification purposes, Σ is normalized such that its diagonal elements are equal to one. Thus, Σ is, in fact, a correlation matrix.

Priors




Parameter Probability density function Default hyperparameters



β p β = |P|12 2πK2 exp 1 2 β mP β m m = 0 K, P = 0.001 IK
Σ p Σ̆ = |Σ̆|n+M+1 2 |S|n2 2nM2ΓMn 2 exp 1 2 tr SΣ̆1 n = M2, V = 100 M IM
The prior for Σ̆ is transformed such that diag Σ = 1M and Σ is a proper correlation matrix.



PIC An inverse-Wishart prior is used for a positive-definite, but otherwise unrestricted, matrix, Σ̆. This prior is then internally transformed to a prior for Σ = DΣ̆D, where D is an M ×M diagonal matrix constructed by taking the inverse of the square root of the diagonal elements of Σ̆: D = diag σ̆1112 σ̆2212 σ̆MM12 .

PIC The magnitude of the elements of the scale matrix, S, in the prior for Σ̆ affects the prior for Σ only if S is not diagonal. The degrees-of-freedom parameter, n, in the prior for Σ̆ can be used to control the dispersion of the implied prior density of Σ around the prior expected value:

  • E Σ = IM if S is diagonal
  • E Σ = DSD if S is not diagonal

In both cases smaller values of n allow larger deviations form E Σ.

PIC Due to an inverse-Wishart distribution being used as the prior for Σ̆, the prior expected value of Σ̆ is 1 nM1S. Although the prior for Σ̆ is transformed to a prior for Σ such that the latter is a correlation matrix, due to simulation-based integration taking place in this transformation when S is not diagonal, hyperparameter values that result into an expected value of Σ̆ that is far from satisfying the conditions necessary for it to be a correlation matrix may lead to numerical unstability issues when calculating the log-marginal likelihood of the model. It is, therefore, advised that n is used to control the dispersion of Σ around its expected value and S is subsequently defined such that 1 nM1S is close to being a proper correlation matrix (positive definite with values equal to one on the main diagonal).

Syntax

[<model name> = ] mvprobit( { 
      y1 ~ x11 x12  x1K1, 
      y2 ~ x21 x22  x2K2, 
      , 
      yM ~ xM1 xM2  xMKM } 
      [, <options> ] 
);

where:

PIC All dependent variables, y1, y2, …, yM, in the dataset used for estimation must contain only two values: 0 and 1 (with 1 indicating “success" for the respective outcome). Observations with missing values in any dependent variable are dropped during estimation, but if a numerical value other than 0 and 1 is encountered, then an error is produced.

The optional arguments for the multivarite Probit model are:9

Gibbs parameters


"chains"

number of chains to run in parallel (positive integer); the default value is 1

"burnin"

number of burn-in draws per chain (positive integer); the default value is 10000

"draws"

number of retained draws per chain (positive integer); the default value is 20000

"thin"

value of the thinning parameter (positive integer); the default value is 1

"seed"

value of the seed for the random-number generator (positive integer); the default value is 42

Hyperparameters


"m"

mean vector of the prior for β (K ×1 vector); the default value is 0K

"P"

precision matrix of the prior for β (K ×K symmetric and positive-definite matrix); the default value is 0.001 IK

"S"

scale matrix of the prior for Σ (M ×M symmetric and positive-definite matrix); the default value is 100 M IM

"n"

degrees-of-freedom parameter of the prior for Σ (real number greater than or equal to M); the default value is M2

Dataset and log-marginal likelihood


"dataset"

the id value of the dataset that will be used for estimation; the default value is the first dataset in memory (in alphabetical order)

"logML_CJ"

boolean indicating whether the Chib (1995)/Chib & Jeliazkov (2001) approximation to the log-marginal likelihood should be calculated (true|false); the default value is false

Reported Parameters




β

variable_name

vector of parameters associated with the independent variables; these are broken into groups according to the equation in which the independent variables appear




Stored values and post-estimation analysis
If a left-hand-side id value is provided when a multivariate Probit model is created, then the following results are saved in the model item and are accessible via the ‘.’ operator:

Samples

a matrix containing the draws from the posterior of β (across all equations, starting from the first equation) and the unique elements of Σ

ym$xm1,,
  ym$xmKm

vectors containing the draws from the posterior of the parameters associated with variables xm1,,xmKm, for m = 1,2,,M (the names of these vectors are the names of the variables that were included in the right-hand side of equation m, prepended by ym$, where ym is the name of the dependent variable in equation m; this is done so that the samples on the parameters associated with a variable that appears in more than one equations can be distinguished)

Sigma_i_j

vectors containing the draws from the posterior of the unique elements of Σ; because Σ is symmetric, only M1M 2 + M of its elements are stored (instead of all M2 elements), including the elements that are restricted to be equal to one; i and j index the row and column of Σ, respectively, at which the corresponding element is located

Sigma

M ×M matrix that stores the posterior mean of Σ

logML

the Lewis & Raftery (1997) approximation of the log-marginal likelihood

logML_CJ

the Chib (1995)/Chib & Jeliazkov (2001) approximation to the log-marginal likelihood; this is available only if the model was estimated with the "logML_CJ"=true option

nchains

the number of chains that were used to estimate the model

nburnin

the number of burn-in draws per chain that were used when estimating the model

ndraws

the total number of retained draws from the posterior ( =chains draws)

nthin

value of the thinning parameter that was used when estimating the model

nseed

value of the seed for the random-number generator that was used when estimating the model

Additionally, the following functions are available for post-estimation analysis (see section B.14):

The multivariate Probit model uses the mfx() function to calculate and report the marginal effects of the independent variables on the probability of success for each of M dependent variables. There are two types of marginal effects which can be requested by setting the "type" argument of the mfx() function equal to 1 or 2:

  1. when "type"=1 the marginal effects for each of the M outcomes are calculated marginally with respect to the values of the remaining dependent variables

  2. when "type"=2 the marginal effects are calculated conditionally on the values of other dependent variables being equal to the values indicated by a vector z, passed to the mfx() function using the "opt" option. This vector must have dimension equal to M and values equal to either 0 or 1. A value of 0 in the m-th position of z indicates that the m-th dependent variable is to restricted to 0 when calculating marginal effects on the remaining variables; a value of 1 indicates that the m-th dependent variable is to be restricted to 1 when calculating these marginal effects.

The generic syntax for a statement involving the mfx() function after estimation of a multivariate Probit model is:

mfx( ["type"=1] [, "point"=<point of calculation>] [, "model"=<model name>] );

and:

mfx( "type"=2, "opt"=z [, "point"=<point of calculation>] [, "model"=<model name>] );

for calculating these two types of marginal effects. The default value of the "type" option is 1. See the general documentation of the mfx() function (section B.14) for details on the other optional arguments.

PIC Although BayES can calculate marginal effects for the multivariate Probit model at each observation, the calculations may take an excessive amount of time to complete. This is because the GHK simulator needs to be invoked at every observed data point, each time using all draws from the posterior, thus leading to an immense number of computations.

The multivariate Probit model uses the predict() function to generate predictions of the probability of success for each of M dependent variables. There are two types of predictions which can be requested by setting the "type" argument of the predict() function equal to 1 or 2:

  1. when "type"=1 the predictions are generated for each of the M dependent variables are calculated marginally with respect to the values of the remaining dependent variables

  2. when "type"=2 the predictions are generated conditionally on the values of other dependent variables being equal to the values indicated by a vector z, passed to the predict() function using the "opt" option. This vector must have dimension equal to M and values equal to either 0 or 1. A value of 0 in the m-th position of z indicates that the m-th dependent variable is to restricted to 0 when generating predictions for the remaining variables; a value of 1 indicates that the m-th dependent variable is to be restricted to 1 when generating these predictions.

The generic syntax for a statement involving the predict() function after estimation of a random-effects binary Probit model is:

[<id value>] = predict( ["type"=1] [, "point"=<point of calculation>] [,"model"=<model name>] [, "stats"=true|false] [, "prefix"=<prefix for new variable name>] );

and:

[<id value>] = predict( "type"=2, "opt"=z [, "point"=<point of calculation>] [,"model"=<model name>] [, "stats"=true|false] [, "prefix"=<prefix for new variable name>] 
);

for generating these two types of predictions effects. The default value of the "type" option is 1. See the general documentation of the predict() function (section B.14) for details on the other optional arguments.

PIC Although BayES can generate summary statistics of the predictions for the multivariate Probit model at each observation, the calculations may take an excessive amount of time to complete. This is because the GHK simulator needs to be invoked at every observed data point, each time using all draws from the posterior, thus leading to an immense number of computations.

Examples

Example 1

myData = import("$BayESHOME/Datasets/dataset11.csv"); 
myData.constant = ones(rows(myData), 1); 
 
myModel = mvprobit( { 
    y1 ~ constant x11 x12 x13 x14 x15, 
    y2 ~ constant x21 x22 x23 x24, 
    y3 ~ constant x21 x22 x23 
} );

Example 2

myData = import("$BayESHOME/Datasets/dataset11.csv"); 
myData.constant = ones(rows(myData), 1); 
 
myModel = mvprobit( { 
    y1 ~ constant x11 x12 x13 x14 x15, 
    y2 ~ constant x21 x22 x23 x24, 
    y3 ~ constant x21 x22 x23 
    }, 
    "m"=ones(15,1), "P"=0.01*eye(15,15), "n"=5, 
    "burnin"=20000, "draws"=40000, "thin"=4, "chains"=2, 
    "logML_CJ" = true 
); 
 
mfx( "point"="mean", "model"=myModel ); 
x_for_mfx = [ 
    1.0,1.0,1.0,1.0,1.0,0.0, // values for the variables in the 1st equation 
    1.0,0.0,0.5,0.5,0.5,     // values for the variables in the 2nd equation 
    1.0,0.0,0.5,0.5          // values for the variables in the 3rd equation 
    ]; 
mfx( "point"=x_for_mfx, "model"=myModel ); 
mfx( "point"="mean", "model"=myModel, "type"=2, "opt"=[1,0,1]); 
 
predict("prefix"=marg_); 
predict("prefix"=cond_, "type"=2, "opt"=[1,0,1]);

9Optional arguments are always given in option-value pairs (eg. "chains"=3).

Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis