Free Republic
Browse · Search
News/Activism
Topics · Post Article

To: madg
Because pyears may have several time variables, it is necessary that all of them be in the same units. For instance in the call py <- pyears(futime ~ rx + ratetable(age=age, sex=sex, year=entry.dt)) with a ratetable whose natural unit is days, it is important that futime, age and entry.dt all be in days. Given the wide range of possible inputs, it is difficult for the routine to do sanity checks of this aspect. A special function tcut is needed to specify time-dependent cutpoints. For instance, assume that age is in years, and that the desired final arrays have as one of their margins the age groups 0-2, 2-10, 10-25, and 25+. A subject who enters the study at age 4 and remains under observation for 10 years will contribute follow-up time to both the 2-10 and 10-25 subsets. If cut(age, c(0,2,10,25,100)) were used in the formula, the subject would be classifed according to his starting age only. The tcut function has the same arguments as cut, but produces a different output object which allows the pyears function to correctly track the subject. The results of pyears() are normally used as input to further calculations. The print routine, therefore, is designed to give only a summary of the table. (your link)
44 posted on 02/14/2003 4:27:34 PM PST by fight_truth_decay (Occupied)
[ Post Reply | Private Reply | To 37 | View Replies ]

Free Republic
Browse · Search
News/Activism
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson