Learn R Programming

blm (version 2012.2.4)

EO: Compute the ratio of expected event to observed events for blm and lexpit objects.

Description

Returns a list of expected to observed counts and the specified confidence interval. The argument group can be used to estimate this ratio by the categories of the categorical variable group. If population-based case-control data is used to fit the model, the expected counts are for the population and make use of the sampling weights.

Usage

EO(object, index = NULL, level = 0.95)

Arguments

object
object of class blm or lexpit
index
factor for computing E/O comparison by subgroups
level
numeric, confidence level (between 0 and 1) for the E/O ratios

Value

  • Data frame with: [object Object],[object Object],[object Object],[object Object],[object Object]

Examples

Run this code
data(ccdata)

fit <- blm(y~female+packyear,data = ccdata,
			weight = ccdata$w, strata = ccdata$strata)

EO(fit)

EO(fit, ccdata$strata) # BY FACTOR

Run the code above in your browser using DataLab