loglikBerD0 {NPP} | R Documentation |
A Function to Calculate Log-likelihood of the Historical Data, Given Matrix-valued Parameters, for Bernoulli Population
Description
The function returns a matrix of class "npp", each element is a log-likelihood of the historical data.
It is an intermediate step to calculate the "normalizing constant" C(\delta)
in the normalized
power prior, for the purpose of providing a flexible implementation.
Users can specify their own likelihood function of the same class following this structure.
Usage
loglikBerD0(D0, thetalist, ntheta = 1)
Arguments
D0 |
a vector of each observation(binary) in historical data. |
thetalist |
a list of parameter values. The number of elements is equal to |
ntheta |
a positive integer indicating number of parameters to be estimated in the model. Default is 1 for Bernoulli. |
Value
A numeric matrix of log-likelihood, for the historical data given the matrix(or array)-valued parameters.
Author(s)
Zifei Han hanzifei1@gmail.com
References
Ibrahim, J.G., Chen, M.-H., Gwon, Y. and Chen, F. (2015). The Power Prior: Theory and Applications. Statistics in Medicine 34:3724-3749.
Duan, Y., Ye, K. and Smith, E.P. (2006). Evaluating Water Quality: Using Power Priors to Incorporate Historical Information. Environmetrics 17:95-106.
See Also
loglikNormD0
;
logCknot
;
logCdelta