underhill_smoother: Fit the underhill smoother to a reporting rate distribution

Description Usage Arguments Details Value Examples

View source: R/underhill_smoother.R

Description

Fit the underhill smoother (put reference here) to reporting rate distribution over pentades.The underhill smoother is a locally weighted binomial general linear model using a logit link, where the weights are generated using a exponential distribution.

Usage

1
2
3
underhill_smoother(raw_data, species_id, start_month = 7,
  selected_area = "Kenya", selection_type = "Country", pentade_window,
  first_pentade = 1, last_pentade = 73)

Arguments

raw_data

Data for a species extracted uing 'extract_data()'. The StartDate column should be of type 'date'.

species_id

The species_id for which data is extracted. A complete list of species name and ids are available on the Kenya Bird Map website.

start_month

The month to start the pentades from. Default is 7.

selected_area

Either a pentad (eg: 0105_3930), country (eg: Kenya), county (eg: Kitui) or province (eg: rift valley). Lists of the same can be applied as well. For instance, for multiple pentads you could use, c('0105_3930', '0110c3620').

selection_type

Can take either of the four values: 'Pentad', 'Country', 'County' or 'Province'.

pentade_window

The number of pentades on either side of the target day to give the weights to.

first_pentade

The starting value of the pentades. Default is 1.

last_pentade

The last value of the pentades. Default is 73.

Details

Value

A dataframe where each row is a pentade with the 'fit' values, the standard errors ('se'), the 'reporting_rates' and its associated inputs. Ignore the various date columns as those are only meant to be used in graphs.

Examples

1
2
3
4
5
6
7
## Not run: 


underhill_smoother(raw_data, species_id, start_month = 7, pentade_window, first_pentade = 1, last_pentade = 73)


## End(Not run)

davidclarance/africabirdmap documentation built on Sept. 3, 2019, 12:34 p.m.