plot.PCResults: Plot the MCMC iterations for each model coefficient.

Description Usage Arguments Value Examples

Description

plot.PCResults generates the MCMC iteration plots for model coefficients after running a PC model using runPCModel.

Usage

1
2
## S3 method for class 'PCResults'
plot(object)

Arguments

object

An object of class PCResults. This is the result of running a model using runPCModel.

Value

A plot of the MCMC chains for each model coefficient.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data("TAMdata")
# The dataset is trimmed only for the speed of the example
TAMdata <- TAMdata[TAMdata$subject < 3, ]
TAMdata <- rScale(TAMdata, subjectVar = 'subject', sampleVar = 'ROI',
                  xCoord = 'x', yCoord = 'y')
rangs <- estRange(TAMdata, outcome = 'X1282.auc', spatialVar = 'TAM',
                  semivEst = 'modulus', logTransform = TRUE)
structs <- chooseStructures(rangs)
PCdat <- createPCData(structs, trimData = FALSE,
                      covariates = c("secondary", "TAM", "secTAM"),
                      covariateTypes = c("binary", "binary", "binary"),
                      covariateLevels = c("sample", "raster", "raster"))
PCmod <- writePCModel(PCdat, multiSampsPerSubj = TRUE, typeOfZero = "censored")
PCresults <- runPCModel(modelObj = PCmod, PCDataObj = PCdat, slideVar='slide',
                        monitorCoefOnly = FALSE,
                        nBurnin = 15000, nIter = 40000, nThin = 25)
plot(PCresults)

cammiller/imagingPC documentation built on June 28, 2019, 12:04 a.m.