R/effort.R
make_effort_mod_pca.Rd
Model the effect of principal components on taxa richness.
make_effort_mod_pca(
df,
env_prcomp,
context = "cell",
cores = 4,
response = "sr",
response_min_thresh = 2,
threshold_lo = 0.05/2,
threshold_hi = 0.05/2,
effort_col = "qsize",
effort_col_thresh = 3 * 3,
out_file = NULL,
...
)
Dataframe. Cleaned data specifying context.
Output from env_pca.
Character. Column names that define context, usually a 'visit' to a 'cell'.
Numeric. Number of cores available for running chains in rstanarm model.
Character. Name to give the 'response' variable column. Default is 'sr' for 'species richness'.
Numeric. Threshold below which to filter df
before running the model. Default '2' excludes singleton sites.
Numeric between 0 and 1 specifying the threshold above/below which richness is excessively above or below 'normal' and should be filtered.
Character (or NULL
). Name of column with some measure of
effort. If NULL
, all contexts will be used.
Numeric. effort_col
(if used) will be filtered
below this threshold. This could be used to, say, filter very small quadrats.
Character. Optional path to save output.
Passed to rstanarm::stan_glm()
.
List of model outputs.