Description Usage Arguments Details Value Author(s) References See Also Examples
The function fits an exponential model to empirical variogram and provides the estimates of the covariance parameters.
1 | fitsvariog(vario, ini.cov.pars, plot = TRUE, ...)
|
vario |
an object of class |
ini.cov.pars |
initial values for variogram model: sigma^2 (partial sill) and phi (range
parameter). See |
plot |
logical, if TRUE, the empirical variogram is plotted with the fitted model and the value of the conventional estimate of the genetic diversity (Hhat in wagner et al 2005). |
... |
additional parameters passed to |
The function calls the function variofit
from package geoR
(Diggle and Ribeiro, 2007). It fits an exponential model to the empirical variogram and returns the estimated parameters. In addition, the parameters FN, bf and Sp (Vekemans and Hardy, 2004) are estimated from the fitted variogram following Wagner et al. (2005).
The optional arguments are :
variogram model to be fitted. The only available model the the exponential model.
logical, indicating whether the parameter tau^2 (nugget variance) should be considered as fixed
(fix.nugget = TRUE
) or should be estimated (fix.nugget = FALSE
). See variofit
from package geoR
.
value for the nugget parameter. Defaults set to zero. See variofit
from package geoR
.
maximum distance considered when fitting the variogram. Defaults set to svario$max.dist
.
See variofit
from package geoR
.
param |
a vector giving the fitted parameters |
c: spatial variance aka partial sill
nugget: nugget variance
range: range
pract.range: practical range
sill: sill variance
Hhat: conventional estimate of gene diversity (non spatial estimate analogous to the variance)
FN: Relatedness of immediate neighbors (see Vekemans and Hardy (2004)
bf: A slope parameter involved is the estimation of Sp
Sp: The index of spatial Genetic Structure proposed by Vekemans and Hardy (2004)
fit |
an object of class |
Jean-Pierre Rossi Jean-Pierre Rossi <ggene.package@gmail.com>
Diggle, P. J. and P. J. Ribeiro 2007. Model-based Geostatistics, Springer.
Vekemans, X. and O. J. Hardy. 2004. New insights from fine-scale spatial genetic structure analyses in plant populations. Molecular Ecology 13: 921-935.
Wagner, H. H., R. Holderegger, S. Werth, F. Gugerli, S. E. Hoebee and C. Scheidegger. 2005. Variogram analysis of the spatial genetic structure of continuous populations using multilocus microsatellite data. Genetics 169, 1739-1752.
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 | ## fit model to empirical variograms from simulated datsets
data(aniso)
va <- svariog(X=aniso, plot=FALSE)
fit <- fitsvariog(vario=va, ini.cov.pars=c(0.05,10), nugget=0.2, max.dist=30, plot = TRUE)
fit
data(sim03)
va <- svariog(X=sim03, plot=TRUE)
fit <- fitsvariog(vario=va, ini.cov.pars=c(0.05,4.5), nugget=0.5, max.dist=200)
fit
# graphical display
fit <- fitsvariog(vario=va, ini.cov.pars=c(0.05,4.5), nugget=0.5, max.dist=200, plot=FALSE)
plot(va$svario$u, va$svario$v)
lines(fit$fit)
## fit model to empirical variograms from field data and see how the maximum distance
## to be used can change the results
data(crypho)
va <- svariog(X=crypho, plot=TRUE, messages=FALSE)
fit1 <- fitsvariog(vario=va, ini.cov.pars=c(0.03,100), nugget=0.1, max.dist=300, plot = TRUE)
fit2 <- fitsvariog(vario=va, ini.cov.pars=c(0.03,100), nugget=0.1, max.dist=600, plot = TRUE)
# plot results
plot(va$svario$u, va$svario$v)
lines(fit1$fit, col="blue")
lines(fit2$fit, col="red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.