On Aug 11, 2010, at 4:53 AM, Dorothea Kirchner wrote:

Hi,

I try to calculate confidence intervals for SMRs using the pois.exact
()-function from the package "epitools". But I have some troubble with the NAs. How can I remove the NAs out of my analysis? It doesn't work if I set the
argument: $CI<-pois.exact($SMR, na.rm = TRUE).

You will need to pre-process your data. The help page for pois.exact makes no indication that it has an na.rm argument or that it will pass arguments on to subsequent methods. There are functions for removal of NA values.

?na.omit
?complete.cases

(Caveat: I am not experienced with the use of this package.) It appears that pois.exact expects at least two arguments, "x" (=counts) and "pt" (=person-time), and therefore providing SMR's (= x/pt ) may not give you desired results. The function will provide a rate as output although the author appropriately calls it a "crude rate". I am also puzzled by the use of leading "$"'s in variable names. That is not a formalism with which I am aware. You didn't provide any sample data or show what error messages you were getting so it's not possible to say what other problems may exist.

--

David Winsemius, MD
West Hartford, CT

_______________________________________________
R-sig-Epi@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-epi

Reply via email to