to.or {RelativeRisk} | R Documentation |
A Logit-Log translation that converts relative risks into odds ratios.
to.or(rr,limit=c(1,0),scaled=TRUE,oneSided=FALSE)
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. |
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.
A vector of odds ratios including the constant.
Logit-Log translations are obtained by equating the coefficients for p of the logistic and log models.
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/