Description Usage Arguments Value See Also Examples
View source: R/fitAndTestCuminc.R
Fits cumulative incidence function across different groups and risks.
1 |
time |
vector with times of the first event or follow-up, must be numeric. |
risk |
vector with type of event, can be numeric or factor/character. |
group |
vector with group variable, can be numeric or factor/character. |
cens |
value of 'risk' indicating censored observation (if NULL, the first value of 'risk' vector will be taken). |
list of length [(number of risks)*(number of groups) + 1], containing estimation of cumulative incidences curves for each risk and group. The last element of a list is a data.frame with results of a K-sample test, containing test statistic, p-value and degrees od freedom for each risk.
1 |
Loading required package: ggplot2
Loading required package: survival
Loading required package: cmprsk
Loading required package: gridExtra
19 cases omitted due to missing values
Tests:
stat pv df
death 0.047302722 0.827825 1
new_tumor 0.000650194 0.979657 1
Estimates and Variances:
$est
1000 2000 3000 4000 5000 6000
female death 0.3452837 0.5808543 0.6635543 0.6635543 0.7278766 0.7278766
male death 0.3090177 0.4747059 0.6531926 0.7012467 0.7012467 0.7012467
female new_tumor 0.1296415 0.1434789 0.1434789 0.2078012 0.2078012 0.2078012
male new_tumor 0.1050303 0.1545910 0.1545910 0.1545910 0.1545910 0.1545910
$var
1000 2000 3000 4000 5000
female death 0.0023015948 0.004031912 0.005511198 0.005511198 0.008173257
male death 0.0023423777 0.004253219 0.007199651 0.007056869 0.007056869
female new_tumor 0.0010807709 0.001237569 0.001237569 0.005714376 0.005714376
male new_tumor 0.0008818643 0.002177665 0.002177665 0.002177665 0.002177665
6000
female death 0.008173257
male death 0.007056869
female new_tumor 0.005714376
male new_tumor 0.002177665
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.