R/data-rats.R

#' Weights of 30 rats, measured weekly over 5 weeks.
#' 
#' Weights of 30 rats, measured weekly over 5 weeks.
#' 
#' The \code{rats} dataset is one of the sample datasets provided with the
#' multilevel-modelling software package MLwiN (Rasbash et al., 2009); see
#' Browne (2012) and Gelfand (1990) for further details.
#' 
#' @docType data
#' @format A data frame with 30 observations on the following 7 variables:
#' \describe{ \item{list("y8")}{Weight on day 8.} \item{list("y15")}{Weight on
#' day 15.} \item{list("y22")}{Weight on day 22.} \item{list("y29")}{Weight on
#' day 29.} \item{list("y36")}{Weight on day 36.}
#' \item{list("cons")}{Constant(=1).} \item{list("rat")}{Rat ID} }
#' @source Browne, W. J. (2012) \emph{MCMC Estimation in MLwiN Version 2.26.}
#' University of Bristol: Centre for Multilevel Modelling.
#' 
#' Gelfand, A. E., Hills, S.E., Racine-Poon, A., Smith, A.F.M. (1990)
#' Illustration of Bayesian inference in normal data models using Gibbs
#' sampling. \emph{Journal of the American Statistical Association} 85:
#' 972-985.
#' 
#' Rasbash, J., Charlton, C., Browne, W.J., Healy, M. and Cameron, B. (2009)
#' \emph{MLwiN Version 2.1.} Centre for Multilevel Modelling, University of
#' Bristol.
#' @keywords datasets
#' @examples
#' 
#' \dontrun{
#' 
#' data(rats, package = "R2MLwiN")
#' 
#' (mymodel <- runMLwiN(c(y8, y15, y22, y29, y36) ~ 1 + (1 | rat), 
#'   D = "Multivariate Normal", estoptions = list(EstM = 1),
#'   data = rats))
#' 
#' }
#' 
"rats"

Try the R2MLwiN package in your browser

Any scripts or data that you put into this service are public.

R2MLwiN documentation built on March 31, 2023, 9:17 p.m.