Package 'rseedcalc'

Title: Estimating the Proportion of Genetically Modified Seeds in Seedlots via Multinomial Group Testing
Description: Estimate the percentage of seeds in a seedlot that contain stacks of genetically modified traits. Estimates are calculated using a multinomial group testing model with maximum likelihood estimation of the parameters.
Authors: Kevin Wright [aut, cre], Jean-Louis Laffont [aut]
Maintainer: Kevin Wright <[email protected]>
License: GPL-2
Version: 1.3
Built: 2024-11-04 06:19:36 UTC
Source: https://github.com/cran/rseedcalc

Help Index


Estimation of the proportion of genetically modified stacked seeds in seedlots

Description

Estimate the percentage of seeds in a seedlot that contain stacks of genetically modified traits.

Details

The main functions for this package are stack2 and stack3.

For a complete list of functions, use library(help="rseedcalc")

Author(s)

Kevin Wright, Jean-Louis Laffont

Maintainer: Kevin Wright <[email protected]>


Multinomial group testing estimation of stacked genes

Description

Assuming qualitative tests are performed on n pools of m seeds, use multinomial group testing to estimate the percent of seeds with single genetic traits and the percentage of seeds with stacked genetic traits.

Print method for seedstack object.

Usage

stack3(n, m, nA, nB, nC, nAB, nAC, nBC, nABC, existAB = "Yes",
  existAC = "Yes", existBC = "Yes", existABC = "Yes", fpr = 0,
  fnr = 0, check = TRUE)

stack2Excel(...)

stack3Excel(...)

stack2(n, m, nA, nB, nAB, existAB = "Yes", fpr = 0, fnr = 0,
  check = TRUE)

## S3 method for class 'seedstack'
print(x, ...)

Arguments

n

the number of pools

m

the number of seeds in each pool

nA

the number of positive pools for event A only

nB

the number of positive pools for event B only

nAB

the number of positive pools for both A and B

nC

the number of positive pools for event C only

nAC

the number of positive pools for both A and C

nBC

the number of positive pools for both B and C

nABC

the number of positive pools for both A and B and C

existAB

do seeds with a stacked event 'AB' exist?

existAC

do seeds with a stacked event 'AC' exist?

existBC

do seeds with a stacked event 'BC' exist?

existABC

do seeds with a stacked event 'ABC' exist?

fpr

false positive rate (proportion) for detecting GM events

fnr

false negative rate (proportion) for detecting GM events

check

Should simple checks be performed? Defaults to TRUE

...

Other arguments passed

x

A data frame to print pretty.

Details

The 'stack2Excel' and 'stack3Excel' functions are simple wrappers that are intended to be called from Excel and should not issue any warnings.

Value

A data frame with the estimated proportion of seeds for each event, the observed and expected number of positive pools, and whether or not each event can exist.

Author(s)

Kevin Wright, Jean-Louis Laffont

Examples

stack2(10, 300, 0, 1, 2)
stack3(20,150, 2,2,2,2,2,2,3, existAB="no", fnr=.02, fpr=.02)

#' Ensure probabilities are valid

Description

Force calculated probabilities into the range [0,1].

Usage

valid(x)

Arguments

x

probability

Details

Due to floating-point arithmetic, a number that should represent a probability can be calculated as being less than zero or greater than one. This function returns a value that is a valid probability.