Summary and corresponding printing methods for objects of the classes
stats_dm
, basic_stats
, cafs
, quantiles
, delta_funs
, fit_stats
,
sum_dist
, and stats_dm_list
. These object types result from a call to
calc_stats()
.
Usage
# S3 method for class 'stats_dm'
summary(object, ..., round_digits = drift_dm_default_rounding())
# S3 method for class 'basic_stats'
summary(object, ...)
# S3 method for class 'cafs'
summary(object, ...)
# S3 method for class 'quantiles'
summary(object, ...)
# S3 method for class 'delta_funs'
summary(object, ...)
# S3 method for class 'fit_stats'
summary(object, ...)
# S3 method for class 'sum_dist'
summary(object, ...)
# S3 method for class 'stats_dm_list'
summary(object, ...)
# S3 method for class 'summary.stats_dm'
print(x, ..., show_header = TRUE, drop_cols = NULL)
# S3 method for class 'summary.basic_stats'
print(x, ...)
# S3 method for class 'summary.cafs'
print(x, ...)
# S3 method for class 'summary.quantiles'
print(x, ...)
# S3 method for class 'summary.delta_funs'
print(x, ...)
# S3 method for class 'summary.fit_stats'
print(x, ...)
# S3 method for class 'summary.sum_dist'
print(x, ...)
# S3 method for class 'summary.stats_dm_list'
print(x, ...)
Arguments
- object
an object of the respective class
- ...
additional arguments passed forward.
- round_digits
integer, specifying the number of decimal places for rounding the summary of the underlying data.frame. Default is 3.
- x
an object of the respective class.
- show_header
logical. If
TRUE
, a header specifying the type of statistic will be displayed.- drop_cols
character vector, specifying which columns of the table summarizing the underlying data.frame should not be displayed.
Value
For summary.*()
methods, a summary object of class corresponding to the
input class.
For print.*()
methods, the respective object is returned invisibly
Details
summary.stats_dm()
: Summarizesstats_dm
objects, returning the type, a summary of the underlying data.frame (summary_dataframe
), and, if possible, the number of unique IDs (n_ids
).summary.sum_dist()
: Extendssummary.stats_dm()
with additional information about the source (source
).summary.basic_stats()
: Extendssummary.sum_dist()
with additional information about the conditions (conds
).summary.cafs()
: Extendssummary.sum_dist()
with additional information about the bins (bins
) and conditions (conds
).summary.quantiles()
: Extendssummary.sum_dist()
with additional information about the quantile levels (probs
) and conditions (conds
).summary.delta_funs()
: Extendssummary.sum_dist()
with additional information about the quantile levels (probs
).summary.fit_stats()
: Identical tosummary.stats_dm
.summary.stats_dm_list()
: Applies the summary function to each element of the list and returns a list of the respective summary objects.
Note the following class relationships and properties:
basic_stats
,cafs
,quantiles
, anddelta_funs
are all inheriting fromsum_dist
.All
sum_dist
andfit_stats
objects are inheriting fromstats_dm
.Each
stats_dm_list
object is just a list containing instances ofstats_dm
.
Examples
# get a model with data for demonstration purpose
a_model <- dmc_dm(dx = .0025, dt = .0025, t_max = 2)
obs_data(a_model) <- dmc_synth_data
# now get some statistics and call the summary functions
some_stats <- calc_stats(a_model, type = c("quantiles", "fit_stats"))
summary(some_stats) # summary.stats_dm_list
#> Summary of Element 1: quantiles
#>
#> Dependent Variables:
#> Quant_corr Quant_err
#> Min. :0.324 Min. :0.299
#> 1st Qu.:0.410 1st Qu.:0.360
#> Median :0.464 Median :0.430
#> Mean :0.475 Mean :0.437
#> 3rd Qu.:0.530 3rd Qu.:0.491
#> Max. :0.672 Max. :0.698
#>
#> Sources: obs, pred
#> Conditions: comp, incomp
#> Probs: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9
#> -------
#>
#> Summary of Element 2: fit_stats
#>
#> Dependent Variables:
#> Log_Like AIC BIC
#> Min. :137 Min. :-260 Min. :-230
#> 1st Qu.:137 1st Qu.:-260 1st Qu.:-230
#> Median :137 Median :-260 Median :-230
#> Mean :137 Mean :-260 Mean :-230
#> 3rd Qu.:137 3rd Qu.:-260 3rd Qu.:-230
#> Max. :137 Max. :-260 Max. :-230
#>
#> -------
summary(some_stats$quantiles) # summary.quantiles
#> Type of Statistic: quantiles
#>
#> Dependent Variables:
#> Quant_corr Quant_err
#> Min. :0.324 Min. :0.299
#> 1st Qu.:0.410 1st Qu.:0.360
#> Median :0.464 Median :0.430
#> Mean :0.475 Mean :0.437
#> 3rd Qu.:0.530 3rd Qu.:0.491
#> Max. :0.672 Max. :0.698
#>
#> Sources: obs, pred
#> Conditions: comp, incomp
#> Probs: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9