Learn R Programming

dpcR (version 0.5)

moments-methods: Calculate Moments of Poisson Distribution

Description

Computes moments of a Poisson distribution. The calculations are based on values of positive and total partitions or the theoretical lambda value.

Usage

moments(input)

Arguments

input

a vector with two elements (the first element is treated as a number of positive partitions and the second as a number of total partitions) or a matrix with two columns (first columns contains numbers of positive partitions and the second total numbers of total partitions) or an object of class '>dpcr .

Value

A data frame with four columns: name of the experiment, name of the replicate, method of computation (theoretical or empirical), name of the moment and the value of the moment. The theoretical moments are computed using the lambda value and the empirical using the sample values.

Examples

Run this code
# NOT RUN {
# moments for 100 positive partitions of 765 total partitions
moments(c(100, 765))

# calculate moments for an array digital PCR
moments(six_panels)

# }

Run the code above in your browser using DataLab