add_risk_factor: Adds a risk factor to a new infection dataset

View source: R/glm_nwinf_lagged.R

add_risk_factorR Documentation

Adds a risk factor to a new infection dataset

Description

Adds a risk factor to a new infection dataset

Usage

add_risk_factor(
  nwinf = nwinf_data(),
  rf_data,
  rf_col = character(),
  rf_date_col = character(),
  lag1 = 6,
  lag2 = 12,
  FUN = sum
)

Arguments

nwinf

a dataset created with the make_nwinf_data() function

rf_data

risk factor data. Ids for farms must be the same as in the original test results data.

rf_col

name of the column containing the risk factor data

rf_date_col

name of the column with date of risk factor occurrence

lag1

start of interval between risk factor occurrence and new infection

lag2

end of interval between risk factor occurrence and new infection


AurMad/STOCfree documentation built on Sept. 13, 2022, 3:20 a.m.