loglik {ProbYX} | R Documentation |
Log-likelihood of the bivariate distribution of (Y,X)
Description
Computation of the log-likelihood function of the bivariate distribution (Y,X).
The log-likelihood is reparametrized with the parameter of interest \psi
, corresponding to the quantity R,
and the nuisance parameter \lambda
.
Usage
loglik(ydat, xdat, lambda, psi, distr = "exp")
Arguments
ydat |
data vector of the sample measurements from Y. |
xdat |
data vector of the sample measurements from X. |
lambda |
nuisance parameter vector, |
psi |
scalar parameter of interest, |
distr |
character string specifying the type of distribution assumed for |
Details
For further information on the random variables Y and X, see help on Prob
.
Reparameterisation in order to determine \psi
and \lambda
depends on the assumed distribution.
Here the following relashonships have been used:
- Exponential models:
-
\psi= \frac{\alpha}{(\alpha + \beta)}
and\lambda = \alpha + \beta
, withY \sim e^{\alpha}
andX \sim e^{\beta}
; - Gaussian models with equal variances:
-
\psi = \Phi \left( \frac{\mu_2-\mu_1}{\sqrt{2 \sigma^2}} \right)
and\lambda = (\lambda_1,\lambda_2) = ( \frac{\mu_1}{\sqrt{2 \sigma^2}}, \sqrt{2 \sigma^2} )
, withY \sim N(\mu_1, \sigma^2)
andX \sim N(\mu_2, \sigma^2)
; - Gaussian models with unequal variances:
-
\psi = \Phi \left( \frac{\mu_2-\mu_1}{\sqrt{\sigma_1^2 + \sigma_2^2}} \right)
and\lambda = (\lambda_1, \lambda_2, \lambda_3) = (\mu_1, \sigma_1^2, \sigma_2^2)
, withY \sim N(\mu_1, \sigma_1^2)
andX \sim N(\mu_2, \sigma_2^2)
.
The Standard Normal cumulative distribution function is indicated with \Phi
.
Value
Value of the log-likelihood function computed in \psi=
psi
and \lambda=
lambda
.
Author(s)
Giuliana Cortese
References
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on P(Y<X)
. Computational Statistics, 28:1035-1059.
See Also
Examples
# data from the first population
Y <- rnorm(15, mean=5, sd=1)
# data from the second population
X <- rnorm(10, mean=7, sd=1)
mu1 <- 5
mu2 <- 7
sigma <- 1
# parameter of interest, the R probability
interest <- pnorm((mu2-mu1)/(sigma*sqrt(2)))
# nuisance parameters
nuisance <- c(mu1/(sigma*sqrt(2)), sigma*sqrt(2))
# log-likelihood value
loglik(Y, X, nuisance, interest, "norm_EV")