Description Usage Arguments Value Author(s) Examples
Inference and model selection for analysis of geographical genetic variation under the assumption of Gaussian distribution of allele counts for bi-allelic loci. Parameter estimation by maximization of the likelihood.
1 |
gen |
A matrix with dimensions (n,l) n: number of geographical locations, l: number of loci. |
D_G |
A matrix of geograpical distances |
D_E |
A matrix of environmental distances |
theta.max |
Upper bounds for the vector of parameters in theta. Note that in theta, the parameters are assumed to be in this order: (alpha,beta_G, beta_E, gamma, delta) |
theta.min |
Lower bounds for the vector of parameters in theta. Note that in theta, the parameters are assumed to be in this order: (alpha,beta_G, beta_E, gamma, delta) |
ntrain |
Number of sites used for training. An integer smaller
than |
nresamp |
Number of resamplings. An integer larger than 1. |
A list with either a component named mod.lik (containing likelihoods on
the validation set for the various models compared) or a vector of
estimated parameters (if ntrain
is equal to the number of
sampling sites).
Gilles Guillot
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 26 27 28 29 30 | ## Not run:
nsite <- 200
nloc <- 1000
hap.pop.size <- 100
theta <- c(runif(n=1,.5,10),
runif(n=1,.01,10),
runif(n=1,.01,10),
runif(n=1,.5,1),
runif(n=1,.01,.1)
)
mod <- 'G+E'
dat <- SimSunderData(mod=mod,
theta=theta,
nsite=nsite,
nloc=nloc,
hap.pop.size=hap.pop.size,
nalM=2,nalm=2, #bi-allelic loci
var.par=1,
scale.par=3)
gen <- dat$gen[,,1]
D_G <- dat$D_G
D_E <- dat$D_E
res <- MLCVGauss(gen,D_G,D_E,
ntrain=nrow(gen)/2,
nresamp=3)
which.max(res$mod.lik)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.