Re: [R] Epidemiology Tools

About this list Date view Thread view Subject view Author view Attachment view

From: Thomas Lumley (tlumley@u.washington.edu)
Date: Wed 05 May 2004 - 00:12:36 EST


Message-id: <Pine.A41.4.58.0405040652360.64916@homer34.u.washington.edu>

On Mon, 3 May 2004, Francis Dimzon wrote:

> Hi all,
>
> Please help on this. We will be teaching epidemiology using opensource
> software. What are R built-in functions or functions in available packages
> that are capable of doing these:
>
> a) Logistic regression (glm?)

glm

> b) Conditional logistic regression

clogit (survival package)

> c) Logistic regression with random effects

It depends what you mean. Random intercept models are in the glmmML
package, approximate maximum likelihood for more complicated models (PQL) is
available in MASS and nlme packages. Doug Bates is making progress on
more accurate approximations, but I'm not sure where he's got to.

Personally, I teach marginal models (GEE estimates) before random
effects effects models to epidemiologists. GEE is in the gee and geepack
packages. (I realise this is a minority view, but it is based on
experience).

> d) Beta-binomial regression

Don't know. I'd use a logistic regression model with sandwich variances
(eg gee or glm with robcov from the Design package). I don't see any real
advantage of beta-binomial regression.

> e) Poisson regression
glm

> f) Weibull regression

survreg in the survival package

> g) Exponential regression

For censored data, survreg, for uncensored data, glm

> h) Cox proportional hazards regression
coxph in survival

> i) Cox regression with time repeated covariables
coxph in survival

> j) Kaplan-Meier Analysis and Plots

survfit and survdiff (for left-truncated data you need to use coxph).

> k) Post-fit analysis with plots, delta-betas, hazard functions
Just about every model has delta-betas. For the Cox model look at the
help page help(residuals.coxph).

Tests and graphical diagnostics for the proportional hazards assumption
are in cox.zph. survfit() gives fitted survival curves

Hazard rate functions are estimated by the muhaz package.

> l) meta analysis

rmeta (which is also useful for Mantel-Haenszel-type analyses of
stratified 2x2 tables, and for drawing forest plots even outside
meta-analyses).

        -thomas

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:07 EST