Description Usage Arguments Value Author(s)
Full model:
b~N(μ_0, Σ_0), σ^2~IG(α, β), y~N(Xb, σ^2)
For the restricted likelihood, conditioning is done on a pair of location and scale statistics T(y) = (b(y), s(y)).
statistic
is a function of X
, y
and outputing the p+1-dimensional vector T(y) with the p location statistics (for b
) and 1 scale statistic.
Instrumental (importance) distributions are normal. For beta, a multivariate normal centererd at the estimate of beta with covariance cov_b
. For sigma^2, a truncated normal with mean (before truncation) of the estimate of σ^2 with sd scale
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | rl_importance(
y,
X,
statistic,
mu0,
Sigma0,
alpha,
beta,
cov_b,
scale,
smooth = 1,
N,
Nins
)
|
y |
vector of data |
X |
a matrix or data frame containing the explanatory variables. The matrix should include a vector of 1's if intercept is desired. |
statistic |
character name of a function computing the location and scale statistic. See details for specification of this function. |
alpha |
prior shape and scale for sigma^2 |
beta |
prior shape and scale for sigma^2 |
cov_b |
positive definite pxp matrix defining the covariance for the normal instrumental distribution on |
scale |
numeric, sd for the truncated normal instrumental distribution for σ^2. Importance sample weights should be examined to evaluate the appropriatness of this choice. |
smooth |
scalar or vector of length 2 that will scale the initial bandwidth computed by |
N |
number of samples of the statistics to use for the kernel density estimation |
Nins |
number of samples from the instrumental distribution |
list with elements impSamps
, w
, fit
. These are the Nins
by length(beta)+1
matrix of importance samples, the corresponding weights, and the observed statistic.
John R. Lewis lewis.865@osu.edu
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.