zinb_analysis_tool: Perform ZINB analysis on real data.

Description Usage Arguments Value Examples

View source: R/zinb_analysis_tool.R

Description

Perform ZINB analysis on real data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
zinb_analysis_tool(
  grp_data,
  pair_data,
  merge_list,
  min_freq = 15,
  min_size = 20,
  n_perm = 20,
  n_copies = round(detectCores()/2),
  seed = 1234
)

Arguments

grp_data

a data.frame containing the following 2 columns:

  • AE_NAME: The name of the Adverse Event (AE)

  • GROUP_NAME: The AE group of the AE

pair_data

a data.frame containing the following 3 columns:

  • ID: The unique identifier of the report

  • VAX_TYPE: The vaccines appeared in the report

  • AE_NAME: The AEs appeared in the report

    Please notice that this data reflects all the vaccine-AE combinations. If n1 AEs and n2 vaccines are mentioned in one reports, then n1*n2 pairs should be generated in the data.

merge_list,

a list with nesting lists, indicating which vaccines are of interest and which vaccines are to be merged. For example, if you are interested in vaccines FLU3 and FLU4, and you want to merge them into one vaccine FLU, you would like to add list(c('FLU3','FLU4'),'FLU') in this list

min_freq

a non-negative integer indicating the criteria for scarce AEs. If an AE appears less than 'min_freq' times in the data.frame pair_data, it will be labeled as scarce and be ignored in the study. It can be set to 0.

min_size

a positive integer indicating the criteria for small AE groups. If an AE group contains less than 'min_size' AEs, it will be label as a small AE group, and be ignored from the study.

n_perm

a positive integer that decide the number of permutations to determine the p value for observed RRs.

n_copies

a positive integer indicating the number of permutations can be done in parallel. This number is default to half of the computer's number of cores.

seed

to obtain reproducible result, you may want to set this seed.

Value

A big data.frame containing the following columns:

Examples

1
2
3
4
5
6
7
8
data(vaers_data)
data("dd.meddra")
data("merge_list")
big_data = zinb_analysis_tool(dd.meddra[1:10000,],
                              vaers_data[1:10000,],
                              merge_list,
                              n_perm = 2,
                              n_copies = 2)

zGPS.AO documentation built on Jan. 13, 2021, 6:16 p.m.