Changes

Jump to navigation Jump to search
226 bytes added ,  08:33, 8 July 2022
Replaced non-functioning colon-indentation with spaces (2 per colon).
Line 21: Line 21:  
  <nowiki>class DataCell:public Object {
 
  <nowiki>class DataCell:public Object {
   −
:public:
+
  public:
   −
::AnovaDataSet *data_set;  // belongs to this AnovaDataSet
+
    AnovaDataSet *data_set;  // belongs to this AnovaDataSet
   −
::Boolean missing; // TRUE if this cell is not represented...
+
    Boolean missing; // TRUE if this cell is not represented...
   −
::LineOfCells *row, *column;  
+
    LineOfCells *row, *column;  
   −
:::// this cell belongs to this row and this column
+
      // this cell belongs to this row and this column
   −
:::// so it is the intersection of this row and column
+
      // so it is the intersection of this row and column
   −
::unsigned long n; // number of observations in this cell (X)
+
    unsigned long n; // number of observations in this cell (X)
   −
::double *observations; // array of observation values
+
    double *observations; // array of observation values
   −
::unsigned long arraySize; // current size of the array
+
    unsigned long arraySize; // current size of the array
   −
:::// observations are "1"-indexed within this array
+
      // observations are "1"-indexed within this array
   −
::double total; // sum of all observations in this cell
+
    double total; // sum of all observations in this cell
   −
::double mean; // mean of all observations in this cell
+
    double mean; // mean of all observations in this cell
   −
::double unbiased_variance; //  sum of squares of observations divided by n-1
+
    double unbiased_variance; //  sum of squares of observations divided by n-1
   −
::double biased_variance; // sum of squares of observations divided by n
+
    double biased_variance; // sum of squares of observations divided by n
   −
::double deviation; // unbiased standard deviation
+
    double deviation; // unbiased standard deviation
   −
::DataCell(); // constructor to make the  cell;  
+
    DataCell(); // constructor to make the  cell;  
   −
::://initializes the array of observations to CELL_PAGE_SIZE
+
      //initializes the array of observations to CELL_PAGE_SIZE
   −
::~DataCell(); // destructor that deallocates the array of observations
+
    ~DataCell(); // destructor that deallocates the array of observations
   −
::void AddObservation(double datum); // set the i-th observation to this value
+
    void AddObservation(double datum); // set the i-th observation to this value
   −
::void Update(void); // recalculate the mean and the deviation
+
    void Update(void); // recalculate the mean and the deviation
   −
:};
+
  };
 
</nowiki>
 
</nowiki>
   Line 74: Line 74:  
  <nowiki>class LineOfCells:public Object {
 
  <nowiki>class LineOfCells:public Object {
   −
:// could be a row of cells or a column of cells
+
  // could be a row of cells or a column of cells
   −
:public:
+
  public:
   −
::char name[256]; // name of this line of cells
+
    char name[256]; // name of this line of cells
   −
::AnovaDataSet *data_set; // belongs to this data set
+
    AnovaDataSet *data_set; // belongs to this data set
   −
::ListObject *cells; // these cells are in this line
+
    ListObject *cells; // these cells are in this line
   −
::double total; // total of all observations in this line
+
    double total; // total of all observations in this line
   −
::double mean; // mean of all observations in this line
+
    double mean; // mean of all observations in this line
   −
::double deviation; // deviation of all observations in this line
+
    double deviation; // deviation of all observations in this line
   −
::double obs_n; // number of observations in this line of cells
+
    double obs_n; // number of observations in this line of cells
   −
::double mean_of_cell_means;
+
    double mean_of_cell_means;
   −
::double deviation_of_cell_means;
+
    double deviation_of_cell_means;
   −
::LineOfCells(); // constructor with the name of the line
+
    LineOfCells(); // constructor with the name of the line
   −
::~LineOfCells(); // destructor to deallocate the list object
+
    ~LineOfCells(); // destructor to deallocate the list object
   −
::void Update(void); // update all the means & standard deviations
+
    void Update(void); // update all the means & standard deviations
    
};
 
};
Line 115: Line 115:       −
:// of course, need to put in textual labels, etc...  
+
  // of course, need to put in textual labels, etc...  
   −
:public:
+
  public:
   −
:
+
 
   −
::char name[256]; // name of the data set
+
    char name[256]; // name of the data set
         −
::unsigned long num_of_rows;
+
    unsigned long num_of_rows;
   −
::unsigned long num_of_columns;
+
    unsigned long num_of_columns;
         −
::ListObject *cells; // all cell objects
+
    ListObject *cells; // all cell objects
   −
::ListObject *rows; // LineOfCells objects
+
    ListObject *rows; // LineOfCells objects
   −
::ListObject *columns; // LineOfCells objects
+
    ListObject *columns; // LineOfCells objects
   −
:::// the lists of cell, rows, and columns are "1" indexed
+
      // the lists of cell, rows, and columns are "1" indexed
            −
::double grand_total; // overall sum of all observations in all cells
+
    double grand_total; // overall sum of all observations in all cells
   −
::double grand_N; // overall number of observations in all the cells:::
+
    double grand_N; // overall number of observations in all the cells:::
   −
::double grand_mean; // mean of all the observations in all the cells
+
    double grand_mean; // mean of all the observations in all the cells
   −
::double grand_SS;
+
    double grand_SS;
   −
::double grand_biased_variance; // SS_total divided by grand_N; multiply by grand_N to get SS_total  
+
    double grand_biased_variance; // SS_total divided by grand_N; multiply by grand_N to get SS_total  
   −
::double grand_deviation; // biased standard deviation of all observations
+
    double grand_deviation; // biased standard deviation of all observations
         −
::double mean_of_cell_means;
+
    double mean_of_cell_means;
   −
::double deviation_of_cell_means;
+
    double deviation_of_cell_means;
      −
::AnovaResultsTable results_table;
+
    AnovaResultsTable results_table;
         −
::AnovaDataSet(char *new_name);
+
    AnovaDataSet(char *new_name);
   −
::AnovaDataSet();
+
    AnovaDataSet();
   −
::~AnovaDataSet(); // destructor to deallocate the ListObjects,
+
    ~AnovaDataSet(); // destructor to deallocate the ListObjects,
   −
:::::// and tell the cells, rows and columns to destroy themselves too
+
          // and tell the cells, rows and columns to destroy themselves too
         −
::void SetUpCells(void);
+
    void SetUpCells(void);
   −
::void SetUpRowsAndColumns(void);
+
    void SetUpRowsAndColumns(void);
   −
::void Update(void);
+
    void Update(void);
   −
::void ReadDataFromFile(void);
+
    void ReadDataFromFile(void);
      −
:::// need to add some API glue so that outside routines can add cells, rows, and columns  
+
      // need to add some API glue so that outside routines can add cells, rows, and columns  
      −
::void UpdateAnovaResultsTable(void);
+
    void UpdateAnovaResultsTable(void);
         −
:protected:
+
  protected:
   −
:
+
 
   −
::// internal routines for calculating the ANOVA
+
    // internal routines for calculating the ANOVA
         −
::double GetSSWithinCells(void);
+
    double GetSSWithinCells(void);
   −
::double GetSSBetweenCells(void);
+
    double GetSSBetweenCells(void);
   −
::double GetSSBetweenLinesOfCells(ListObject *lineList,unsigned long num_of_cells,double *variance);
+
    double GetSSBetweenLinesOfCells(ListObject *lineList,unsigned long num_of_cells,double *variance);
   −
::double GetSSBetweenRows(void);
+
    double GetSSBetweenRows(void);
   −
::double GetSSBetweenColumns (void);
+
    double GetSSBetweenColumns (void);
   −
::double GetSSBetweenInteraction(void);
+
    double GetSSBetweenInteraction(void);
      −
::double GetMSWithinCells(void);
+
    double GetMSWithinCells(void);
   −
::double GetMSBetweenCells(void);
+
    double GetMSBetweenCells(void);
   −
::double GetMSBetweenRows(void);
+
    double GetMSBetweenRows(void);
   −
::double GetMSBetweenColumns (void);
+
    double GetMSBetweenColumns (void);
   −
::double GetMSBetweenInteraction(void);
+
    double GetMSBetweenInteraction(void);
            −
::double GetNumCells(void);
+
    double GetNumCells(void);
   −
::double GetDfTotal(void);
+
    double GetDfTotal(void);
   −
::double GetDfWithinCells(void);
+
    double GetDfWithinCells(void);
   −
::double GetDfError(void);
+
    double GetDfError(void);
   −
::double GetDfBetweenCells(void);
+
    double GetDfBetweenCells(void);
   −
::double GetDfBetweenRows(void);
+
    double GetDfBetweenRows(void);
   −
::double GetDfBetweenColumns(void);
+
    double GetDfBetweenColumns(void);
   −
::double GetDfBetweenInteraction(void);
+
    double GetDfBetweenInteraction(void);
         −
:://interface with data table...
+
    //interface with data table...
   −
::void Read2WayDataFromDataTable(DataTable dt,AnovaParameters factors);
+
    void Read2WayDataFromDataTable(DataTable dt,AnovaParameters factors);
      Line 265: Line 265:       −
::double DF_between_groups;
+
    double DF_between_groups;
         −
::double cell_SS_within;
+
    double cell_SS_within;
   −
::double cell_DF_within; // aka DF_error
+
    double cell_DF_within; // aka DF_error
   −
::double cell_MS_within;
+
    double cell_MS_within;
         −
::double cell_variance;
+
    double cell_variance;
   −
::double cell_SS_between;
+
    double cell_SS_between;
   −
::double cell_DF_between;
+
    double cell_DF_between;
   −
::double cell_MS_between;
+
    double cell_MS_between;
         −
::double row_variance;
+
    double row_variance;
   −
::double row_SS_between;
+
    double row_SS_between;
   −
::double row_DF_between;
+
    double row_DF_between;
   −
::double row_MS_between;
+
    double row_MS_between;
   −
::double row_F;
+
    double row_F;
   −
::double row_p;
+
    double row_p;
         −
::double col_variance;
+
    double col_variance;
   −
::double col_SS_between;
+
    double col_SS_between;
   −
::double col_DF_between;
+
    double col_DF_between;
   −
::double col_MS_between;
+
    double col_MS_between;
   −
::double col_F;
+
    double col_F;
   −
::double col_p;
+
    double col_p;
         −
::double inter_SS_between;
+
    double inter_SS_between;
   −
::double inter_DF_between;
+
    double inter_DF_between;
   −
::double inter_MS_between;
+
    double inter_MS_between;
   −
::double inter_F;
+
    double inter_F;
   −
::double inter_p;
+
    double inter_p;
     

Navigation menu