HSROC: A function for joint meta-analysis of sensitivity and...

Description Usage Arguments Details Value References Examples

Description

This function is used to estimate the parameters of a hierarchical summary receiver operating characteristic (HSROC) model allowing for the reference standard to be possibly imperfect, and assuming it is conditionally independent from the test under evaluation. The estimation is carried out using a Gibbs sampler.

Usage

1
2
3
4
5
6
HSROC(data, iter.num, init = NULL, sub_rs=NULL, 
  first.run = TRUE, path=getwd(), refresh = 100, 
  prior.SEref=NULL, prior.SPref=NULL, prior_PI=c(0,1), 
  prior_LAMBDA = c(-3,3), prior_THETA = c(-1.5,1.5), 
  prior_sd_alpha = list(0,2,"sd"), prior_sd_theta = list(0,2,"sd"), 
  prior_beta = c(-0.75,0.75)) 

Arguments

data

a matrix with the number of rows equal to the number of studies and 4 columns. Each row consists of the entries of the 2x2 table of the index test (i.e. test under evaluation) vs. the reference test reported in each study. The ordering of the columns is ++, +-, -+, –, where the first entry refers to the result of the test under evaluation and the second entry refers to the result of the reference test.

iter.num

the number of iterations of the Gibbs sampler.

init

a list of initial values. See details for further explanation.

sub_rs

a list that describes the partition of the reference standards among the studies, if any. The first element of the list is the number of different reference standards used. Element 2 to sub_rs[1] are vectors of integers specifying the study numbers that used each reference test. See details.

prior.SEref

a vector of values specifying the lower and upper limits of the sensitivity of the reference test(s) based on prior information. If there are multiple reference standards, the lower and upper limits are each specified as a vector of length sub_rs[1]. The default value is NULL, implying a single reference standard with perfect sensitivity.

prior.SPref

a vector of values specifying the lower and upper limits of the specificity of the reference test(s) based on prior information. If there are multiple reference standards, the lower and upper limits are each specified as a vector of length sub_rs[1]. The default value is NULL, implying a single reference standard with perfect specificity.

first.run

logical. If TRUE (default), the gibbs.sampler function is run for the first time. If FALSE, the function assumes k iterations where already run and it continues from where it left off, that is from iteration k+1.

path

a character string pointing to the directory where the sample drawn at each iteration of the Gibbs sampler are to be stored.

refresh

A positive integer defining the frequency at which the Gibbs sampler's progress will be displayed on the R GUI. The default is 100.

prior_PI

a vector with 2 components specifying the minimum and maximum values for the prevalence in each study based on prior information. If unspecified, Beta(1,1) priors are used.

prior_LAMBDA

a vector with 2 components specifying the minimum and maximum values for the difference in mean values (diagnostic accuracy) among disease positive and negative groups based on prior information. The default value is c(-3,3) implying a U(-3,3).

prior_THETA

a vector with 2 components specifying the minimum and maximum values for the overall mean cut-off value for defining a positive test based on prior information. The default value is c(-1.5,1.5) implying a U(-1.5,1.5).

prior_sd_alpha

a list with 3 components. The first 2 components are specifying the minimum and maximum values for the between study standard deviation in the difference in mean values of the disease positive and negative groups in the ith study, alpha_i, based on prior information. The third component determine whether we want the prior to be on the standard deviation (sd) or the variance (v). The default value is list(0,2,"sd") implying a U(0,2) prior.

prior_sd_theta

a list with 3 components. The first 2 components are specifying the minimum and maximum values for the between study standard deviation in the cut-off, theta_i, in the ith study based on prior information. The third component determine whether we want the prior to be on the standard deviation (s) or the variance (v). The default value is list(0,2,"sd") implying a U(0,2) prior.

prior_beta

a vector with 2 components specifying the minimum and maximum values for the logarithm of the ratio of the standard deviation of test results among patients with and without the disease, based on prior belief. This parameter is assumed to be constant across studies. The default value is c(-0.75,0.75) implying a U(-0.75,0.75). If the argument is (NULL) the function assumes a range of (-log( (LAMBDA.up/3) + 1 ) , log( (LAMBDA.up/3) + 1 ) ), where LAMBDA.up is the upper limit of prior.LAMBDA.

Details

Our HSROC model uses a probit link function and not the logit link function used in the HSROC model developped by Rutter and Gatsonis (2001).

The probability of a positive result on the index test for the jth individual in the ith study is given by :

1 - PHI( (theta_i - alpha_i D_{ij})*exp(-beta D_{ij})),

while the probability of a negative result on the index test for the jth individual in the ith study is given by :

PHI( (theta_i - alpha_i D_{ij})*exp(-beta D_{ij})),

where D_ij = 0.5 if the jth individual in the ith study is disease positive and -0.5 if the jth individual in the ith study is not disease negative.

When ranges are provided for prior.SEref, prior.SPref and prior_PI they are transformed into Beta prior distributions using the method described in beta.parameter.

If the argument init = NULL, the function will randomly generate initial values based on the prior information. Otherwise, the user can provide his own initial values for the within-study and between-study parameters and for the reference standards through the init argument, with the within-study, between study and reference standard initial values as the first, second and third element of init, respectively. Furthermore, the within-study parameters must be a matrix-like object with each column being initial values for alpha_i, theta_i, sensitivity of the test under evaluation S1_i, specificity of the test under evaluation C1_i and prevalence pi_i. The between-study parameters must be a vector of the following initial values : THETA, sigma_theta, LAMBDA, sigma_alpha and beta. The initial values for the reference standard must be a 2 X sub_rs[[1]] matrix-like object. The first row must be the initial values of the sensitivity of the reference standard, while the second row must correspond to initial values of the specificity of the reference standard. The ordering described above in the within-study, between-study and reference standard parameters must be preserved.

The first element of the list-object sub_rs corresponds to the number of different reference standards. The default value is 1. The number of additional elements will depend on the value of the first element. There must be as many additional elements in sub_rs as there are different reference standards. Assuming the studies are labelled 1, ..., N, each of these additional elements must be a vector (possibly of length one) taking as their values the labelling of the corresponding studies sharing the same reference standard. For example, if we have 2 reference tests, the first one aplied over study 1-10 and the second one applied over study 11-15 then the sub_rs list-argument should be of length 3 with the following elements : 3, 1:10, 11:15

The path argument points to the working directory where files written at each iteration of the Gibbs sampler will be saved. If no path is provided, the current working directory will be used

For more help on this function, see the tutorial pdf file available at http://www.nandinidendukuri.com/filesonjoomlasite/HSROC_R_Tutorial.pdf

Value

Text files with samples from the joint posterior distribution of the between-study parameters, within-study parameters and performance parameters of the reference standard(s) are created in the path directory. These results can be summarized using the HSROCSummary function.

The following files are also created and saved in the path directory :

“Prior.information.txt”, lists the prior distributions.

“Initial values.txt”, lists the initial values used. If the argument init = NULL, the initial value file is called “Random Initial values.txt”.

A series of files listing the values of various parameters sampled in the last iteration of the Gibbs sampler as follows :

“REstarting values.txt”, contains values of the within-study parameters (alpha_i, theta_i, sensitivity of test under evaluation ( S1_i ), specificity of test under evaluation ( C1_i ) and prevalence ( pi_i ) ).

“REstarting values 2.txt”, contains values of the between-study parameters (LAMBDA, standard deviation of alpha_i, ( sigma_alpha ), THETA, standard deviation of theta_i ( sigma_theta ) and beta ).

“REstarting REFSTD.txt”, contains values of the sensitivity and specificity of the reference test.

“REstart values index.txt”, lists the variable names in the 3 files described above.

References

Dendukuri, N., Schiller, I., Joseph, L., and Pai, M. (2012) Bayesian meta-analysis of the accuracy of a test for tuberculosis pleuritis in the absence of a gold-standard reference. Biometrics. doi:10.1111/j. 1541-0420.2012.01773.x

Rutter, C. M., and Gatsonis, C. A. (2001) A hierarchical regression approach to meta-analysis of diagnostic accuracy evaluations. Statistics in Medicine, 20(19):2865-2884.

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
#===============================================================
#TO SET UP THE REFERENCE STANDARD
#===============================================================


#There were three different reference standards for the In.house dataset.  
#The first reference standard was used in study 1 and 2, 
#the second was used in studies 3 and 4 and the third in study 5 to 12. 
REFSTD = list(3, 1:2, 3:4, 5:11) 

#===============================================================
#TO SET UP DATA AND INITIAL VALUES
#===============================================================

data(In.house)
M = length(In.house[,1])


#Initial values for the within-study parameters
init.alpha = rep(2.5, M) ;	init.theta = rep(1, M) ;
init.s1 =  rep(0.5, M) ;	init.c1 = rep(0.5, M) ;
init.pi = rep(0.5, M)

#Initial values for the between-study parameters
init.THETA = 1 ;	init.sd.theta = 0.5 ;
init.LAMBDA = 2.5 ;	init.sd.alpha = 0.5 ;
init.beta = 0 ;

#Initial values for the reference standard sensitivities and specificities
init.s2 = rep(0.5, REFSTD[[1]]) ;	init.c2 = rep(0.5, REFSTD[[1]])

#The ordering of the initial values is important!
init1 = cbind(init.alpha, init.theta, init.s1, init.c1, init.pi)
init2 = c(init.THETA, init.sd.theta, init.LAMBDA, init.sd.alpha, init.beta)
init3 = rbind(init.s2, init.c2)

init = list(init1, init2, init3)
#===============================================================
#TO PROVIDE PRIOR INFORMATION
#===============================================================

S2.a = c(0.2, 0.2, 0.7) ; 	S2.b = c(0.6, 0.7, 0.9)
C2.a = rep(0.9, 3) ;	C2.b = rep(1, 3)

#===============================================================
#TO RUN GIBBS SAMPLER
#===============================================================



## Not run: 

set.seed(10)
HSROC(data=In.house, init=init, iter.num=50000,  
   prior.SEref=c(S2.a,S2.b), prior.SPref=c (C2.a,C2.b), sub_rs=REFSTD) 

#Putting prior information on sigma_alpha^2 (sigma_alphs squared) 
#instead of sigma_alpha
set.seed(10)
HSROC(data=In.house, init=init, iter.num=50000,  
   prior.SEref=c(S2.a,S2.b), prior.SPref=c (C2.a,C2.b), 
		sub_rs=REFSTD, prior_sd_alpha = list(0,2,"v"))


#Letting the function select randomly its own initial values
set.seed(10)
HSROC(data=In.house, iter.num=50000,  
   prior.SEref=c(S2.a,S2.b), prior.SPref=c (C2.a,C2.b), 
		sub_rs=REFSTD)

#For more help on this function, see the tutorial pdf file availalbe
#at http://www.nandinidendukuri.com/filesonjoomlasite/HSROC_R_Tutorial.pdf


## End(Not run)

HSROC documentation built on Sept. 19, 2019, 9:05 a.m.

Related to HSROC in HSROC...