Learn R Programming

BayesVarSel (version 1.7.0)

Jointness: Computation of Jointness measurements.

Description

Jointness computes the joint inclusion probabilitiy of two given covariates as well as the jointness measurements of Ley and Steel (2007)

Usage

Jointness(x, covariates="All")

Arguments

x
An object of class Bvs
covariates
It can be either "All"(default) or a vector contaning the name of two covariates.

Value

jointness is returned.If covariates is "All" this object is a list with three matrices containg different jointness measurements for all pairs of covariates is returned. In particular, for covariates i and j the jointness measurements are:The Joint inclusion probabilities:$P(i \cap j)$And the two measurements of Ley and Steel (2007)$\mathcal{j}^*= \frac{P(i \cap j)}{P(i\cup j)}$$\mathcal{j}^*=\frac{P(i \cap j)}{P(i\cup j)-P(i\cap j)}$If covariates is a two dimensional vector, Jointness return a list of two elements. The first one of them is a data frame containing the measurements above but just for the given pair of covariates. The second element is the covariates vector.If method print.jointness is used a message with the meaning of the measurement si printed.

References

Ley, E. and Steel, M.F.J. (2007)Jointness in Bayesian variable selection with applications to growth regression. Journal of Macroeconomics, 29(3):476-493.

See Also

Bvs, PBvs, GibbsBvs for performing variable selection and obtaining an object of class Bvs.

plotBvs for different descriptive plots of the results, BMAcoeff for obtaining model averaged simulations of regression coefficients and predictBvs for predictions.

Examples

Run this code
## Not run: 
# #Analysis of Crime Data
# #load data
# 
# data(UScrime)
# 
# crime.Bvs<- Bvs(formula="y~.", data=UScrime, n.keep=1000)
# 
# #A look at the jointness measurements:
# Jointness(crime.Bvs, covariates="All")
# 
# Jointness(crime.Bvs, covariates=c("Ineq","Prob"))
# #---------
# #The joint inclusion probability for Ineq and Prob is:  0.65 
# #---------
# #The ratio between the probability of including both 
# #covariates and the probability of including at least one of then is: 0.66
# #---------
# #The probability of including both covariates at the same times is 1.95 times 
# #the probability of including one of them alone 
# 
# ## End(Not run)

Run the code above in your browser using DataLab