summary.pooledBinDiff: Summarize 'pooledBinDiff'/'pIRDiff' objects

summary.pooledBinDiffR Documentation

Summarize pooledBinDiff/pIRDiff objects

Description

The functions provide more detail underlying the results from pooledBinDiff/pIRDIff

Usage

## S3 method for class 'pooledBinDiff'
summary(object, simple = FALSE, ...)
## S3 method for class 'pIRDiff'
summary(object, simple = FALSE, ...)

## S3 method for class 'summary.pooledBinDiff'
print(x, ...)
## S3 method for class 'summary.pooledBinDiff'
x[i, j, drop = if (missing(i)) TRUE else length(cols) ==  1]
## S3 method for class 'summary.pIRDiff'
print(x, ...)
## S3 method for class 'summary.pIRDiff'
x[i, j, drop = if (missing(i)) TRUE else length(cols) ==  1]

Arguments

object

object of class pooledBinDiff or pIRDiff

x

object of class summary.pooledBinDiff/summary.pIRDiff

simple

logical. If TRUE return a data frame with estimates, confidence intervals, total number of individuals, number of positive pools, and scale, by group; if FALSE return a more complete description of the call.

i,j

elements to extract or replace. For [ and [[, these are numeric or character or, for [ only, empty or logical. Numeric values are coerced to integer as if by as.integer.

drop

logical. If TRUE the result is coerced to the lowest possible dimension. The default is to drop if only one column is left, but not to drop if only one row is left.

...

future arguments

Details

In addition to the estimates and confidence intervals for the difference, details for the indivdiual gropus including the total number of individuals included, the number of pools, and the number of "positive" pools are given. Printing the result reports these, along with which point and confidence interval methods were used and the call.

The subsetting or extractor functions [.pooledBin and [.pIR mimic the same [ behavior as with data frames.

Value

The original pooledBinDiff/pIRDiff object with additional list elements

pt.method

the specified point estimate method to be used

ci.method

the specified confidence interval methods to be used

and attributes class, grp.pooledBin, PtEstName, CIEstName, and scale

Author(s)

Brad Biggerstaff

See Also

pooledBinDiff, pIRDiff

Examples


x1 <- c(0,0,1,2)
m1 <- c(1,5,10,50)
n1 <- c(5,5,5,5)

x2<- c(0,1,0,4)
m2 <- m1
n2 <- n1

ex.dat <- data.frame(NumPos = c(x1,x2),
                      NumPos2 = c(1,0,0,1,1,0,0,0),
                      PoolSize = c(m1,m2),
                      NumPools = c(n1,n2),
                      Population = rep(1:2, each=4))

pbd <- pooledBinDiff(NumPos ~ PoolSize + n(NumPools) | Population, data = ex.dat)
summary(pbd)



bjbiggerstaff/PooledInfRate documentation built on Jan. 19, 2024, 6:54 p.m.