Accord.Statistics.Testing.TwoWayAnova.TwoWayAnova C# (CSharp) Method

TwoWayAnova() public method

Constructs a new TwoWayAnova.
public TwoWayAnova ( double samples, TwoWayAnovaModel type = TwoWayAnovaModel.Mixed ) : System
samples double The samples in grouped form.
type TwoWayAnovaModel The type of the analysis.
return System
        public TwoWayAnova(double[][][] samples, TwoWayAnovaModel type = TwoWayAnovaModel.Mixed)
        {
            FirstFactorSamples = samples.Length;
            SecondFactorSamples = samples[0].Length;
            Replications = samples[0][0].Length;
            Observations = FirstFactorSamples * SecondFactorSamples * Replications;

            // Assert equal number of replicates
            for (int i = 0; i < samples.Length; i++)
                for (int j = 0; j < samples[i].Length; j++)
                    if (samples[i][j].Length != Replications)
                        throw new ArgumentException("Samples do not have the same number of replicates.", "samples");

            initialize(samples, type);
        }

Same methods

TwoWayAnova::TwoWayAnova ( double samples, int firstFactorLabels, int secondFactorLabels, TwoWayAnovaModel type = TwoWayAnovaModel.Mixed ) : System