prepare_analysis_dataset: Create the analysis dataset based on the available raw data

View source: R/prepare_analysis_dataset.R

prepare_analysis_datasetR Documentation

Create the analysis dataset based on the available raw data

Description

This analysis fits an unweighed model but adds the stratum effect. The indices per year of the different strata are combined with a linear combination into a single index per year.

Usage

prepare_analysis_dataset(
  scheme_id,
  species_group_id,
  species,
  location_group_id,
  seed = 20070315,
  observation,
  repo,
  base,
  project,
  overwrite = FALSE,
  min_observation = 100,
  min_stratum = 3,
  min_cycle = 2,
  proportion = 0.15,
  verbose = TRUE,
  family
)

Arguments

scheme_id

a string with the scheme id.

species_group_id

the species_group ID

species

The fingerprint of the species.

location_group_id

the location_group ID

seed

The seed for the analysis. Defaults to 20070315.

observation

The dataframe with the visits and location group.

repo

a git2rdata::repository() object

base

The base location to store the model.

project

Will be a relative path within the base location.

overwrite

Should an existing object be overwritten? Defaults to TRUE.

min_observation

The minimum number of observations for taking a species into account. Defaults to 100.

min_stratum

The required minimum number of relevant locations per stratum. Defaults to 3.

min_cycle

Minimum number of cycles in which a species must be found at a square. Square with sightings from fewer cycles will be ignored. Defaults to 2.

proportion

Minimum proportion of the least important period. Defaults to 0.15.

verbose

display the progress

family

The statistical distribution to use for this species.

Value

A data.frame with the species id number of rows in the analysis dataset, number of presences in the analysis dataset and SHA-1 of the analysis dataset or NULL if not enough data.


INBO-Natura2000/abvanalysis documentation built on March 29, 2023, 9:17 p.m.