nmadasmodel: nmadasmodel

Description Usage Arguments Value Author(s) References Examples

View source: R/ModelCode.R

Description

Specify the copula based bivariate beta-binomial or alternatively logistic-binomial distribution to fit to the diagnostic data.

Usage

1
2
3
4
nmadasmodel(marginals = "beta", copula = "frank", p.omega = NULL,
  fullcov = FALSE, prior.lmu = "normal(0, 5)",
  prior.tau = "cauchy(0, 2.5)", prior.sigma = " cauchy(0, 2.5)",
  prior.rho = "lkj_corr(2.0)")

Arguments

marginals

Use normal marginals on the logit transformed sensitivity and specificity or the beta marginals. When marginals = 'normal' the following model is fitted:

Y_{ijk} ~ bin(π_{ijk}, N_{ijk})

logit(π_{ijk}) = μ_{jk} + η_{ij} + δ_{ijk}

(η_{i1}, η_{i2})' ~ N_2(0, Σ)

Σ[j,j] = σ[j]^2, Σ[1,2] = Σ[2,1] = ρ*σ[1]*σ[2]

δ_{ijk} ~ N(0, τ_{jk})

copula

Name of the copula function used to model the correlation between sensitivity and specificty. This requires that marginals = 'beta' be specificied. This is a string naming the copula function. The choices are "fgm", "frank", "gauss", "c90" and "c270".

p.omega

The prior distribution of the ω parameters. This prior distribution depend on the specified copula. The defualt is "uniform(-1, 1)" for the gaussian and fgm copula, "normal(0, 5)" for the frank copula, ad "cauchy(0, 2.5)" for the c90 and c270 copula.

fullcov

Logical for full (TRUE) or reduced (default) variance-covariance matrix. The reduction simplifies the variance-covariance matrix by specifying that

δ_{ijk} ~ N(0, τ_{j})

.

prior.lmu

A text specifying the prior distribution for μ parameters. The default is "normal(0, 5)".

prior.tau

A text specifying the prior distribution for τ parameters. The default is "cauchy(0, 2.5)".

prior.sigma

A text specifying the prior distribution for σ parameters. The default is "cauchy(0, 2.5)".

prior.rho

A text specifying the prior distribution for ρ parameter. The default is "lkj(2.0)". For more details on specifications of prior distributions see Stan documentation. When marginals = 'beta' the following model is fitted:

Y_{ijk} ~ bin(π_{ijk}, N_{ijk})

π_{i1k}, π_{i2k} ~ f(π_{i1k})*f(π_{i2k})*copula(F(π_{i1k}), F(π_{i2k}), ω_k)

where f and F are the probability density and cumulative distribution function of a beta distribution with parameters

α_{jk}

and

β_{jk}

specified as follows:

α_{jk} = μ_{jk}*\frac{1- θ_j*δ_{jk}}{θ_j*δ_{jk}}

β_{jk} = (1 - μ_{jk})*\frac{1- θ_j*δ_{jk}}{θ_j*δ_{jk}}

Here

μ_{jk}

is the mean sensitivity j = 1 and specificity j = 2,

ω_k

captures the correlation between sensitivity and specificity in test k,

θ_j

captures the common overdispersion among the sensitivities j = 1 and specificities j = 2, and

δ_jk

captures the test specific extra variability. The hyper parameters μ, θ and δ are given beta/uniform priors since they are in the (0,1) interval. The prior distribution of ω depends on the copula.

Value

An object of nmamodel class.

Author(s)

Victoria N Nyaga

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

1
2
3
4
5
model1 <-  nmamodel()

model2 <- nmamodel(copula = 'fgm')

model3 <-  nmamodel(marginals = 'normal')

VNyaga/NMADAS documentation built on May 6, 2019, 11:20 a.m.