Description Usage Arguments Details Value Author(s) Examples
Create a bootstrap (multinomial) sample from a given set of marker data (source and mixed population genotypes), either parametric or non-parametric
1 2  | mixstock.boot(x, param=FALSE, condense=TRUE,save.freq=FALSE,
param.match="mean")
 | 
x | 
 "Standard" mixstock data, a list with   | 
param | 
 parametric bootstrapping or not?  | 
condense | 
 use   | 
save.freq | 
 save frequencies?  | 
param.match | 
 match mean or mode of distribution when parametric bootstrapping?  | 
Nonparametric bootstrapping just resamples the observed data from the mixed population and from each source with replacement; this is equivalent to taking a multinomial sample with the probabilities equal to the observed sample frequencies. Parametric bootstrapping takes the observed samples and resamples the probabilities themselves from a Dirichlet distribution, then takes a multinomial sample.
A bootstrapped data set, in the same format as the input data: i.e.,
mixsamp | 
 samples in mixed population  | 
sourcesamp | 
 samples in sources  | 
...
Ben Bolker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  | true.freq <- matrix(c(0.65,0.33,0.01,0.01,
                       0.33,0.65,0.01,0.01),ncol=2)
true.contrib <- c(0.9,0.1)
x <- simmixstock0(true.freq,true.contrib,50,100,1004)
nboot <- 1000
boot.results.par <- matrix(NA,ncol=12,nrow=nboot)
boot.results.npar <- matrix(NA,ncol=12,nrow=nboot)
for (i in 1:nboot) {
  x.par  <- mixstock.boot(x,param=TRUE,condense=FALSE)
  x.npar <- mixstock.boot(x,condense=FALSE)
  boot.results.par[i,] <- c(x.par$sourcesamp,x.par$mixsamp)
  boot.results.npar[i,] <- c(x.npar$sourcesamp,x.npar$mixsamp)
}
summary(boot.results.par[,7:8])
summary(boot.results.npar[,7:8])
par(mfrow=c(1,2))
hist(boot.results.par[,7])
hist(boot.results.npar[,7])
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.