Title: | Inference for the Stress-Strength Model R = P(Y<X) |
---|---|
Description: | Confidence intervals and point estimation for R under various parametric model assumptions; likelihood inference based on classical first-order approximations and higher-order asymptotic procedures. |
Authors: | Giuliana Cortese |
Maintainer: | Giuliana Cortese <[email protected]> |
License: | GPL-2 |
Version: | 1.1-0.1 |
Built: | 2024-12-02 06:30:34 UTC |
Source: | CRAN |
Compute confidence intervals and point estimates for R, under parametric model assumptions for Y and X. Y and X are two independent continuous random variables from two different populations.
Package: | ProbYX |
Type: | Package |
Version: | 1.1 |
Date: | 2012-03-20 |
License: | GPL-2 |
LazyLoad: | yes |
The package can be used for computing accurate confidence intervals and
point estimates for the stress-strength (reliability) model R = P(Y<X); maximum likelihood estimates, Wald statistic, signed
log-likelihood ratio statistic and its modified version ca be computed.
The main function is Prob
, which evaluates confidence intervals and
point estimates under different approaches and parametric assumptions.
Giuliana Cortese
Maintainer: Giuliana Cortese [email protected]
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on P(Y<X). Computational Statistics, 28:1035-1059.
Kotz S, Lumelskii Y, Pensky M. (2003). The Stress-Strength Model and its Generalizations. Theory and Applications. World Scientific, Singapore.
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) level <- 0.01 # \eqn{\alpha} level # estimate and confidence interval under the assumption of two # normal variables with different variances. Prob(Y, X, "norm_DV", "RPstar", level) # method has to be set equal to "RPstar".
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) level <- 0.01 # \eqn{\alpha} level # estimate and confidence interval under the assumption of two # normal variables with different variances. Prob(Y, X, "norm_DV", "RPstar", level) # method has to be set equal to "RPstar".
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
.
loglik(ydat, xdat, lambda, psi, distr = "exp")
loglik(ydat, xdat, lambda, psi, distr = "exp")
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 |
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:
and
,
with
and
;
and
,
with
and
;
and
, with
and
.
The Standard Normal cumulative distribution function is indicated with .
Value of the log-likelihood function computed in psi
and lambda
.
Giuliana Cortese
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on . Computational Statistics, 28:1035-1059.
# 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")
# 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")
Compute maximum likelihood estimates of R, considered as the parameter of interest. Maximum likelihood estimates of the nuisance parameter are also supplied.
MLEs(ydat, xdat, distr)
MLEs(ydat, xdat, distr)
ydat |
data vector of the sample measurements from Y. |
xdat |
data vector of the sample measurements from X. |
distr |
character string specifying the type of distribution assumed for Y and X. Possible choices for |
The two independent random variables Y and X with given distribution
distr
are measurements of a certain characteristics on two different populations.
For the relationship of the parameter of interest (R) and nuisance parameters with
the original parameters of distr
, look at the details in loglik
.
Vector of estimetes of the nuisance parameters and the R quantity (parameter of interest), respectively.
Giuliana Cortese
Kotz S, Lumelskii Y, Pensky M. (2003). The Stress-Strength Model and its Generalizations. Theory and Applications. World Scientific, Singapore.
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # vector of MLEs for the nuisance parameters and the quantity R MLEs(Y, X, "norm_DV")
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # vector of MLEs for the nuisance parameters and the quantity R MLEs(Y, X, "norm_DV")
Compute confidence intervals and point estimates for the probability R, under parametric model assumptions for Y and X. Y and X are two independent continuous random variable from two different populations.
Prob(ydat, xdat, distr = "exp", method = "RPstar", level = 0.05)
Prob(ydat, xdat, distr = "exp", method = "RPstar", level = 0.05)
ydat |
data vector of the sample measurements from Y. |
xdat |
data vector of the sample measurements from X. |
distr |
character string specifying the type of distribution assumed for Y and X. Possible choices for |
method |
character string specifying the methodological approach used for inference (confidence intervals and point estimates) on the AUC.
The argument |
level |
it is the |
PROB |
Point estimate of |
C.Interval |
Confidence interval of R at confidence level |
Giuliana Cortese
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on . Computational Statistics, 28:1035-1059.
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) level <- 0.01 ## \eqn{\alpha} level # estimate and confidence interval under the assumption of two # normal variables with different variances. Prob(Y, X, "norm_DV", "RPstar", level) # method has to be set equal to "RPstar".
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) level <- 0.01 ## \eqn{\alpha} level # estimate and confidence interval under the assumption of two # normal variables with different variances. Prob(Y, X, "norm_DV", "RPstar", level) # method has to be set equal to "RPstar".
Plot of ROC curves estimated under parametric model assumptions on the continuous diagnostic marker.
ROC.plot(ydat, xdat, distr = "exp", method = "RPstar", mc = 1)
ROC.plot(ydat, xdat, distr = "exp", method = "RPstar", mc = 1)
ydat |
data vector of the diagnostic marker measurements on the sample of non-diseased individuals (from Y). |
xdat |
data vector of the diagnostic marker measurements on the sample of diseased individuals (from X). |
distr |
character string specifying the type of distribution assumed for Y and X. Possible choices for |
method |
character string specifying the methodological approach used for estimating the
probability R, which is here interpreted as the area under the ROC curve (AUC).
The argument |
mc |
a numeric value indicating single or multiple plots in the same figure.
In case |
If mc
is different from 1, method
does not need to be specified.
Plot of ROC curves
The two independent random variables Y and X with given distribution
distr
are measurements of the diagnostic marker on the diseased
and non-diseased subjects, respectively.
In "Wald" method, or equivalently "RP" method, MLEs for parameters of the Y and X distributions
are computed and then used to estimate specificity and sensitivity.
These measures are evaluated as and
, respectively.
In "RPstar" method, parameters of the Y and X distributions are estimated
from the -based estimate of the AUC.
Giuliana Cortese
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on . Computational Statistics, 28:1035-1059.
# data from the non-diseased population Y <- rnorm(15, mean=5, sd=1) # data from the diseased population X <- rnorm(10, mean=7, sd=1.5) ROC.plot(Y, X, "norm_DV", method = "RP", mc = 2)
# data from the non-diseased population Y <- rnorm(15, mean=5, sd=1) # data from the diseased population X <- rnorm(10, mean=7, sd=1.5) ROC.plot(Y, X, "norm_DV", method = "RP", mc = 2)
Compute the signed log-likelihood ratio statistic () for a given value
of the stress strength R = P(Y<X), that is the parameter of interest,
under given parametric model assumptions.
rp(ydat, xdat, psi, distr = "exp")
rp(ydat, xdat, psi, distr = "exp")
ydat |
data vector of the sample measurements from Y. |
xdat |
data vector of the sample measurements from X. |
psi |
scalar for the parameter of interest. It is the value of R, treated as a parameter under the parametric model construction. |
distr |
character string specifying the type of distribution assumed for Y and X.
Possible choices for |
The two independent random variables Y and X with given distribution
distr
are measurements of the diagnostic marker on the diseased
and non-diseased subjects, respectively.
For the relationship of the parameter of interest (R) and nuisance parameters with
the original parameters of distr
, look at the details in loglik
.
Value of the signed log-likelihood ratio statistic .
The values can be also used for testing statistical hypotheses on the probability R.
Giuliana Cortese
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on P(Y<X). Computational Statistics, 28:1035-1059.
Severini TA. (2000). Likelihood Methods in Statistics. Oxford University Press, New York.
Brazzale AR., Davison AC., Reid N. (2007). Applied Asymptotics. Case-Studies in Small Sample Statistics. Cambridge University Press, Cambridge.
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # value of \eqn{r_p} for \code{psi=0.9} rp(Y, X, 0.9,"norm_DV")
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # value of \eqn{r_p} for \code{psi=0.9} rp(Y, X, 0.9,"norm_DV")
Compute the modified signed log-likelihood ratio statistic () for a given value
of the stress strength R = P(Y<X), that is the parameter of interest,
under given parametric model assumptions.
rpstar(ydat, xdat, psi, distr = "exp")
rpstar(ydat, xdat, psi, distr = "exp")
ydat |
data vector of the sample measurements from Y. |
xdat |
data vector of the sample measurements from X. |
psi |
scalar for the parameter of interest. It is the value of R, treated as a parameter under the parametric model construction. |
distr |
character string specifying the type of distribution assumed for Y and X.
Possible choices for |
The two independent random variables Y and X with given distribution
distr
are measurements from two different populations.
For the relationship of the parameter of interest (R) and nuisance parameters with
the original parameters of distr
, look at the details in loglik
.
rp |
Value of the signed log-likelihood ratio statistic |
rp_star |
Value of the modified signed log-likelihood ratio statistic |
The statistic is a modified version of
which provides
more statistically accurate estimates.
The
values can be also used for testing statistical hypotheses on the probability R.
Giuliana Cortese
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on P(Y<X). Computational Statistics, 28:1035-1059.
Severini TA. (2000). Likelihood Methods in Statistics. Oxford University Press, New York.
Brazzale AR., Davison AC., Reid N. (2007). Applied Asymptotics. Case-Studies in Small Sample Statistics. Cambridge University Press, Cambridge.
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # value of \eqn{r_p^*} for \code{psi=0.9} rpstar(Y, X, 0.9,"norm_DV") # method has be set equal to "RPstar".
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # value of \eqn{r_p^*} for \code{psi=0.9} rpstar(Y, X, 0.9,"norm_DV") # method has be set equal to "RPstar".
Compute the Wald statistic for a given value of the stress-strength R = P(Y<X), that is the parameter of interest, under given parametric model assumptions.
wald(ydat, xdat, psi, distr = "exp")
wald(ydat, xdat, psi, distr = "exp")
ydat |
data vector of the sample measurements from Y. |
xdat |
data vector of the sample measurements from X. |
psi |
scalar for the parameter of interest. It is the value of the quantity R, treated as a parameter under the parametric model construction. |
distr |
character string specifying the type of distribution assumed for Y and X.
Possible choices for |
The two independent random variables Y and X with given distribution
distr
are measurements from two different populations.
For the relationship of the parameter of interest (R) and nuisance parameters with
the original parameters of distr
, look at the details in loglik
.
Wald |
Value of the Wald statistic for a given |
Jphat |
Observed profile Fisher information |
Values of the Wald statistic can be also used for testing statistical hypotheses on the probability R.
Giuliana Cortese
Cortese G., Ventura L. (2013). Accurate higher-order likelihood inference on P(Y<X). Computational Statistics, 28:1035-1059.
Brazzale AR., Davison AC., Reid N. (2007). Applied Asymptotics. Case-Studies in Small Sample Statistics. Cambridge University Press, Cambridge.
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # value of Wald for \code{psi=0.9} wald(Y, X, 0.9,"norm_DV")
# data from the first population Y <- rnorm(15, mean=5, sd=1) # data from the second population X <- rnorm(10, mean=7, sd=1.5) # value of Wald for \code{psi=0.9} wald(Y, X, 0.9,"norm_DV")