Description Usage Arguments Value See Also Examples
View source: R/Stat_test_Delta_AUC_Group_Specific.R
This function performs the t-test evaluating whether the difference of area under the curve of two marginal dynamics, modeled by group-structured polynomials or B-spline curve in Mixed-Effects model, is null.
1 2 3 4 5 6 7 | Stat_test_Delta_AUC_Group_Specific(
MEM_Pol_group,Group1,Group2,
time.G1,time.G2,common.interval = TRUE,
method = "trapezoid",Group.dependence = TRUE,
Averaged = FALSE,conf_level = 0.95,
alternative = "two.sided"
)
|
MEM_Pol_group |
A list with similar structure than the output provided by the function MEM_Polynomial_Group_structure. A list containing:
|
Group1 |
a character scalar indicating the name of the first group whose marginal dynamics must be considered. This group name must belong to the set of groups involved in the MEM (see |
Group2 |
a character scalar indicating the name of the second group whose marginal dynamics must be considered. This group name must belong to the set of groups involved in the MEM (see |
time.G1 |
a numerical vector of time points (x-axis coordinates) to use for the Group1 AUC calculation. |
time.G2 |
a numerical vector of time points (x-axis coordinates) to use for the Group2 AUC calculation. |
common.interval |
a logical scalar. If FALSE, the difference of AUC is calculated as the difference of AUCs where the AUC of each group is calculated on its specific interval of time. If TRUE (default), the difference of AUC is estimated on a common interval of time defined as the intersect of the two group-specific interval (see Group_specific_Delta_AUC_estimation for more details about calculation). |
method |
a character scalar indicating the interpolation method to use to estimate the AUC. Options are 'trapezoid' (default), 'lagrange' and 'spline'. In this version, the 'spline' interpolation is implemented with "not-a-knot" spline boundary conditions. |
Group.dependence |
a logical scalar indicating whether the two groups, whose the difference of AUC (ΔAUC) is studied, are considered as dependent. By default, this variable is defined as TRUE. |
Averaged |
a logical scalar. If TRUE, the function return the difference of normalized AUC (nAUC) where nAUC is computated as the AUC divided by the range of time of calculation. If FALSE (default), the classic AUC is calculated. |
conf_level |
a numerical value (between 0 and 1) indicating the confidence level of the interval. By default, this variable is fixed at 0.95 |
alternative |
a character scalar specifying the alternative hypothesis. Options are 'two.sided' (default), 'greater' or 'less'. |
A list containing:
Tstat
: the value of the t-statistic.
Pvalue
: the P-value.
Conf.int
: the confidence interval.
Delta_AUC
: the estimated value of the difference of AUC between the two groups (nAUC2 - nAUC1) (see Group_specific_Delta_AUC_estimation
for more details).
AUCs
: the estimated values of the Group-specific AUC (AUC1 and AUC 2)
(see Group_specific_AUC_estimation
for more details).
MEM_Polynomial_Group_structure
,
Group_specific_Delta_AUC_estimation
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Download of data
data("HIV_Simu_Dataset_Delta01_cens")
data <- HIV_Simu_Dataset_Delta01_cens
# Change factors in character vectors
data$id <- as.character(data$id) ; data$Group <- as.character(data$Group)
MEM_estimation <- MEM_Polynomial_Group_structure(y=data$VL,x=data$time,Group=data$Group,
Id=data$id,Cens=data$cens)
time_group1 <- unique(data$time[which(data$Group=="Group1")])
time_group2 <- unique(data$time[which(data$Group=="Group2")])
Test <- Stat_test_Delta_AUC_Group_Specific(MEM_Pol_group=MEM_estimation,
Group1="Group1",Group2="Group2",
time.G1=time_group1,time.G2=time_group2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.