rl_direct: Fitting restricted likelihood location-scale model using...

Description Usage Arguments Details Value Author(s)

View source: R/rl_direct.R

Description

Full model:

μ~N(η, τ^2), σ^2~IG(α, β), y_1, …, y_n~N(μ, σ^2)

For the restricted likelihood, conditioning is done on a pair of location and scale statistics T(y)=(l(y), s(y)) with the property that l(σ y+μ)=σ l(y)+μ and s(σ y+μ)=σ s(y).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
rl_direct(
  y,
  statistic,
  eta,
  tau,
  alpha,
  beta,
  mu_lims,
  sigma2_lims,
  length_mu,
  length_sigma2,
  smooth = 1,
  N
)

Arguments

y

vector of data

statistic,

character name of a function computing the location and scale statistic. See details for specification of this function.

eta, tau

prior mean and standard deviation for mu

alpha, beta

prior shape and scale for sigma^2

mu_lims, sigma2_lims

vectors of length 2 defining the limits for the numerical integration necessary to find the normalizing constant in Bayes' Theorem

length_mu, length_sigma2

length of the grid in each parameter to do the numerical integration (standard Riemann sum)

smooth

scalar or vector of length 2 that will scale the initial bandwidth computed by hpi.

N

number of samples of the statistics to use for the kernel density estimation

...

additional arguments to be passed to psi

Details

Direct evaluation uses kernel density estimation with a Gaussian kernel to estimate the restricted likelihood. N specifies the number of samples of the statistics to generate for the kernel density estimate. hpi is used to specify the initial bandwidths independently for the location and the scale. These can be multiplied by smooth to 'oversmooth' or 'undersmooth' the estimate.

statistic is a function taking only y as an input and outputing a two-dimension vector with the location and scale statistic to be conditioned on.

A simple numerical integration using Riemann sums is used to determine the normalizing constant. Parameters for this numerical integration are specified by mu_lims,sigma2_lims, length_mu, and length_sigma2.

Value

A list of length 4: the joint posterior, the two marginals, and the bandwidths used for the kernel density estimate

Author(s)

John R. Lewis lewis.865@osu.edu


jrlewi/brlm documentation built on March 17, 2021, 1:10 a.m.