Jointness: Computation of Jointness measurements.

View source: R/Jointness.R

JointnessR Documentation

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

An object of class 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 and j)

And the two measurements of Ley and Steel (2007)

J*= P(i and j)/P(i or j)

J*=P(i and j)/(P(i or j)-P(i and j))

If covariates is a vector of length 2, Jointness return a list of four elements. The first three of them is a list of three values containing the measurements above but just for the given pair of covariates. The fourth element is the covariates vector.

If method print.jointness is used a message with the meaning of the measurement si printed.

Author(s)

Gonzalo Garcia-Donato and Anabel Forte

Maintainer: <anabel.forte@uv.es>

References

Ley, E. and Steel, M.F.J. (2007)<DOI:10.1016/j.jmacro.2006.12.002>Jointness in Bayesian variable selection with applications to growth regression. Journal of Macroeconomics, 29(3):476-493.

See Also

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

plot.Bvs for different descriptive plots of the results, BMAcoeff for obtaining model averaged simulations of regression coefficients and predict.Bvs for predictions.

Examples


## 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)

BayesVarSel documentation built on March 31, 2023, 9:17 p.m.