fit.cdtamodel: Fit copula based bivariate beta-binomial distribution to...

Description Usage Arguments Value Author(s) References Examples

View source: R/fit.R

Description

Fit copula based bivariate beta-binomial distribution to diagnostic data.

Usage

1
2
fit.cdtamodel(cdtamodel, data, SID, cores = 3, chains = 3, iter = 6000,
  warmup = 1000, thin = 10, ...)

Arguments

cdtamodel

An object of cdtamodel class from cdtamodel.

data

A data-frame with no missing values containg TP, TN, FP, FN, 'SID' and co-varaiables(if necessary).

SID

A string indicating the name of the column with the study identifier.

cores

A positive numeric values specifying the number of cores to use to execute parallel sampling. When the hardware has more at least 4 cores, the default is 3 cores and otherwise 1 core.

chains

A positive numeric value specifying the number of chains, default is 3.

iter

A positive numeric value specifying the number of iterations per chain. The default is 6000.

warmup

A positive numeric value (<iter) specifying the number of iterations to be discarded(burn-in/warm-up). The default is 1000.

thin

A positive numeric value specifying the interval in which the samples are stored. The default is 10.

...

Other optional parameters as specified in stan.

Value

An object of cdtafit class.

Author(s)

Victoria N Nyaga <victoria.nyaga@outlook.com>

References

Nyaga VN, Arbyn M, Aerts M (2017). CopulaDTA: An R Package for Copula-Based Beta-Binomial Models for Diagnostic Test Accuracy Studies in a Bayesian Framework. Journal of Statistical Software, 82(1), 1-27. doi:10.18637/jss.v082.c01

Agresti A (2002). Categorical Data Analysis. John Wiley & Sons, Inc.

Clayton DG (1978). A model for Association in Bivariate Life Tables and its Application in Epidemiological Studies of Familial Tendency in Chronic Disease Incidence. Biometrika,65(1), 141-151.

Frank MJ (1979). On The Simultaneous Associativity of F(x, y) and x + y - F(x, y). Aequationes Mathematicae, pp. 194-226.

Farlie DGJ (1960). The Performance of Some Correlation Coefficients for a General Bivariate Distribution. Biometrika, 47, 307-323.

Gumbel EJ (1960). Bivariate Exponential Distributions. Journal of the American Statistical Association, 55, 698-707.

Meyer C (2013). The Bivariate Normal Copula. Communications in Statistics - Theory and Methods, 42(13), 2402-2422.

Morgenstern D (1956). Einfache Beispiele Zweidimensionaler Verteilungen. Mitteilungsblatt furMathematische Statistik, 8, 23 - 235.

Sklar A (1959). Fonctions de Repartition a n Dimensions et Leurs Marges. Publications de l'Institut de Statistique de L'Universite de Paris, 8, 229-231.

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
data(telomerase)
model1 <-  cdtamodel(copula = 'fgm')

model2 <- cdtamodel(copula = 'fgm',
               modelargs=list(param=2,
                              prior.lse='normal',
                              par.lse1=0,
                              par.lse2=5,
                              prior.lsp='normal',
                              par.lsp1=0,
                              par.lsp2=5))

model3 <-  cdtamodel(copula = 'fgm',
               modelargs = list(formula.se = StudyID ~ Test - 1))
## Not run: 
fit1 <- fit(model1,
                SID='ID',
                data=telomerase,
                iter=2000,
                warmup=1000,
                thin=1,
                seed=3)


fit2 <- fit(model2,
                SID='StudyID',
                data=ascus,
                iter=2000,
                warmup=1000,
                thin=1,
                seed=3)

## End(Not run)

CopulaDTA documentation built on May 2, 2019, 7:01 a.m.