create_diag_control {eufmdis.adapt}R Documentation

Data analysis for diagnostic samples during the control phase

Description

Function to perform the data analysis, necessary for the analysis of the diagnostic samples during the control phase

Usage

create_diag_control(
  herd_summary,
  farm_summary,
  par_diag_control_ffd_prev,
  par_diag_control_ffd_certainty,
  par_diag_control_edta,
  par_diag_control_serum,
  par_diag_control_bulk_milk,
  par_diag_control_lesions_smrum,
  par_diag_control_lesions_pigs,
  par_diag_control_lesions_cattle,
  rel_cols_farm_summary_dc,
  rel_cols_herd_summary_dc,
  herd_types_dairy,
  herd_types_small_ruminants,
  herd_types_pigs,
  herd_types_cattle
)

Arguments

herd_summary

Data frame; EuFMDIS output file "Herd summary"

farm_summary

Data frame; EuFMDIS output file "Farm summary"

par_diag_control_ffd_prev

numeric between 0 and 100; design prevalence for the computation of the sample size according to freedom from disease

par_diag_control_ffd_certainty

numeric between 0 and 100; desired accuracy for the computation of the sample size according to freedom from disease

par_diag_control_edta

positive integer; Number of blood samples (EDTA) per symptomatic suspect holding

par_diag_control_serum

positive integer; Number of blood samples (serum) per symptomatic suspect holding

par_diag_control_bulk_milk

positive integer; Number of bulk milk samples per dairy farm

par_diag_control_lesions_smrum

positive integer; Number of acute lesion samples for small ruminants per farm

par_diag_control_lesions_pigs

positive integer; Number of acute lesion samples for pigs per farm

par_diag_control_lesions_cattle

positive integer; Number of acute lesion samples for cattle per farm

rel_cols_farm_summary_dc

character vector of column names of the data frame farm_summary that are required for the analysis

rel_cols_herd_summary_dc

character vector of column names of the data frame herd_summary that are required for the analysis

herd_types_dairy

character vector listing the different herd types that are associated with dairy herds

herd_types_small_ruminants

character vector listing the different herd types that are associated with small ruminant herds

herd_types_pigs

character vector listing the different herd types that are associated with pig herds

herd_types_cattle

character vector listing the different herd types that are associated with cattle herds

Details

This function is used internally to prepare the input data for the output (tables and plots) in the sub menu "Diagnostic tests control phase" of the ADAPT App.

Value

Returns an aggregated data frame with one line per simulation run. The data frame contains auxilliary variables needed to appriximate the number of diagnostic samples required during the control phase as well as the estimated values for number of bulk milk samples (n_bulk_milk), acute lesions (n_acute_lesion), swabs (n_swabs), blood samples for edta analysis (n_blood_edta) and serum analysis (n_blood_serum).


[Package eufmdis.adapt version 0.1.0 Index]