Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Defines an univariate statistical summary data type. More...
#include <univariate_summary.h>
Public Member Functions | |
UnivariateSummary () | |
Initialises a new instance of the UnivariateSummary class. More... | |
UnivariateSummary (const std::string name) | |
Initialises a new instance of the UnivariateSummary class. More... | |
UnivariateSummary (const std::vector< double > values) | |
Initialises a new instance of the UnivariateSummary class. More... | |
UnivariateSummary (const std::string name, const std::vector< double > values) | |
Initialises a new instance of the UnivariateSummary class. More... | |
std::string | name () const noexcept |
Gets the factor or variable name. More... | |
bool | is_empty () const noexcept |
Determine whether the summary is empty. More... | |
unsigned int | count_valid () const noexcept |
Gets the number of valid data points included in the summary. More... | |
unsigned int | count_null () const noexcept |
Gets the number of null data points, not included in the summary. More... | |
unsigned int | count_total () const noexcept |
Gets the total number of data points. More... | |
double | min () const noexcept |
Gets the minimum. More... | |
double | max () const noexcept |
Gets the maximum. More... | |
double | range () const noexcept |
Gets the summary data range. More... | |
double | sum () const noexcept |
Gets the sum value. More... | |
double | average () const noexcept |
Gets the average or mean. More... | |
double | variance () const noexcept |
Gets the sample variance. More... | |
double | std_deviation () const noexcept |
Gets the sample standard deviation. More... | |
double | std_error () const noexcept |
Gets the standard error. More... | |
double | kurtosis () const noexcept |
Gets the kurtosis. More... | |
double | skewness () const noexcept |
Gets the skewness. More... | |
void | clear () noexcept |
Clears current summary (empty) More... | |
void | append (double value) noexcept |
Append a new data point to the summary. More... | |
void | append (const std::optional< double > &option) noexcept |
Append a new data point or null value to the summary. More... | |
void | append (const std::vector< double > &values) noexcept |
Append multiple data points to the summary. More... | |
void | append_null () noexcept |
Append a single null value to the summary. More... | |
void | append_null (unsigned int count) noexcept |
Append multiple null values to the summary. More... | |
std::string | to_string () const noexcept |
Convert this instance to a string representation. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &stream, const UnivariateSummary &summary) |
Output streams operator for UnivariateSummary type. More... | |
Defines an univariate statistical summary data type.
Calculates running summaries using statistical moments for constant storage size without storing the data points. Null values can be counted but are not included in any calculations.
hgps::core::UnivariateSummary::UnivariateSummary | ( | ) |
Initialises a new instance of the UnivariateSummary class.
hgps::core::UnivariateSummary::UnivariateSummary | ( | const std::string | name | ) |
Initialises a new instance of the UnivariateSummary class.
name | The factor or variable name |
hgps::core::UnivariateSummary::UnivariateSummary | ( | const std::vector< double > | values | ) |
Initialises a new instance of the UnivariateSummary class.
values | The values to summary |
hgps::core::UnivariateSummary::UnivariateSummary | ( | const std::string | name, |
const std::vector< double > | values | ||
) |
Initialises a new instance of the UnivariateSummary class.
name | The factor or variable name |
values | The values to summary |
|
noexcept |
Append a new data point or null value to the summary.
option | The optional value to add |
|
noexcept |
Append multiple data points to the summary.
values | The values to add |
|
noexcept |
Append a new data point to the summary.
value | The value to add |
|
noexcept |
Append a single null value to the summary.
|
noexcept |
Append multiple null values to the summary.
count | The number of null values to add |
|
noexcept |
Gets the average or mean.
|
noexcept |
Clears current summary (empty)
|
noexcept |
Gets the number of null data points, not included in the summary.
|
noexcept |
Gets the total number of data points.
|
noexcept |
Gets the number of valid data points included in the summary.
|
noexcept |
Determine whether the summary is empty.
|
noexcept |
Gets the kurtosis.
|
noexcept |
Gets the maximum.
|
noexcept |
Gets the minimum.
|
noexcept |
Gets the factor or variable name.
|
noexcept |
Gets the summary data range.
|
noexcept |
Gets the skewness.
|
noexcept |
Gets the sample standard deviation.
|
noexcept |
Gets the standard error.
|
noexcept |
Gets the sum value.
|
noexcept |
Convert this instance to a string representation.
|
noexcept |
Gets the sample variance.
|
friend |
Output streams operator for UnivariateSummary type.
stream | The stream to output |
summary | The UnivariateSummary instance |