MC3.REG.logpost {BMA} | R Documentation |

## Helper function to MC3.REG

### Description

Helper function to MC3.REG that calculates the posterior model probability (up to a constant).

### Usage

```
MC3.REG.logpost(Y, X, model.vect, p, i, K, nu, lambda, phi)
```

### Arguments

`Y` |
the vector of scaled responses. |

`X` |
the matrix of scaled covariates. |

`model.vect` |
logical vector indicating which variables are to be included in the model |

`p` |
number of variables in model.vect |

`i` |
vector of possible outliers |

`K` |
a hyperparameter indicating the outlier inflation factor |

`nu` |
regression hyperparameter. Default value is 2.58 if r2 for the full model is less than 0.9 or 0.2 if r2 for the full model is greater than 0.9. |

`lambda` |
regression hyperparameter. Default value is 0.28 if r2 for the full model is less than 0.9 or 0.1684 if r2 for the full model is greater than 0.9. |

`phi` |
regression hyperparameter. Default value is 2.85 if r2 for the full model is less than 0.9 or 9.2 if r2 for the full model is greater than 0.9. |

### Value

The log-posterior distribution for the model (up to a constant).

### Note

The implementation here differs from the Splus implentation. The Splus implementation uses global variables to contain the state of the current model and the history of the Markov-Chain. This implentation passes the current state and history to the function and then returns the updated state.

### Author(s)

Jennifer Hoeting jennifer.hoeting@gmail.com with the assistance of Gary Gadbury. Translation from Splus to R by Ian Painter ian.painter@gmail.com.

### References

Bayesian Model Averaging for Linear Regression Models Adrian E. Raftery, David Madigan, and Jennifer A. Hoeting (1997). Journal of the American Statistical Association, 92, 179-191.

A Method for Simultaneous Variable and Transformation Selection in Linear Regression Jennifer Hoeting, Adrian E. Raftery and David Madigan (2002). Journal of Computational and Graphical Statistics 11 (485-507)

A Method for Simultaneous Variable Selection and Outlier Identification in Linear Regression Jennifer Hoeting, Adrian E. Raftery and David Madigan (1996). Computational Statistics and Data Analysis, 22, 251-270

Earlier versions of these papers are available via the World Wide Web using the url: https://www.stat.colostate.edu/~jah/papers/

### See Also

`MC3.REG`

, `For.MC3.REG`

, `MC3.REG.choose`

*BMA*version 3.18.17 Index]