Description Usage Arguments Value Examples
A grade of membership model for clustering a site by features data - which could be presence-absence or counts abundance data of species in the sites.
1 2 3 4 5 6 7 8 |
dat |
input data matrix of samples along rows and features along sites, with each entry a 0/1 signififying presence/absence or counts of abundances. |
K |
The number of clusters to fit |
tol |
The tolerance level of the model. |
num_trials |
Number of EM runs from different starting points. This is' key for picking the best fit model across multiple runs. |
fit_control |
The control parameters for the model. |
Returns a model fit with omega
as cluster membership
probabilities and theta
as cluster feature matrix.
1 2 3 4 5 6 | data("himalayan_birds")
species_abundance_counts <- t(exprs(himalayan_birds));
fit <- ecostructure_fit(species_abundance_counts, K = 2, tol = 0.1)
species_pa_counts <- species_abundance_counts
species_pa_counts[species_pa_counts >=1] = 1
fi2 <- ecos_fit(species_pa_counts, K = 2, tol = 0.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.