clikcorr {clikcorr} | R Documentation |
Censoring data and LIKelihood-based CORRelation estimation and inference
Description
A profile likelihood based method of estimation and hypothesis testing on the correlation coefficient of bivariate data with different types of cencoring.
Usage
clikcorr(data, lower1, upper1, lower2, upper2, cp = 0.95, dist = "n",
df = 4, sv = NA, nlm = FALSE, ...)
## Default S3 method:
clikcorr(data, lower1, upper1, lower2, upper2, cp = 0.95, dist = "n",
df = 4, sv = NA, nlm = FALSE, ...)
## S3 method for class 'clikcorr'
print(x, ...)
## S3 method for class 'clikcorr'
summary(object, ...)
Arguments
data |
a data frame name. |
lower1 |
the lower bound of the first of the two variables whose correlation coefficient to be calculated. |
upper1 |
the upper bound of the first of the two variables whose correlation coefficient to be calculated. |
lower2 |
the lower bound of the second of the two variables whose correlation coefficient to be calculated. |
upper2 |
the upper bound of the second of the two variables whose correlation coefficient to be calculated. |
cp |
confidence level for the confidence interval. |
dist |
working distribution. By default, |
df |
degree of freedom of the bivariate t-distribution when |
sv |
user specified starting values for the vector of (mean1, mean2, var1, corr, var2). |
nlm |
use |
x |
an object of class |
object |
an object of class |
... |
not used. |
Details
clikcorr
conducts point estimation and hypothesis testing on the correlation coefficient of bivariate data with different types of cencoring.
Value
A list with components:
pairName |
variable names for the input paired data structure in the |
pairData |
a paired data structure in the |
dist |
Normal or t distribution. |
df |
degree of freedom for t distribution. |
coefficients |
maximum likelihood estimate (MLE) of the correlation coefficient. |
Cov |
estimated variance covariance matrix. |
Mean |
estimated means. |
CI |
unsymmetric profile confidence interval for the estimated correlation coefficient. |
P0 |
p-value for likelihood ratio test with null hypothesis says that the true correlation coefficient equals zero. |
logLik |
the value of the log likelihood at MLE. |
Author(s)
Yanming Li, Kerby Shedden, Brenda W. Gillespie and John A. Gillespie.
References
Yanming Li, Kerby Shedden, Brenda W. Gillespie and John A. Gillespie (2016). Calculating Profile Likelihood Estimates of the Correlation Coefficient in the Presence of Left, Right or Interval Censoring and Missing Data.
Examples
data(ND)
logND <- log(ND)
logND1 <- logND[51:90,]
obj <- clikcorr(logND1, "t1_OCDD", "t2_OCDD", "t1_HxCDF_234678", "t2_HxCDF_234678")
## Not run:
clikcorr(logND, "t1_OCDD", "t2_OCDD", "t1_HxCDF_234678", "t2_HxCDF_234678")
clikcorr(logND, "t1_OCDD", "t2_OCDD", "t1_HxCDF_234678", "t2_HxCDF_234678",
nlm=TRUE)
clikcorr(logND, "t1_OCDD", "t2_OCDD", "t1_HxCDF_234678", "t2_HxCDF_234678",
method="BFGS")
clikcorr(logND, "t1_OCDD", "t2_OCDD", "t1_HxCDF_234678", "t2_HxCDF_234678",
sv=c(5,-0.5,0.6,0.5,0.6))
clikcorr(logND, "t1_OCDD", "t2_OCDD", "t1_HxCDF_234678", "t2_HxCDF_234678",
dist="t", df=10, nlm=TRUE)
## End(Not run)
print(obj)
summary(obj)