Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function cpef2reg
estimates regression
parameters of (zero-truncated) Poisson regression model
with multivariate normal prior distributions. See
‘Details’.
1 2 3 4 |
y |
a numeric vector of length |
X |
a model matrix of size |
b |
a mean vector of length |
B |
a variance-covariance matrix of size
|
ztrunc |
a logical value; Defults to |
method |
a name of numerical method to be used for
fitting the |
xi |
a numeric vector of length |
verbose |
a logical value; Be more verbose about the
process by displaying messages; Defaults to
|
initrun |
a logical value; Would you like to run the
function |
control |
a list of parameters for controlling the fitting process. See ‘Details’. |
proposal |
a list of parameters for controlling the fitting process. See ‘Details’. |
start |
a list of parameters for controlling the fitting process. See ‘Details’. |
Numericall methods are implemented for both cases of
ztrunc=TRUE
and ztrunc=FALSE
.
LA
(Laplace approximation) is the implementation
of that in the study Tierney, Kass, and Kadane
1989. The correction const
defaults to 2e1
(log-scaled value).
MH
(Metropolis-Hasting algorithm) is the
implementation of that in the study Chib and
Greenberg 1995. nchains
and nburns
defaults to 2e3
and 5e2
. Normal
distribution with mu=log(mean(y))
and
sigma=sd(y)
is chosen for a proposal distribution
to generate a candidate sample.
IS
(Importance sampling) is the implementation of
that in the study Denny 2001. ess
(effective sample size) is computed with an importance
sample of size n=1e3
. cpef
is recursively
used with method=LA
for having the best guess for
a mean value mu
of a proposal distribution.
The list of components returned from cpef2reg
depends on what numerical method is employed. All input
paramters are inherited. The commonly returned components
are:
theta |
The estimated canonical parameter of length
|
ess |
The effective sample size if
|
sratio |
The ratio of
determinants of two hessian matrices if |
accept.rate |
The proportion of candidate samples
that are accepted in the chain of length |
Estimation with method=AQ
frequently fails on the
cases of ztrunc=FALSE
and ztrunc=TRUE
if
n<50.
Estimation with method=LA
frequently fails on the
case of ztrunc=TRUE
if n<5e2.
method=MH
is the most safe choice for various
conditions.
Chel Hee Lee <gnustats@gmail.com>
Tierney L., Kass R. and Kadane J. (1989). “Fully Exponential Laplace Approximations to Expectations and Variances of Nonpositive Functions.” _Journal of the American Statistical Association_, *84*(407), pp. 710-716.
Chib S. and Greenberg E. (1995). “Understanding the Metropolis-Hastings Algorithm.” _The American Statistician_, *49*(4), pp. 327-335.
Denny M. (2001). “Introduction to importance sampling in rare-event simulations.” _European Journal of Physics_, *22*(4), pp. 403.
Lee (2013) “Imprecise inferential framework”, PhD thesis.
optim
, integrate
,
update
, model
,
iprior
1 2 3 4 | ## Not run:
# cpef2reg
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.