auc: Estimation of confidence intervals for the area under the...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/auc.R

Description

Calculation of confidence intervals for an area under the concentration versus time curve (AUC) or for the difference between two AUCs assessed in complete and incomplete data designs.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
auc(conc, time, group=NULL, method=c("t", "z", "boott"), 
     alternative=c("two.sided", "less", "greater"), 
     conf.level=0.95, strata=NULL, nsample=1000, 
     design=c("ssd","batch","complete"), data)	     

auc.ssd(conc, time, group=NULL, method=c("t", "z", "boott"), 
     alternative=c("two.sided", "less", "greater"), 
     conf.level=0.95, strata=NULL, nsample=1000, data)	     

auc.batch(conc, time, group=NULL, method=c("t", "z", "boott"), 
     alternative=c("two.sided", "less", "greater"), 
     conf.level=0.95, nsample=1000, data)	     

Arguments

conc

Levels of concentrations. For batch designs a list is required, while a vector is expected otherwise.

time

Time points of concentration assessment. For batch designs a list is required, while a vector is expected otherwise. One time point for each concentration measured needs to be specified.

group

A grouping variable (default=NULL). For batch designs a list is required, while a vector is expected otherwise. If specified, a confidence interval for the difference of independent AUCs will be calculated.

method

A character string specifying the method for calculation of confidence intervals (default=c("t", "z", "boott")).

alternative

A character string specifying the alternative hypothesis. Possible values are "less", "greater" and "two.sided" (the default).

conf.level

Confidence level (default=0.95).

strata

A vector of one strata variable (default=NULL). Only available for method boott in a serial sampling design.

nsample

Number of bootstrap iterations for method boott (default=1000).

design

A character string indicating the type of design used. Possible values are "ssd" for a serial sampling design, "batch" for a batch design and "complete" for a complete data design.

data

Optional data frame containing variables named as id, conc, time and group.

Details

Calculation of confidence intervals for an AUC (from 0 to the last time point) or for the difference between two AUCs for serial sampling, batch and complete data designs. In a serial sampling design only one measurement is available per subject, while in a batch design multiple (but not necessarily all) time points are measured for each subject. In a complete data design measurements are taken for all subjects at all time points. The AUC (from 0 to the last time point) is calculated using the linear trapezoidal rule on the arithmetic means at the different time points.

If group=NULL a confidence interval for an AUC is calculated. If group specifies a factor variable with exactly two levels, a confidence interval for the difference between two independent AUCs is calculated. To obtain confidence intervals for dependent AUCs simply use the difference in concentrations for conc. See the example below.

The t method uses the critical value from a t-distribution with Satterthwaite's approximation (Satterthwaite, 1946) to the degrees of freedom for calculation of confidence intervals as presented in Tang-Liu and Burke (1988), Nedelman et al (1995), Holder et al (1999), Jaki and Wolfsegger (2009) and Jaki and Wolfsegger (2012). The z method uses the critical value from a normal distribution for calculation of confidence intervals as presented in Bailer (1988) or in Jaki and Wolfsegger (2009). The boott method uses bootstrap-t confidence intervals as presented in Jaki and Wolfsegger (2009). Using boott an additional strata variable for bootstrapping can be specified in the case of serial sampling.

For serial sampling designs missing data are omitted and unequal sample sizes per time point are allowed. For batch designs missing values are not permitted and at least two subjects are required per batch.

If data is specified the variable names conc, time and group are required and represent the corresponding variables. If design is batch an additional variable id is required to identify the subject.

NOTE: Confidence intervals for AUCs assessed in complete data designs are found using a batch design with one batch based on the asymptotic normal distribution. Conventionally, AUCs are assumed to be log-normal distributed. See the help file auc.complete for some corresponding examples.

Value

An object of the class PK containing the following components:

est

Point estimates.

CIs

Point estimates, standard errors and confidence intervals.

conc

Levels of concentrations.

conf.level

Confidence level.

design

Sampling design used.

group

Grouping variable.

time

Time points measured.

Note

This is a wrapper function for auc.complete, auc.batch and auc.ssd. The function calculates point and interval estimates for AUC (from 0 to the last time point).

Author(s)

Thomas Jaki and Martin J. Wolfsegger

References

Bailer A. J. (1988). Testing for the equality of area under the curves when using destructive measurement techniques. Journal of Pharmacokinetics and Biopharmaceutics, 16(3):303-309.

Gibaldi M. and Perrier D. (1982). Pharmacokinetics. Marcel Dekker, New York and Basel.

Holder D. J., Hsuan F., Dixit R. and Soper K. (1999). A method for estimating and testing area under the curve in serial sacrifice, batch, and complete data designs. Journal of Biopharmaceutical Statistics, 9(3):451-464.

Jaki T. and Wolfsegger M. J. (2012). Non-compartmental estimation of pharmacokinetic parameters for flexible sampling designs. Statistics in Medicine, 31(11-12):1059-1073.

Jaki T. and Wolfsegger M. J. (2009). A theoretical framework for estimation of AUCs in complete and incomplete sampling designs. Statistics in Biopharmaceutical Research, 1(2):176-184.

Nedelman J. R., Gibiansky E. and Lau D. T. W. (1995). Applying Bailer's method for AUC confidence intervals to sparse sampling. Pharmaceutical Research, 12(1):124-128.

Satterthwaite F. E. (1946). An approximate distribution of estimates of variance components. Biometrics Bulletin, 2:110-114.

Tang-Liu D. D.-S. and Burke P. J. (1988). The effect of azone on ocular levobunolol absoprtion: Calculating the area under the curve and its standard error using tissue sampling compartments. Pharmaceutical Research, 5(4):238-241.

Wolfsegger M. J. and Jaki T. (2009) Assessing systemic drug exposure in repeated dose toxicity studies in the case of complete and incomplete sampling. Biometrical Journal, 51(6):1017:1029.

See Also

auc.complete, nca, eqv, estimator, ci and test.

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#### serial sampling design:
## example from Bailer (1988)
time <- c(rep(0,4), rep(1.5,4), rep(3,4), rep(5,4), rep(8,4))
grp1 <- c(0.0658, 0.0320, 0.0338, 0.0438, 0.0059, 0.0030, 0.0084,
          0.0080, 0.0000, 0.0017, 0.0028, 0.0055, 0.0000, 0.0037,
          0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)

grp2 <- c(0.2287, 0.3824, 0.2402, 0.2373, 0.1252, 0.0446, 0.0638,
          0.0511, 0.0182, 0.0000, 0.0117, 0.0126, 0.0000, 0.0440,
          0.0039, 0.0040, 0.0000, 0.0000, 0.0000, 0.0000)

grp3 <- c(0.4285, 0.5180, 0.3690, 0.5428, 0.0983, 0.0928, 0.1128,
          0.1157, 0.0234, 0.0311, 0.0344, 0.0349, 0.0032, 0.0052,
          0.0049, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)

auc(conc=grp1, time=time, method='z', design='ssd')
auc(conc=grp2, time=time, method='z', design='ssd')
auc(conc=grp3, time=time, method='z', design='ssd')

## function call with data frame using simultaneous confidence intervals based 
## on bonferroni adjustment
data <- data.frame(conc=c(grp1, grp2, grp3), time=rep(time, 3),
                   group=c(rep(1, length(grp1)), rep(2, length(grp2)), 
                   rep(3, length(grp3))))

auc(subset(data, group==1 | group==2)$conc, subset(data, group==1 | group==2)$time, 
    group=subset(data, group==1 | group==2)$group, method=c('z', 't'), 
    conf.level=1-0.05/3, design='ssd')

auc(subset(data, group==1 | group==3)$conc, subset(data, group==1 | group==2)$time, 
    group=subset(data, group==1 | group==3)$group, method=c('z', 't'), 
    conf.level=1-0.05/3, design='ssd')

auc(subset(data, group==2 | group==3)$conc, subset(data, group==1 | group==2)$time, 
    group=subset(data, group==2 | group==3)$group, method=c('z', 't'), 
    conf.level=1-0.05/3, design='ssd')

## example from Nedelman et al. (1995)
data(CPI975)
data <- CPI975[CPI975[,'dose']>=30 ,]

auc(data=subset(data,sex=='m' & dose==30), method=c('z', 't'), design='ssd')
auc(data=subset(data,sex=='f' & dose==30), method=c('z', 't'), design='ssd')

auc(data=subset(data,sex=='m' & dose==100), method=c('z', 't'), design='ssd')
auc(data=subset(data,sex=='f' & dose==100), method=c('z', 't'), design='ssd')

## comparing dose levels
data$concadj <- data$conc / data$dose
data.100 <- subset(data, dose==100)
data.030 <- subset(data, dose==30)
res.100 <- auc(conc=data.030$concadj, time=data.030$time, method='t', design='ssd')
res.030 <- auc(conc=data.100$concadj, time=data.100$time, method='t', design='ssd')
plot(res.030, ylim=c(0, 140), xlim=c(0,25), pch=19, ylab='Dose-normalized concentration', 
      main='Comparison of doses')
plot(res.100, col='red', pch=21, add=TRUE)
legend(x=25, y=140, xjust=1, lty=1, col=c('black','red'), 
       legend=c('Dose of 30', 'Dose of 100'))

res <- auc(conc=data$concadj, time=data$time, group=data$dose, method=c('t','z'), 
            design='ssd')
print(res)
summary(res)

## comparing two dose level using stratified resampling per gender
## caution this might take a few minutes
set.seed(260151)
auc(conc=data$concadj, time=data$time, group=data$dose, method='boott',
    strata=data$sex, design='ssd', nsample=500)

#### batch design:
## a batch design example from Holder et al. (1999).
data(Rats)
data <- subset(Rats,Rats$dose==100)

# two-sided CI: data call
auc(data=data,method=c('z','t'), design='batch')
# one-sided CI: data call
auc(data=data,method=c('z','t'), alternative="less", design='batch')

## difference of two AUCs in batch design from Jaki and Wolfsegger (2009),
## originally in Holder et al. (1999).
data <- subset(Rats,Rats$dose==100 | Rats$dose==300 )
data$group <- data$dose
data$conc <- data$conc / data$dose

## data call
res1 <- auc(data=subset(data, dose==100), method='z', design='batch')
res2 <- auc(data=subset(data, dose==300), method='z', design='batch')
plot(res1, col='black', ylim=c(0,0.06), xlim=c(0,25), ylab='Dose-normalized concentration', 
      main='Comparison of doses')
plot(res2, col='red', add=TRUE)
legend(x=0, y=0.06, lty=1, col=c('black','red'), 
       legend=c('Dose of 100', 'Dose of 300'))

auc(data=data, method='z', design='batch')


## difference of two dependent AUCs in a batch design from Wolfsegger and Jaki (2009)
conc <- list(batch1=c(0.46,0.2,0.1,0.1, 1.49,1.22,1.27,0.53, 0.51,0.36,0.44,0.28),
             batch2=c(1.51,1.80,2.52,1.91, 0.88,0.66,0.96,0.48),
             batch3=c(1.52,1.46,2.55,1.04, 0.54,0.61,0.55,0.27))
time <- list(batch1=c(0,0,0,0,1.5,1.5,1.5,1.5,10.5,10.5,10.5,10.5),
             batch2=c(5/60,5/60,5/60,5/60,4,4,4,4),
             batch3=c(0.5,0.5,0.5,0.5,7,7,7,7))
group <- list(batch1=c(1,1,2,2,1,1,2,2,1,1,2,2),batch2=c(1,1,2,2,1,1,2,2),
              batch3=c(1,1,2,2,1,1,2,2))

# find difference in concentration and the corresponding times
dconc <- NULL
dtime <- NULL
grps <- unique(unlist(group))
B <- length(conc)
for(i in 1:B){
    dconc[[i]] <- conc[[i]][group[[i]]==grps[1]] - conc[[i]][group[[i]]==grps[2]]
    dtime[[i]] <- time[[i]][group[[i]]==grps[1]]
}
names(dconc) <- names(conc)

auc(conc=dconc, time=dtime, group=NULL, method="t", conf.level=0.90, design="batch")

## example with overlapping batches (Treatment A in Example of Jaki & Wolfsegger 2012)
conc <- list(batch1=c(0,0,0,0, 69.7,37.2,213,64.1,  167,306,799,406, 602,758,987,627,
                      1023,1124,1301,880, 1388,1374,1756,1120, 1481,1129,1665,1598,
                      1346,1043,1529,1481, 658,576,772,851, 336,325,461,492, 
                      84,75.9,82.6,116),
             batch2=c(0,0,0, 29.2,55.9,112.2, 145,153,169, 282,420,532, 727,1033,759, 
                      1360,1388,1425, 1939,1279,1318, 1614,1205,1542, 1238,1113,1386,
                      648,770,786, 392,438,511, 77.3,90.1,97.9))
time <- list(batch1=rep(c(0,0.5,0.75,1,1.5,2,3,4,8,12,24),each=4),
             batch2=rep(c(0,0.25,0.5,0.75,1,1.5,2,3,4,8,12,24),each=3))

auc.batch(conc,time,method=c("t","z"),conf.level=0.9)

#### complete data design:
## example from Gibaldi and Perrier (1982, page 436) for an individual AUC
time <- c(0, 0.165, 0.5, 1, 1.5, 3, 5, 7.5, 10)
conc <- c(0, 65.03, 28.69, 10.04, 4.93, 2.29, 1.36, 0.71, 0.38)
auc(conc=conc, time=time, design="complete")

## data Indometh
require(datasets)
Indometh$id <- as.character(Indometh$Subject)
Indometh <- Indometh[order(Indometh$id, Indometh$time),]
Indometh <- Indometh[order(Indometh$time),]
res <- auc.complete(conc=Indometh$conc, time=Indometh$time, method='t')
plot(res)

## more informative plot 
split.screen(c(1,2))
screen(1)
plot(x=c(0,8), y=c(0, 3), type='n', main='Observed concentration time-profiles', 
     xlab='Time', ylab='Concentration', las=1)
for(i in unique(Indometh$Subject)){
   temp <- subset(Indometh, Subject==i)
   points(x=temp$time, y=temp$conc, type='b')
}
screen(2)
plot(x=c(0,8), y=c(0.01, 9), type='n', main='Log-linear concentration time-profiles', 
     xlab='Time', ylab='Log of concentration', yaxt='n', log='y')
axis(side=2, at=c(0.01, 0.1, 1, 10), labels=c('0.01', '0.1', '1', '10'), las=1)
axis(side=2, at=seq(0.01, 0.1, 0.01), tcl=-0.2, labels=FALSE)
axis(side=2, at=seq(0.1, 1, 0.1), tcl=-0.2, labels=FALSE)
axis(side=2, at=seq(1, 10, 1), tcl=-0.2, labels=FALSE)
for(i in unique(Indometh$Subject)){
   temp <- subset(Indometh, Subject==i)
   points(x=temp$time, y=temp$conc, type='b')
}
close.screen(all = TRUE)

Example output

 **********   PK Version 1.3-3********** 

Type PKNews() to see new features/changes/bug fixes.

Estimation for a serial sampling design

             Estimate    SE      95% z-CI
AUC to tlast    0.049 0.007 (0.036;0.062)

Estimation for a serial sampling design

             Estimate    SE      95% z-CI
AUC to tlast    0.362 0.047 (0.269;0.455)

Estimation for a serial sampling design

             Estimate    SE      95% z-CI
AUC to tlast    0.568 0.032 (0.506;0.631)

Estimation for a serial sampling design

                            Estimate    SE 98.3333333333333% t-CI
difference of AUCs to tlast   -0.313 0.048        (-0.451;-0.175)

                            Estimate    SE 98.3333333333333% z-CI
difference of AUCs to tlast   -0.313 0.048        (-0.428;-0.198)

Estimation for a serial sampling design

                            Estimate    SE 98.3333333333333% t-CI
difference of AUCs to tlast   -0.519 0.032        (-0.648;-0.391)

                            Estimate    SE 98.3333333333333% z-CI
difference of AUCs to tlast   -0.519 0.032        (-0.597;-0.441)

Estimation for a serial sampling design

                            Estimate    SE 98.3333333333333% t-CI
difference of AUCs to tlast   -0.206 0.057         (-0.363;-0.05)

                            Estimate    SE 98.3333333333333% z-CI
difference of AUCs to tlast   -0.206 0.057         (-0.343;-0.07)

Estimation for a serial sampling design

             Estimate      SE            95% t-CI
AUC to tlast 26765.80 4313.42 (-5469.65;59001.25)

             Estimate      SE            95% z-CI
AUC to tlast 26765.80 4313.42 (18311.65;35219.95)

Estimation for a serial sampling design

             Estimate      SE            95% t-CI
AUC to tlast 15627.50 1097.27 (12248.14;19006.86)

             Estimate      SE            95% z-CI
AUC to tlast 15627.50 1097.27 (13476.90;17778.10)

Estimation for a serial sampling design

             Estimate       SE             95% t-CI
AUC to tlast 90749.00 10334.46 (32680.23;148817.77)

             Estimate       SE             95% z-CI
AUC to tlast 90749.00 10334.46 (70493.82;111004.18)

Estimation for a serial sampling design

             Estimate      SE            95% t-CI
AUC to tlast 59886.00 5752.50 (33477.66;86294.34)

             Estimate      SE            95% z-CI
AUC to tlast 59886.00 5752.50 (48611.31;71160.69)

Estimation for a serial sampling design

                            Estimate     SE         95% t-CI
difference of AUCs to tlast   -46.62 128.60 (-325.22;231.98)

                            Estimate     SE         95% z-CI
difference of AUCs to tlast   -46.62 128.60 (-298.67;205.43)

Confidence intervals for a serial sampling design

 Point estimate

                               est       se
difference of AUCs to tlast -46.62 128.5978

 Confidence Intervals

                                                   lower    upper
95% CI using a t distribution for AUC to tlast -325.2193 231.9793
95% CI using a z distribution for AUC to tlast -298.6670 205.4270

degrees of freedom: 12.65113
Estimation for a serial sampling design

                            Estimate     SE    95% boott-CI
difference of AUCs to tlast   -46.62 128.60 (-180.35;96.67)

Estimation for a batch design

             Estimate   SE      95% t-CI
AUC to tlast    39.47 7.31 (14.94;64.00)

             Estimate   SE      95% z-CI
AUC to tlast    39.47 7.31 (25.14;53.80)

Estimation for a batch design

             Estimate   SE    95% t-CI
AUC to tlast    39.47 7.31 (21.60;Inf)

             Estimate   SE    95% z-CI
AUC to tlast    39.47 7.31 (27.45;Inf)

Estimation for a batch design

                            Estimate    SE     95% z-CI
difference of AUCs to tlast    0.192 0.087 (0.02;0.363)

Estimation for a batch design

             Estimate   SE     90% t-CI
AUC to tlast     1.25 1.25 (-2.90;5.41)

Estimation for a batch design

             Estimate     SE            90% t-CI
AUC to tlast 13671.07 592.26 (12476.44;14865.71)

             Estimate     SE            90% z-CI
AUC to tlast 13671.07 592.26 (12696.88;14645.26)

Estimation for a complete data design

             Estimate SE 95% t-CI
AUC to tlast    47.50 NA  (NA;NA)

Confidence intervals for AUCs are found using a batch design with one batch. Please see the help file "auc.complete" for some alternative examples.
[1] 1 2

PK documentation built on April 3, 2020, 1:07 a.m.

Related to auc in PK...