TMtxAnova Class

Header: Dew.Stats/StatTools.h · Cross-compiler
tObjectTMtxComponentTMtxAnova

class TMtxAnova : public TMtxComponent;

Visual representation of One and Two way ANOVA.

Encapsulates one and two way analysis of variance (ANOVA) routines. The assumptions of the one and two-way analysis of variance are:

  • The data are continuous (not discrete).
  • The data follow the normal probability distribution. Each group is normally distributed about the group mean.
  • The variances of the populations are equal.
  • The groups are independent. There is no relationship among the individuals in one group as compared to another.
  • Each group is a simple random sample from its population. Each individual in the population has an equal probability of being selected in the sample.

How to use TMtxAnova component?

  • Drop a TMtxAnova component on the form.
  • Define if you'll do a one-way or two-way ANOVA (the IsAnova1 property).
  • If you'll be doing the two-way ANOVA, define the number of replications per "cell" (the TMtxAnova::Replications property).
  • Define the data you wish to analyze. Depending on IsAnova1 and Replications properties Data matrix can be interpreted in different ways.
  • Define the default number format for ANOVA table - the TMtxAnova::FmtString property. Default value is '0.0000'.
  • Define (optional) the ResultDest TStringGrid. TMtxAnova results will be outputted to a ResultDest string grid.
  • Perform ANOVA by calling the TMtxAnova::Recalc method.

Results:

  • If you specified ResultDest then the standard ANOVA table will be written to ResultDest string grid. If ResultDest is nil, you can still use WriteResultToGrid or WriteResultToStrings methods to output ANOVA table to a TStringGrid or TStrings.
  • TMtxAnova::P returns the significance probability of null hypothesis that means are equal. If P is less than desired significance TMtxAnova::Alpha then the result suggests, the null hypothesis (means are equal) can be rejected.

Constructors

NameDescription
TMtxAnova (2)

Destructors

NameDescription
~TMtxAnova

Properties

NameTypeDescription
AlphadoubleDesired significance probability.
Anova1ResTANOVA1ResultResults of the one way ANOVA.
Anova2ResTANOVA2ResultResults of the two way ANOVA.
AutoUpdateboolIf true then changing any of the TMtxAnova properties will trigger the TMtxAnova::Recalc method.
BlockAssignboolBlock streaming of specific properties when storing only a "template".
DataTMtx*Data for ANOVA.
DirtyboolWhen any of the TMtxANOVA properties changes, this property is automatically set to true.
EditorActiveboolReturns True, if the component editor is displayed.
FmtStringDewStringNumeric format for ANOVA table cells.
IsAnova1boolOne or two-way ANOVA.
NameDewString
PdoubleCalculated significance probability of null hypothesis.
ReferenceTReferenceList*Stores a list of components that have to be notified, when this component is destroyed.
ReplicationsintNumber of observations per data matrix "cell".

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
EditorClassTo be overriden in descendanr classses.
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
RecalcTriggers ANOVA recalculation.
ReferenceRemoved
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.

Fields

NameTypeDescription
Tagintptr_t