---
title: "Fit_Statistics"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Fit_Statistics}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

The following table explains each of the fit statistics included in this package's `get_fit_stats`. The "better_direction" column indicates how to compare the statistic across models. "Higher" means that the model with the higher statistic has better fit (such as iAUC), and "Lower" means the opposite.


```{r, echo=F}
library(knitr)
a <- c("Harrel.C.Index","Uno.C.Index","iAUC","iAUC.IQR","iAUC.Q10.Q90","iAUC.Full",
       "AUC.Median","AUC.Mean","C.Index","MAE","IAE","ISE","IAE.IQR","ISE.IQR",
       "IAE.Q10.Q90","ISE.Q10.Q90","IAE.Full","ISE.Full","Brier.Median",
       "Brier.Mean","IBS","IBS.Full")
b <- c('survival::concordance','survival::concordance','survAUC::AUC.uno','survAUC::AUC.uno',
       'survAUC::AUC.uno','survAUC::AUC.uno','survAUC::AUC.uno','survAUC::AUC.uno',
       'SurvMetrics::Cindex','SurvMetrics::MAE','SurvMetrics::IAEISE','SurvMetrics::IAEISE',
       'SurvMetrics::IAEISE','SurvMetrics::IAEISE','SurvMetrics::IAEISE',
       'SurvMetrics::IAEISE','SurvMetrics::IAEISE','SurvMetrics::IAEISE',
       'SurvMetrics::Brier','SurvMetrics::Brier','SurvMetrics::IBS','SurvMetrics::IBS')
c <- c('Higher','Higher','Higher',
       'Higher','Higher','Higher',
       'Higher','Higher','Higher',
       'Lower','Lower','Lower',
       'Lower','Lower','Lower',
       'Lower','Lower','Lower',
       'Lower','Lower','Lower','Lower')
d <- c("survival's native concordance function with default time weights provides Harrel's C Statistic.","survival's native concordance function, using Uno's weight's.","Integrated AUC across the observed times in the sample data.","Integrated AUC across the every possible time in the IQR. If the IQR is (10, 40) then this is the iAUC across times 10, 11, 12... 40.","Integrated AUC across the every possible time between the 10% Quantile and the 90% Quantile.","Integrated AUC across every possible time point from 1 to the longest observed time.","AUC calculated at the median sample time.","AUC calculated at the mean sample time.","C Index calculated using a different package. Often supplies a slightly different value than the survival function.","Mean Absolute Error via the SurvMetrics package. Average of the differences  between predicted and actual observation times. Ignores censored values.","Integrated Absolute Error using the times in the sample data.","Integrated Squared Error using the times in the sample data.","Integrated Absolute Error using each possible time within the IQR.","Integrated Squared Error using each possible time within the IQR.","Integrated Absolute Error using each possible time between the 10% and 90% quantiles.","Integrated Squared Error using each possible time between the 10% and 90% quantiles.","Integrated Absolute Error using the every possible time from 1 to the longest observed time.","Integrated Squared Error using the every possible time from 1 to the longest observed time.","Brier Score at median time.","Brier Score at mean time.","Integrated Brier Score using the observed sample times.","Integrated Brier Score using all possible times from 1 to the longest observed time.")

kable(data.frame(statistic=a,source_package=b,better_direction=c,notes=d)) 
```
