Description Usage Arguments Value Examples
View source: R/KMSubtractionError.R
This function conducts Monte Carlo simulations to evaluate the limits of error of KMSubtractionMatch() given parameters surrounding the reconstruction task required. Follow-up time was modeled by a random weibull distribution of common shape parameter of 1.000 and scale parameter of 5.000.
1 2 3 4 5 6 7 8 9 10 11 | KMSubtractionError(
n,
censor_overall.p,
censor_subgroup.p,
subgroup.p,
interval = 8,
missing.p = 0,
mc = 1000,
ncores = 1,
fig.label = ""
)
|
n |
Size of overall cohort. |
censor_overall.p |
Proportion of patients with censorship status in the overall cohort, which may be found from the object of KMSubtractionMatch(). |
censor_subgroup.p |
Proportion of patients with censorship status in the subgroup cohort, which may be found from the object of KMSubtractionMatch(). |
subgroup.p |
Proportion of reported subgroup. |
interval |
Number of number-at-risk table intervals. |
missing.p |
Proportion of missing data from the opposing subgroup. Default is set at 0.00. |
mc |
Number of Monte Carlo iterations. Default is set at 1000. |
ncores |
Number of cores to be utilized for parallel processing. The number of cores in your device may be found using the function 'parallel::detectCores()' from the parallel package. |
Reconstructed and original survival data were compared by means of marginal Cox-proportional hazard models and restricted mean survival time difference (RMSTD). This function returns density plots per matching algorithm for both ln(HR) and RMST-Difference; as well as summary statistics in table format.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | Size of dataset, censorship proportion and subgroup proportion may be retrieved from the KMSubtractionMatch object, under Parameters.
data(cancer)
df_overall=colon
df_subgroup=colon[1:200,]
match=KMSubtractionMatch(df_overall, df_subgroup, matching="bipartite")
match$Parameters
n=match$Parameters[1,1]
subgroup.p=match$Parameters[3,1]
censor_overall.p=match$Parameters[4,1]
censor_subgroup.p=match$Parameters[5,1]
KMSubtractionError(n=n,
mc=1000,
censor_overall.p=censor_overall.p,
censor_subgroup.p=censor_subgroup.p,
subgroup.p=subgroup.p,
interval=8,
missing.p=0.02,
ncores=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.