Learn R Programming

MethComp (version 1.30.0)

sbp.MC: A MCmcmc object from the sbp data

Description

This object is included for illustrative purposes. It is a result of using MCmcmc, with n.iter=100000 on the dataset sbp from this package.

Arguments

Format

The format is a MCmcmc object.

Details

The basic data are measurements of systolic blood pressure from the sbp dataset. Measurements are taken to be linked within replicate. The code used to generate the object was:

library(MethComp) data( sbp ) spb <- Meth( sbp ) sbp.MC <- MCmcmc( sbp,
linked=TRUE, n.iter=100000, program="JAGS" ) ) 

Examples

Run this code
# NOT RUN {
data(sbp.MC)
# How was the data generated
attr(sbp.MC,"mcmc.par")

# Traceplots
trace.MCmcmc(sbp.MC)
trace.MCmcmc(sbp.MC,"beta")

# A MCmcmc object also has class mcmc.list, so we can use the
# standard coda functions for convergence diagnostics:
# acfplot( subset.MCmcmc(sbp.MC,subset="sigma") )

# Have a look at the correlation between the 9 variance parameters
pairs( sbp.MC )

# Have a look at whether the MxI variance components are the same between methods:
# }
# NOT RUN {
pairs( sbp.MC, subset=c("mi"), eq=TRUE,
        panel=function(x,y,...)
              {
               abline(0,1)
               abline(v=median(x),h=median(y),col="gray")
               points(x,y,...)
              }
        ) 
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab