[R] sequential treatment of a vector for formula
ghowoo at gmail.com
Thu May 27 06:42:04 CEST 2010
I don't know if my understanding of P is right.
P ?= (the number of lives at the end of the interval)/(the number of lives
at the beginning of the interval)
### Compute proportion of a cohort that survives through the interval
### The formula is P0=L1/LO
## Original data is a vector of death days
## Count the frenquency of each death day
## Add more levels to fulfill days range
tb <- table(factor(example,levels=seq(0, max(example))))
iC <- data.frame("x"=names(tb),
A R learner.
View this message in context: http://r.789695.n4.nabble.com/sequential-treatment-of-a-vector-for-formula-tp2232517p2232598.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help