Visualising DREAM results

Share:

Description

Plots various visualisation of MCMC chain results

Usage

1
2
## S3 method for class 'dream'
plot(x,interactive=TRUE,...)

Arguments

x

A dream object

interactive

whether to use devAskNewPage (the default) or print all at once

...

Placeholder for S3method

Details

Extracts the second half of the MCMC chains as a coda object

Calls:

  • coda's plot

  • coda's xyplot

  • coda's densityplot

  • Plots the distribution of acceptance rates

  • coda's gelman.plot (may fail depending on characteristics of MCMC chains)

  • Plots the evolution of the Gelman R statistic, using previously internally compueted results

  • Plots the multi-variate density of the first chain

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
  ##To run the equivalent coda visualisations:

    ss <- window(dream.obj$Sequences, start = end(dream.obj$Sequences)/2 + 1)
    plot(ss)
    print(xyplot(ss))

    ## Lattice graphics parameter density plots
    ## Each chain is superposed
    print(densityplot(ss))

    ## All chains combined (treated as one)
    print(densityplot(as.mcmc(as.matrix(ss))))

    ## Alternatively, specify burn-in within the call
    print(densityplot(dream.obj$Sequences, start = end(dream.obj$Sequences)/2 + 1))

    ## Base graphics parameter density plots
    plot(ss,trace=F)

    ## Uses densplot behind the scenes, e.g.
    densplot(ss[,1])

  
## End(Not run)