Skip to content

sam::DependentVariable

Declaration of DependentVariable class. More...

#include <DependentVariable.h>

Public Functions

Name
bool isModified() const
bool isHacked() const
bool isCandidate() const
auto begin()
auto end()
float & operator[](std::size_t idx)
const float & operator[](std::size_t idx) const
DependentVariable() =default
DependentVariable(const arma::Row< float > & data)
void setHackedStatus(const bool status)
Sets the hacking status.
void setCandidateStatus(const bool status)
Sets the candidacy status.
arma::Row< float > & measurements()
Getter / Setter.
const arma::Row< float > & measurements() const
void setMeasurements(const arma::Row< float > & meas)
Sets the raw measurements values.
void addNewMeasurements(const arma::Row< float > & new_meas)
Adds new measurements to the currently available data.
void removeMeasurements(const arma::uvec & idxs)
Removes the measurements by their indices.
void updateStats()
Updates the descriptive statistics of the dependent variable.
void clear()
Reset the internal state of the dependent variable.
std::vector< std::string > Columns()
List the name of all avaliable variables.

Public Attributes

Name
float true_nobs_
float true_mean_
float true_std_
int nobs_
float mean_
float var_
float stddev_
float sei_
float stats_
float pvalue_
bool sig_
float effect_
float var_effect_
float se_effect_
int eff_side_
bool is_hacked_
int n_added_obs
int n_removed_obs
int id_
bool is_candidate_
Submission Meta Data.

Detailed Description

class sam::DependentVariable;

Declaration of DependentVariable class.

This class is an abstract representation of a dependant variable. It contains raw data, test statistics, and effect size measurements as well as some meta data for keeping track of true nobs, mean, and std values.

Public Functions Documentation

function isModified

inline bool isModified() const

function isHacked

inline bool isHacked() const

function isCandidate

inline bool isCandidate() const

function begin

inline auto begin()

function end

inline auto end()

function operator[]

inline float & operator[](
    std::size_t idx
)

function operator[]

inline const float & operator[](
    std::size_t idx
) const

function DependentVariable

DependentVariable() =default

function DependentVariable

inline explicit DependentVariable(
    const arma::Row< float > & data
)

function setHackedStatus

inline void setHackedStatus(
    const bool status
)

Sets the hacking status.

function setCandidateStatus

inline void setCandidateStatus(
    const bool status
)

Sets the candidacy status.

function measurements

inline arma::Row< float > & measurements()

Getter / Setter.

function measurements

inline const arma::Row< float > & measurements() const

function setMeasurements

inline void setMeasurements(
    const arma::Row< float > & meas
)

Sets the raw measurements values.

function addNewMeasurements

inline void addNewMeasurements(
    const arma::Row< float > & new_meas
)

Adds new measurements to the currently available data.

function removeMeasurements

inline void removeMeasurements(
    const arma::uvec & idxs
)

Removes the measurements by their indices.

function updateStats

void updateStats()

Updates the descriptive statistics of the dependent variable.

This updates all the descriptive statistics of the dependent variable.

function clear

void clear()

Reset the internal state of the dependent variable.

This clears and resets the internal state of the class.

function Columns

static std::vector< std::string > Columns()

List the name of all avaliable variables.

This is being used by the PersistenceManager::Writer to determine the name and number of columns

Public Attributes Documentation

variable true_nobs_

float true_nobs_ {0};

variable true_mean_

float true_mean_ {0};

variable true_std_

float true_std_ {0};

variable nobs_

int nobs_ {0};

variable mean_

float mean_ {0};

variable var_

float var_ {0};

variable stddev_

float stddev_ {0};

variable sei_

float sei_ {0};

variable stats_

float stats_ {0};

variable pvalue_

float pvalue_ {0};

variable sig_

bool sig_ {false};

variable effect_

float effect_ {0};

variable var_effect_

float var_effect_ {0};

variable se_effect_

float se_effect_ {0};

variable eff_side_

int eff_side_ {0};

variable is_hacked_

bool is_hacked_ {false};

variable n_added_obs

int n_added_obs {0};

variable n_removed_obs

int n_removed_obs {0};

variable id_

int id_;

Dependent variable's ID. This is being used by Policy to perform some searches

variable is_candidate_

bool is_candidate_ {false};

Submission Meta Data.


Updated on 29 June 2021 at 16:13:46 CEST


Last update: 2021-09-18