
Test multiple K values
tess_ktest.RdTest multiple K values
Usage
tess_ktest(
gen,
coords,
Kvals = 1:10,
grid = NULL,
tess_method = "projected.ls",
lambda = 1,
K_selection = "manual",
ploidy = 2,
quiet = FALSE
)Arguments
- gen
genotype dosage matrix (rows = individuals & columns = snps) or
vcfRobject- coords
coordinates of samples as sf points, a two-column matrix, or a data.frame representing x and y coordinates (see Details for important information about projections)
- Kvals
vector of K values to test
- grid
SpatRaster for kriging
- tess_method
the type of TESS method to be run ("projected.ls" for projected least squares algorithm (default) or "qp" for quadratic programming algorithm)
- lambda
numeric value for the spatial regularization parameter. The default value lambda = 1 attributes equal weights to the loss function and to the penalty function.
- K_selection
how to perform K selection ("manual" to enter into console (default) or "auto" for automatic selection based on bestK)
- ploidy
ploidy of data (defaults to 2)
- quiet
whether to operate quietly and suppress the output of tables and figures (defaults to FALSE)
See also
Other TESS functions:
allK_plot_helper(),
bestK(),
geom_tess(),
ggbarplot_helper(),
pops_helper(),
tess_barplot(),
tess_col_default(),
tess_do_everything(),
tess_ggbarplot(),
tess_ggplot(),
tess_krig(),
tess_legend(),
tess_plot_allK()