gfitpca {abc}R Documentation

Goodness of fit with principal component analysis


Perform a priori goodness of fit using the two first components obtained with PCA.


gfitpca(target, sumstat, index, cprob=0.1, xlim=NULL, ylim=NULL, ...)



a data frame or vector of the observed summary statistic.


a matrix or data frame of the simulated summary statistics.


a vector of models names. It must be character and have the same length as the number of row in sumstat to indicate which row belong to which model.


cprob is the proportion of points outside the displayed envelope. Default to 0.1 which corresponds to a 90% envelope.

xlim, ylim

optional, numeric vectors of length 2, giving the x and y coordinates ranges.


other parameters passed to plot.


The function performs PCA using the a priori simulated summary statistics. It displays envelopes containing 1-hprob percent of the simulations. The projection of the observed summary statistics is displayed in order to check if they are contained or not in the envelopes. If the projection lies outside the envelope of a given model, it is an indication of poor fit.


Louisiane Lemaire and Michael Blum

See Also

abc, plot.gfit, summary.gfit, gfit


## human demographic history
## five R objects are loaded. See ?human and vignette("abc") for details.

## Perform a priori goodness of fit for 3 different demographic models
## The envelopes containing 90% of the simulations are displayed.
## For the European data, a reasonable fit is only provided by the 
## bottleneck model.
## The number of simulations is reduced to improve speed (do not do that
## with your own data)
gfitpca(target=stat.voight["italian",], sumstat=stat.3pops.sim[index,],
index=models[index], cprob=0.1)

[Package abc version 2.2.1 Index]