Learn R Programming

CopulaDTA (version 0.0.1)

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

Description

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

Usage

fitcopula(data, SID, copula, formula.se = NULL, formula.sp = NULL,
  formula.omega = NULL, transform.omega = TRUE, param = 1,
  prior.lse = "normal", par.lse1 = 0, par.lse2 = 10,
  prior.lsp = "normal", par.lsp1 = 0, par.lsp2 = 10, prior.omega = NULL,
  par.omega1 = NULL, par.omega2 = NULL, chains = NULL, iter = 6000,
  warmup = 1000, thin = 10, cores = NULL, init = "random",
  seed = sample.int(.Machine$integer.max, 1), ...)

Arguments

Value

An object which includes a S4 class stanfit. See stan for more details.

References

{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

Run this code
data(telomerase)
fit1 <- fitcopula(data=telomerase,
SID = "ID",
copula="fgm",
iter = 4000,
warmup = 1000,
thin = 10,
seed=3,
cores=1)
data(ascus)

fit2 <- fitcopula(data=ascus,
SID = "StudyID",
copula="fgm",
formula.se= StudyID ~ Test - 1,
seed=3)

Run the code above in your browser using DataLab