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 X_1 and X_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 Y \sim e^{\alpha} and X \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} ), with Y \sim N(\mu_1, \sigma^2) and X \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), with Y \sim N(\mu_1, \sigma_1^2) and 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). 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]