to.or {RelativeRisk}R Documentation

To odds ratios

Description

A Logit-Log translation that converts relative risks into odds ratios.

Usage

        to.or(rr,limit=c(1,0),scaled=TRUE,oneSided=FALSE)

Arguments

rr A vector of relative risks,including the constant.
limit A vector or matrix of variable limits (upper,lower). If a matrix, there should be no row for the constant. A vector will be expanded into a matrix.
scaled If FALSE, raw coefficients from glm() will be expected.
oneSided TRUE if only the upper limit is to be used.

Details

This function estimates odds ratios by using Logit-Log translations from a GLM log fit to coefficients for a GLM logistic fit. The translation is not perfect, but the errors are modest.

Value

A vector of odds ratios including the constant.

Note

Logit-Log translations are obtained by equating the coefficients for p of the logistic and log models.

Author(s)

Bob Wheeler bwheelerg@gmail.com

Please cite this program as follows:

Wheeler, R.E. (2009). to.or RelativeRisk. The R project for statistical computing http://www.r-project.org/


[Package RelativeRisk version 1.1-1 Index]