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 , corresponding to the quantity R,
and the nuisance parameter
.
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 and
depends on the assumed distribution.
Here the following relashonships have been used:
- Exponential models:
-
and
, with
and
;
- Gaussian models with equal variances:
-
and
, with
and
;
- Gaussian models with unequal variances:
-
and
, with
and
.
The Standard Normal cumulative distribution function is indicated with .
Value
Value of the log-likelihood function computed in psi
and lambda
.
Author(s)
Giuliana Cortese
References
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on . 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")