Analysis of runif data

1. Proportion of age peaks selected in the results

This graph shows the proportion of the number of prefered inverted ages as a function of the distance between the 2 true ages on which the synthetic data was conditioned. Where the separation is small - the inversion struggles to distinguish between the 2 components and a large number of single ages are prefered. As the gap widens - the algorithm performs better at resolving the difference.

plot of chunk unnamed-chunk-2

Figure 1: This graph shows the proportion of results that prefer one age (black), 2 ages (red) and 3 ages(green) as we increase the true age of the second component age from 2 to 9Myr. The age of the first component is at 1Myr and the mixing proportion is 50:50.

2. Analysis of the results for A1=1 Ma A2=3Ma

Notice that Figure 1 shows that when the second age is at 3Mry, we observed favoured solutions with both 1 and 2 age components. This section compares the properties and covariances of these results.

The plot below summaries the results of this analysis and highlights the major challenges binomfit has in correctly infering these models.

# Multiple plot function ggplot objects can be passed in ..., or to plotlist
# (as a list of ggplot objects) - cols: Number of columns in layout -
# layout: A matrix specifying the layout. If present, 'cols' is ignored.  If
# the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), then
# plot 1 will go in the upper left, 2 will go in the upper right, and 3 will
# go all the way across the bottom.
multiplot <- function(..., plotlist = NULL, file, cols = 1, layout = NULL) {
    require(grid)

    # Make a list from the ... arguments and plotlist
    plots <- c(list(...), plotlist)

    numPlots = length(plots)

    # If layout is NULL, then use 'cols' to determine layout
    if (is.null(layout)) {
        # Make the panel ncol: Number of columns of plots nrow: Number of rows
        # needed, calculated from # of cols
        layout <- matrix(seq(1, cols * ceiling(numPlots/cols)), ncol = cols, 
            nrow = ceiling(numPlots/cols))
    }

    if (numPlots == 1) {
        print(plots[[1]])

    } else {
        # Set up the page
        grid.newpage()
        pushViewport(viewport(layout = grid.layout(nrow(layout), ncol(layout))))

        # Make each plot, in the correct location
        for (i in 1:numPlots) {
            # Get the i,j matrix positions of the regions that contain this subplot
            matchidx <- as.data.frame(which(layout == i, arr.ind = TRUE))

            print(plots[[i]], vp = viewport(layout.pos.row = matchidx$row, layout.pos.col = matchidx$col))
        }
    }
}

plot of chunk unnamed-chunk-4

plot of chunk unnamed-chunk-5

3. Analysis of the results for A1=1 Ma A2=7Ma

Notice that Figure 1 shows that when the second age is at 7Mry, we only observed favoured solutions with 2 age components. This section compares the properties and covariances of these results.

In this case the inverted ages are well resolved. This is reflected in:

plot of chunk unnamed-chunk-6

## Error: cannot open the connection
## Error: cannot open the connection
## Error: cannot open the connection
## Error: cannot open the connection

plot of chunk unnamed-chunk-7