convert-methods | R Documentation |
as.matrix
in Package prevalenceConvert objects of class prev
to matrix
## S4 method for signature 'prev' as.matrix(x, iters = FALSE, chains = FALSE)
x |
An object of class |
iters |
Logical flag, indicating whether a column should be added for iteration number; defaults to |
chains |
Logical flag, indicating whether a column should be added for chain number; defaults to |
signature(x = "prev")
Convert objects of class prev
to matrix
prev-class
## Not run: ## Taenia solium cysticercosis 1-test model cysti <- truePrev(x = 142, n = 742, SE = ~dunif(0.60, 1.00), SP = ~dunif(0.75, 1.00)) head(as.matrix(cysti)) ## Campylobacter 2-test model campy <- truePrevMulti( x = c(113, 46, 156, 341), n = 656, prior = { theta[1] ~ dunif(0.45, 0.80) theta[2] ~ dunif(0.24, 0.50) theta[3] <- 1 theta[4] ~ dbeta(30, 12) theta[5] ~ dbeta(1, 1) theta[6] <- 1 theta[7] <- 1 } ) head(as.matrix(campy, iters = TRUE, chains = TRUE)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.