rlImportSamp: Fitting restricted likelihood model using importance sampling...

Description Usage Arguments Value Author(s)

View source: R/rlImportSamp.R

Description

Full model:

β~N(μ_0, Σ_0), σ^2~IG(α, β), y~N(Xβ, σ^2)

For the restricted likelihood, conditioning is done on a pair of location and scale statistics T(y)=(b(y), s(y)). Current implementation allows for these to be a pair of M-estimators as implemented in rlm

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
rlImportSamp(
  X,
  y,
  psi,
  scale.est = "Huber",
  k2 = 1.345,
  mu0,
  Sigma0,
  alpha,
  beta,
  instDist = NULL,
  sdInstDist = NULL,
  smooth = 1,
  N,
  Nins,
  maxit = 1000,
  ...
)

Arguments

X

a matrix or data frame containing the explanatory variables. The matrix should include a vector of 1's if intercept is desired.

y

vector of data

psi

the psi function used to define the location estimator. It is a function (possibly given by name) that is described in rlm. Tuning constants are passed via ...

scale.est

specification of the scale estimator (issued by name- either 'MAD', 'Huber', or 'proposal 2') and the tuning constant for the Huber proposal 2 scale estimation. See these parameters in rlm for more information.

k2

specification of the scale estimator (issued by name- either 'MAD', 'Huber', or 'proposal 2') and the tuning constant for the Huber proposal 2 scale estimation. See these parameters in rlm for more information.

alpha

prior shape and scale for sigma^2

beta

prior shape and scale for sigma^2

instDist

Placeholder to allow for more user specific instrumental distributions. Currently not used.

sdInstDist

Vector of length 2 defining the scale for the instrumental distribution when instDist=NULL. In this case, the instrumental distribution for μ and σ^2 are independent normal and log normal distributions, respectively. The first value is then the standard deviation of the normal. The second is the standard deviation of \logσ^2 (i.e. the sdlog argument in Lognormal). If left as NULL a mutltiple of 5 is used on the asymptotic variance covariance matrix. 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 hpi.

N

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

Nins

number of samples from the instrumental distribution

maxit

the limit on the number of IWLS iterations. Same as in rlm

...

arguments to pass to the psi functions

Value

list with elements impSamps, w, fit. These are the Nins by length(beta)+1 matrix of importance samples, the corresponding weights, and the fitted robust regression.

Author(s)

John R. Lewis lewis.865@osu.edu


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