# Plot Coefficients.

### Description

Produces boxplots showing the marginal distribution of the coefficients.

### Usage

1 2 3 4 5 6 7 | ```
PlotLmSpikeCoefficients(
beta,
burn = 0,
inclusion.threshold = 0,
scale.factors = NULL,
number.of.variables = NULL,
...)
``` |

### Arguments

`beta` |
A matrix of model coefficients. Each row represents an MCMC draw. Each column represents a coefficient for a variable. |

`burn` |
The number of MCMC iterations in the ojbect to be discarded as burn-in. |

`inclusion.threshold` |
Only plot coefficients with posterior inclusion probabilities exceeding this value. |

`scale.factors` |
If non-null then a vector of scale factors with which to
scale the columns of beta. A |

`number.of.variables` |
If non- |

`...` |
Additional arguments to be passed to |

### Value

Returns the value from the final call to `boxplot`

.

### Author(s)

Steven L. Scott

### See Also

`lm.spike`

`SpikeSlabPrior`

`summary.lm.spike`

`predict.lm.spike`

### Examples

1 2 3 4 5 6 7 8 9 | ```
simulate.lm.spike <- function(n = 100, p = 10, ngood = 3, niter=1000, sigma = 1){
x <- cbind(matrix(rnorm(n * (p-1)), nrow=n))
beta <- c(rnorm(ngood), rep(0, p - ngood))
y <- rnorm(n, beta[1] + x %*% beta[-1], sigma)
draws <- lm.spike(y ~ x, niter=niter)
return(invisible(draws))
}
model <- simulate.lm.spike(n = 1000, p = 50, sigma = .3)
plot(model, "coef", inclusion.threshold = .01)
``` |