ordinalRR: Fit a Bayesian ordinal R&R model using JAGS.

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

Description

This function can fit either the fixed- or random-effects model from Section 3 of Culp, Ryan, Chen, and Hamada (2018). The outputted class is of type ‘ordinalRR’, and there are S3 generic functions (e.g., plot and density) for class ‘ordinalRR’ that make graphs like those from the referenced paper. The user can also use the posterior sample for a customized Bayesian data analysis; see the value list for details on how the posterior sample from JAGS is outputted.

Usage

1
ordinalRR(x, random = TRUE, control = ordinalRR.control())

Arguments

x

‘list’ output from function preprocess() containing design parameters and the multinomial counts.

random

‘Boolean’ True for a random-effects model (Section 3.1 of Culp, Ryan, Chen, and Hamada, 2018); False for fixed effect (Section 3.2)

control

‘list’ contains random-effect hyperparameters for the prior and JAGS MCMC parameters.

Value

post

‘mcmc.list’ Bayesian model fit from JAGS including the posterior (i.e., a matrix with samplecontrol$rjag.B rows and one column for each parameter).

x

‘mcmc’ the columns X[1],...,X[I] from the posterior sample for the latent parts.

a

‘mcmc’ the columns alpha[1],...,alpha[J] from the posterior sample for the discrimination parameters.

d

‘mcmc’ the columns delta[1,1:(H-1)],...,delta[J,1:(H-1)] from the posterior sample for the cutpoints.

mu.a

‘mcmc’ column mu.alpha from the posterior sample for the mean of the normal log(alpha[J+1]) distribution (only outputed when random=TRUE).

sigma.a

‘mcmc’ column sigma.alpha from the posterior sample for the standard deviation of the normal log(alpha[J+1]) distribution (only outputed when random=TRUE).

lambda

‘mcmc’ columns lambda[1],...,lambda[H] from the posterior sample for the Dirichlet distribution used to induce a distribution on cutpoints delta[J+1,1:H] (only outputed when random=TRUE).

...

remaining internal outputs used for necessary processing.

Author(s)

Ken Ryan

References

Culp, S.L., Ryan, K.J., Chen, J., and Hamada, M.S. (2018). “Analysis of Repeatability and Reproducibility Studies with Ordinal Measurements.” Technometrics, doi:10.1080/00401706.2018.1429317.

Plummer, M. (2016). “RJAGS: Bayesian Graphical Models using MCMC.” R Package Version 4-6, https://CRAN.R-project.org/package=rjags.

Plummer, M. (2017). “JAGS: A Program for Analysis of Bayesian Graphical Models using Gibbs Sampling.” Version 4.3.0, http://mcmc-jags.sourceforge.net.

See Also

preprocess ordinalRR.control

Examples

1
2
3
4
5
6
          
data(followup)
followup
x=preprocess(followup)
g.random<-ordinalRR(x)
g.fixed<-ordinalRR(x,random=FALSE)

ordinalRR documentation built on March 31, 2020, 5:09 p.m.