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, λ\lambda. Values can be determined from the reparameterisation of the original parameters of the bivariate distribution chosen in distr.

psi

scalar parameter of interest, ψ\psi, for the probability R. Value can be determined from the reparameterisation of the original parameters of the bivariate distribution chosen in distr.

distr

character string specifying the type of distribution assumed for X1X_1 and X2X_2. Possible choices for distr are "exp" (default) for the one-parameter exponential, "norm_EV" and "norm_DV" for the Gaussian distribution with, respectively, equal or unequal variances assumed for the two random variables.

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, with YeαY \sim e^{\alpha} and XeβX \sim e^{\beta};

Gaussian models with equal variances:

ψ=Φ(μ2μ12σ2)\psi = \Phi \left( \frac{\mu_2-\mu_1}{\sqrt{2 \sigma^2}} \right) and λ=(λ1,λ2)=(μ12σ2,2σ2)\lambda = (\lambda_1,\lambda_2) = ( \frac{\mu_1}{\sqrt{2 \sigma^2}}, \sqrt{2 \sigma^2} ), with YN(μ1,σ2)Y \sim N(\mu_1, \sigma^2) and XN(μ2,σ2)X \sim N(\mu_2, \sigma^2);

Gaussian models with unequal variances:

ψ=Φ(μ2μ1σ12+σ22)\psi = \Phi \left( \frac{\mu_2-\mu_1}{\sqrt{\sigma_1^2 + \sigma_2^2}} \right) and λ=(λ1,λ2,λ3)=(μ1,σ12,σ22)\lambda = (\lambda_1, \lambda_2, \lambda_3) = (\mu_1, \sigma_1^2, \sigma_2^2), with YN(μ1,σ12)Y \sim N(\mu_1, \sigma_1^2) and XN(μ2,σ22)X \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)P(Y<X). Computational Statistics, 28:1035-1059.

See Also

MLEs

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")        

[Package ProbYX version 1.1-0.1 Index]