tab {Epi} | R Documentation |
A two-way table of records and transitions classified by states
(lex.Cst
and lex.Xst
), as well the risk time in each state.
## S3 method for class 'Lexis': tab( x, simplify=TRUE, scale=1, ... )
x |
A Lexis object. |
simplify |
Should rows with 0 follow-up time be dropped? |
scale |
Scaling factor for the rates. The calculated rates are multiplied by this number. |
... |
Other parameters - ignored |
The first part of the table gives the number of rows in the Lexis object,
classified by states. The D
column is the number of transitions i.e.
rows where lex.Cst != lex.Xst
, and the final column Y
is the person-years spent in each state.
A matrix with rows classified by states where persons spend time, and columns classified by stated to which persons transit. Two additonal columns of transitions from and time spent in each state is added.
Bendix Carstensen, bxc@steno.dk
data( nickel ) nic <- Lexis( data=nickel, entry=list(age=agein), exit=list(age=ageout,cal=ageout+dob,tfh=ageout-age1st), # Lung cancer deaths and other deaths are coded 1 and 2 exit.status=(icd > 0) + (icd %in% c(162,163)) ) str( nic ) head( nic ) tab.Lexis( nic ) tab( nic )