Type: Package
Title: Computing Mann-Whitney Effect Based on Copulas
Version: 0.1.1
Description: Computing the Mann-Whitney effect based on copula models. Estimation of the association parameter in survival copula models. A description of the underlying methods is described in Nakazono et al. (2024) <doi:10.3390/math12101453> and Nakazono et al. (accepted for publication in Statistical Papers).
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: survival, tidyverse, ggplot2, purrr, dplyr, tidyr
Suggests: spelling
Language: en-US
NeedsCompilation: no
Packaged: 2025-10-29 08:34:29 UTC; nakazono_kosuke
Author: Kosuke Nakazono [aut, cre]
Maintainer: Kosuke Nakazono <nakazono@ism.ac.jp>
Repository: CRAN
Date/Publication: 2025-11-03 08:50:02 UTC

Parametric calculation for the Mann-Whitney effect under the parametric copulas

Description

MW.Copula provides a parametric estimator and confidence interval for the Mann-Whitney effect under the parametric survival functions and copulas. The result of this function includes results for logit-transformed estimators. See Nakazono, et al. (2025) for details.

Usage

MW.Copula(
t.event, event, group,
copula = c("clayton", "gumbel", "frank", "fgm", "gb"),
copula.param = 1,
s1 = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
s2 = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
par1 = c(0, 0),
par2 = c(0, 0),
alpha = 0.05,
logit = FALSE
)

Arguments

t.event

a vector of time-to-event data.

event

a vector for event indicator.

group

a vector for group indicator.

copula

copula family.

copula.param

the copula parameter.

s1

a parametric survival function for S1. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

s2

a parametric survival function for S2. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

par1

initial value(s) for the parameters of S1.

par2

initial value(s) for the parameters of S2.

alpha

significance level.

logit

logical; if TRUE, the estimator and CI is logit-transformed.

Value

parameter: a vector of MLE.

estimate: the Mann-Whitney effect estimator

SE: the standard error

CI: the 1-alpha% confidence interval for Mann-Whitney effect

P.value: the P-value for testing the null hypothesis H0: p=1/2.

kendall: Kendall's tau

logit: the estimator and CI are logit-transformed or not.

References

Nakazono, K., Uozumi, R., & Emura, T. (2025). Parametric inference for the Mann-Whitney effect under survival copula models, Statistical Papers, in press.

Examples

##Mann-Whitney effect under exponential distributions
#set distribution parameter
lambda1 = 1
lambda2 = 2

#generate time to event
u = runif(100)
t.event1 = -log(u) / lambda1
t.event1 = sort(t.event1)

v = runif(100)
t.event2 = -log(v) / lambda2
t.event2 = sort(t.event2)

#censoring indicator
t1c = runif(100, 0, 1.5)
t.event1 = (t1c >= t.event1) * t.event1 + (t1c < t.event1) * t1c
event1 = 1 * (t1c > t.event1)

t2c = runif(100, 0, 0.8)
t.event2 = (t2c >= t.event2) * t.event2 + (t2c < t.event2) * t2c
event2 = 1 * (t2c > t.event2)

t.event = c(t.event1, t.event2)
event = c(event1, event2)

#group indicator
group = rep(c(1, 0), each = 100)

MW.Copula(t.event, event, group,
          copula = "clayton", copula.param = 1,
          s1 = "exponential", s2 = "exponential", par1 = c(0, 0), par2 = c(0, 0), logit = FALSE)



Parametric calculation for the Mann-Whitney effect under survival copula models

Description

MW.comp provides a parametric estimator for the Mann-Whitney effect under the parametric survival functions and copulas. See Nakazono, et al.(2024) for details.

Usage

MW.comp(
copula = c("clayton", "gumbel", "frank", "fgm", "gb"),
copula.param = 1,
s1 = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
S1.param,
s2 = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
S2.param
)

Arguments

copula

copula family. Available options include; "clayton", "gumbel", "frank", "fgm", "gb".

copula.param

the copula parameter.

s1

a parametric survival function for S1. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

S1.param

the distribution parameter for S1.

s2

a parametric survival function for S2. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

S2.param

the distribution parameter for S2.

Details

copula.param is restricted as below:

Value

estimate of the Mann-Whitney effect.

References

Nakazono, K., Lin, Y. C., Liao, G. Y., Uozumi, R., & Emura, T. (2024). Computation of the Mann–Whitney effect under parametric survival copula models. Mathematics, 12(10), 1453.

Examples

# Under the exponential survival functions and Clayton copula
MW.comp(
  copula = "clayton",
  copula.param = 1,
  s1 = "exponential",
  S1.param = 1,
  s2 = "exponential",
  S2.param = 2
)



Plot method for Mann-Whitney effect under parametric copula models

Description

MW.plot plots the results, the parametric estimator and their confidence intervals, for the Mann-Whitney effect under parametric survival functions and copulas.

Usage

MW.plot(t.event, event, group,
copula = c("clayton", "gumbel", "frank", "fgm", "gb"),
lower = 0, upper = 1,
s1 = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
s2 = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
par1 = c(0, 0),
par2 = c(0, 0),
alpha = 0.05,
logit = FALSE,
xaxis = 2
)

Arguments

t.event

a vector for time-to-event.

event

a vector for event indicator.

group

a vector for group indicator.

copula

copula family.

lower

the lower end points of the interval of the copula parameter.

upper

the lower end points of the interval of the copula parameter.

s1

a parametric survival function for S1. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

s2

a parametric survival function for S2. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

par1

initial value(s) for the parameters of S1.

par2

initial value(s) for the parameters of S2.

alpha

significance level.

logit

logical; if TRUE, the estimator and CI is logit-transformed.

xaxis

a indicator specifying whether the xaxis is the copula parameter (xaxis = 1) or Kendall's tau (xaxis = 2).

Value

No return value, called for side effects (generates a plot).

Examples

##Exponential distributions
#set distribution parameter
lambda1 = 1
lambda2 = 2

#generate time to event
u = runif(100)
t.event1 = -log(u) / lambda1
t.event1 = sort(t.event1)

v = runif(100)
t.event2 = -log(v) / lambda2
t.event2 = sort(t.event2)

#censoring indicator
t1c = runif(100, 0, 1.5)
t.event1 = (t1c >= t.event1) * t.event1 + (t1c < t.event1) * t1c
event1 = 1 * (t1c > t.event1)

t2c = runif(100, 0, 0.8)
t.event2 = (t2c >= t.event2) * t.event2 + (t2c < t.event2) * t2c
event2 = 1 * (t2c > t.event2)

t.event = c(t.event1, t.event2)
event = c(event1, event2)

#group indicator
group = rep(c(1, 0), each = 100)

MW.plot(t.event, event, group,
          copula = "clayton",
          lower = 0.2, upper = 0.8,
          s1 = "exponential", s2 = "exponential",
          par1 = c(0, 0), par2 = c(0, 0), alpha = 0.05, logit = FALSE, xaxis = 2)



Maximum likelihood estimation under parametric survival function

Description

survival.mle provides the maximum likelihood estimator and their variance-covariance matrix under parametric survival functions. This function also provides AIC and Kolmogorov-Smirnov distance to evaluate the model fitting.

Usage

survival.mle(
t.event,
event,
distribution = c("exponential", "weibull", "gamma", "log-normal", "burr3"),
par = c(0,0))

Arguments

t.event

a vector for time-to-event.

event

a vector for event indicator.

distribution

a parametric distribution for survival function. Available options include; "exponential", "weibull", "gamma", "log-normal", "burr3".

par

initial value(s) for the distribution parameters.

Value

estimate: a vector of MLE.

var: variance-covariance matrix of MLE.

AIC: Akaike information criteria.

KS: Kolmogorov-Smirnov distance between MLE and KM estimator.

Examples

#MLE under exponential distribution
#set distribution parameter
lambda = 1

#generate time to event
u = runif(100)
t.event = -log(u)/lambda
t.event = sort(t.event)

#censoring indicator
tc = runif(100, 0, 1.5)
t.event = (tc >= t.event) * t.event + (tc < t.event) * tc
event = 1 * (tc > t.event)

survival.mle(t.event, event, distribution = "exponential")



mirror server hosted at Truenetwork, Russian Federation.