StephenAshley.Biostatistics.Group Class Reference

A list of Decimal objects representing the members of a set of data. The class provides methods that compute various descriptive statistics. More...

List of all members.

Public Member Functions

 Group ()
 Constructs an empty Group.
 Group (Int16 IDNumber)
 Constructs an empty Group with a specified identification number.
 Group (Int16 IDNumber, IList data)
 Constructs a Group from a collection of data.
 Group (Int16 IDNumber, IList data, bool fixedSize, bool readOnly)
 Constructs a Group from a collection of data. The Group has a fixed size or is read-only.
 Group (Group group)
 Constructs a Group from an existing Group.
 Group (Group group, bool fixedSize, bool readOnly)
 Constructs a Group from an existing Group. The Group has a fixed size or is read-only.
 Group (Int16 IDNumber, TextBox[] textBoxesArray, GroupValidatorDelegateClass groupValidator, Int32 index)
 Constructs a Group from an array of TextBox objects.
void Add (Object item)
 Adds an element to the end of the Group.
void AddRange (IList data)
 Adds the elements of the specified collection to the Group.
Group AsFixedSize ()
 Returns a fixed-size Group wrapper for the current collection.
Group AsReadOnly ()
 Returns a read-only Group wrapper for the current collection.
void Clear ()
 Removes all members from the Group.
bool Contains (object value)
 Determines whether an element is in the Group.
void CopyTo (NUMBER[] DecimalArray)
 Copies the Group to a compatible one-dimensional array.
void CopyTo (NUMBER[] DecimalArray, int index)
 Copies the Group to a compatible one-dimensional array, starting at the specified index of the target array.
void CopyTo (Int32 groupIndex, NUMBER[] DecimalArray, int arrayIndex, Int32 count)
 Copies a range of elements from the Group to a compatible one-dimensional array, starting at the specified index of the target array.
int IndexOf (NUMBER value)
 Searches for the specified value and returns the zero-based index of the first occurrence within the entire Group.
Int32 IndexOf (NUMBER value, Int32 index)
 Searches for the specified value and returns the zero-based index of the first occurrence within the range of elements in the Group that extends from the specified index to the last element.
Int32 IndexOf (NUMBER value, Int32 index, Int32 count)
 Searches for the specified value and returns the zero-based index of the first occurrence within the range of elements in the Group that starts at the specified index and contains the specified number of elements.
void Insert (int index, NUMBER value)
 Inserts a member into the Group at the specified index.
bool Remove (NUMBER value)
 Removes the first occurrence of a specific value from the Group.
void RemoveAt (int index)
 Removes the element at the specified index of the Group.
NUMBER[] ToArray ()
 Constructs an array from a Group.
NUMBER Average ()
 Returns the average of the values in the Group.
Status GroupStatus ()
 Returns a Status object reflecting the state of the Group.
Int16 IdentificationNumber ()
 Returns the Group object’s identification number.
void SetIndentificationNumber (Int16 value)
 Sets the Group object’s identification number.
bool IsFixedSize ()
 Returns a value indicating whether the Group has a fixed size.
bool IsNull ()
 Returns a value indicating whether the Group has a null value.
bool IsReadOnly ()
 Returns a value indicating whether the Group is read-only.
bool IsValid ()
 Returns a value indicating the Group is valid.
void SetIsValid (bool value)
 Sets the flag reflecting the validity of the Group.
NUMBER Maximum ()
 Returns the maximum value in the Group.
NUMBER Minimum ()
 Returns the minimum value in the Group.
NUMBER Mean ()
 Returns the mean of the values in the Group.
NUMBER Median ()
 Returns the median of the values in the Group.
Int32 n ()
 Returns the number of elements actually contained in the Group.
Int16 Number ()
 Returns the Group object’s identification number.
NUMBER PopulationStandardDeviation ()
 Returns the population standard deviation of the values in the Group.
NUMBER PopulationVariance ()
 Returns the population variance of the values in the Group.
NUMBER SampleStandardDeviation ()
 Returns the sample standard deviation of the values in the Group.
NUMBER SampleVariance ()
 Returns the sample variance of the values in the Group.
NUMBER StandardErrorOfMean ()
 Returns the standard error of the mean for the Group.
NUMBER Sum ()
 Returns the sum of the numbers in the Group using Kahan Summation.
NUMBER SumOfSquaredDeviates ()
 Returns the sum of the squared deviates (SS) of the numbers in the Group.
NUMBER SumOfSquares ()
 Returns the sum of the squared values in the Group.

Protected Attributes

List< NUMBER > dataList
 Contains the members of the Group.
Int16 iIdentificationNumber
 The Group object’s identification number.

Properties

NUMBER this [int index] [get, set]
 Returns or sets the value at the specified index.


Detailed Description

A list of Decimal objects representing the members of a set of data. The class provides methods that compute various descriptive statistics.

See Stanton A. Glantz, Primer of Biostatistics ch. 2 (6th ed. 2005); Jerrold H. Zar, Biostatistical Analysis chs. 3–4 (5th ed. 2010 [sic]).

Definition at line 72 of file Group.cs.


Constructor & Destructor Documentation

StephenAshley.Biostatistics.Group.Group (  ) 

Constructs an empty Group.

Definition at line 93 of file Group.cs.

StephenAshley.Biostatistics.Group.Group ( Int16  IDNumber  ) 

Constructs an empty Group with a specified identification number.

Parameters:
IDNumber The Group object’s identification number.

Definition at line 99 of file Group.cs.

StephenAshley.Biostatistics.Group.Group ( Int16  IDNumber,
IList  data 
)

Constructs a Group from a collection of data.

Parameters:
IDNumber The Group object’s identification number.
data The collection of data.
Exceptions:
BiostatisticsException data is a null reference.

Definition at line 116 of file Group.cs.

StephenAshley.Biostatistics.Group.Group ( Int16  IDNumber,
IList  data,
bool  fixedSize,
bool  readOnly 
)

Constructs a Group from a collection of data. The Group has a fixed size or is read-only.

Parameters:
IDNumber The Group objects’s identification number.
data The collection of data.
fixedSize A Boolean that signals whether a Group has a fixed size.
readOnly A Boolean that signals whether a Group is read-only.
Exceptions:
BiostatisticsException fixedSize is set to true but readOnly is set to false.

Definition at line 140 of file Group.cs.

StephenAshley.Biostatistics.Group.Group ( Group  group  ) 

Constructs a Group from an existing Group.

Parameters:
group The existing Group.
Exceptions:
BiostatisticsException group is a null reference.

Definition at line 162 of file Group.cs.

StephenAshley.Biostatistics.Group.Group ( Group  group,
bool  fixedSize,
bool  readOnly 
)

Constructs a Group from an existing Group. The Group has a fixed size or is read-only.

Parameters:
group The existing Group.
fixedSize A flag indicating whether the returned Group has a fixed size.
readOnly A flag indicating whether the returned Group is read-only.

Definition at line 187 of file Group.cs.

StephenAshley.Biostatistics.Group.Group ( Int16  IDNumber,
TextBox[]  textBoxesArray,
GroupValidatorDelegateClass  groupValidator,
Int32  index 
)

Constructs a Group from an array of TextBox objects.

Parameters:
IDNumber The Group object’s identification number.
textBoxesArray An array of TextBox objects.
groupValidator A delegate for a method that validates a column of TextBox objects as a Group and reports on the state of the column.
index The position of the column in the spreadsheet.
Exceptions:
BiostatisticsException textBoxesArray is a null reference,

groupValidator is a null reference, or

textBoxesArray contains a TextBox that does not represent a Decimal.

Definition at line 213 of file Group.cs.


Member Function Documentation

void StephenAshley.Biostatistics.Group.Add ( Object  item  ) 

Adds an element to the end of the Group.

Parameters:
item A number.
Exceptions:
BiostatisticsException item cannot be converted to a Decimal,

• the Group is read-only, or

• an attempt is made to add an item to a full Group.

Definition at line 253 of file Group.cs.

void StephenAshley.Biostatistics.Group.AddRange ( IList  data  ) 

Adds the elements of the specified collection to the Group.

Parameters:
data The collection of data.
Exceptions:
BiostatisticsException sourceCollection contains a non-numeric element,

sourceCollection is a null reference,

• an attempt is made to add an item to a read-only Group, of

• an attempt is made to add an item to a full fixed-size Group.

Definition at line 311 of file Group.cs.

Group StephenAshley.Biostatistics.Group.AsFixedSize (  ) 

Returns a fixed-size Group wrapper for the current collection.

Returns:
A fixed-size wrapper around the current Group.

Definition at line 366 of file Group.cs.

Group StephenAshley.Biostatistics.Group.AsReadOnly (  ) 

Returns a read-only Group wrapper for the current collection.

Returns:
A read-only wrapper around the current Group.

Definition at line 376 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.Average (  ) 

Returns the average of the values in the Group.

Synonym for Mean.

Returns:
The average.
Exceptions:
BiostatisticsException the Group has no members.

Definition at line 642 of file Group.cs.

void StephenAshley.Biostatistics.Group.Clear (  ) 

Removes all members from the Group.

Definition at line 384 of file Group.cs.

bool StephenAshley.Biostatistics.Group.Contains ( object  value  ) 

Determines whether an element is in the Group.

Parameters:
value The element to locate in the Group.
Returns:
True if value is found in the Group; otherwise, False.
Exceptions:
BiostatisticsException value is not a numeric type.

Definition at line 398 of file Group.cs.

void StephenAshley.Biostatistics.Group.CopyTo ( Int32  groupIndex,
NUMBER[]  DecimalArray,
int  arrayIndex,
Int32  count 
)

Copies a range of elements from the Group to a compatible one-dimensional array, starting at the specified index of the target array.

Parameters:
groupIndex The zero-based index in the Group at which copying begins.
DecimalArray The one-dimensional array that is the destination of the elements copied from the Group. The array must have zero-based indexing.
arrayIndex The zero-based index in DecimalArray at which copying begins.
count The number of elements to copy.
Exceptions:
BiostatisticsException groupIndex is equal to or greater than n(),

arrayIndex is equal to or greater than the length of DecimalArray ,

• the number of elements from index to the end of the Group is greater than the available space from arrayIndex to the end of the destination array,

DecimalArray is a null reference, or

index is less than 0.

Definition at line 478 of file Group.cs.

void StephenAshley.Biostatistics.Group.CopyTo ( NUMBER[]  DecimalArray,
int  index 
)

Copies the Group to a compatible one-dimensional array, starting at the specified index of the target array.

Parameters:
DecimalArray The target array.
index The starting index.
Exceptions:
BiostatisticsException • the number of elements in the Group is greater than the number of elements that DecimalArray can contain.

DecimalArray is a null reference, or

index is less than 0.

Definition at line 440 of file Group.cs.

void StephenAshley.Biostatistics.Group.CopyTo ( NUMBER[]  DecimalArray  ) 

Copies the Group to a compatible one-dimensional array.

Parameters:
DecimalArray The target array.
Exceptions:
BiostatisticsException Thrown when
• the number of elements in the Group is greater than the number of elements that array can contain, or

DecimalArray is a null reference.

Definition at line 416 of file Group.cs.

Status StephenAshley.Biostatistics.Group.GroupStatus (  ) 

Returns a Status object reflecting the state of the Group.

Returns:
The state of the Group.

Definition at line 650 of file Group.cs.

Int16 StephenAshley.Biostatistics.Group.IdentificationNumber (  ) 

Returns the Group object’s identification number.

Returns:
The number.

Definition at line 660 of file Group.cs.

Int32 StephenAshley.Biostatistics.Group.IndexOf ( NUMBER  value,
Int32  index,
Int32  count 
)

Searches for the specified value and returns the zero-based index of the first occurrence within the range of elements in the Group that starts at the specified index and contains the specified number of elements.

Parameters:
value The value to locate in the Group.
index The zero-based starting index of the search.
count The number of elements in the section to search.
Returns:
The zero-based index of the first occurrence of item within the range of elements in the Group that extends from index to the last element, if found; otherwise, –1.
Exceptions:
BiostatisticsException Thrown when
index is outside the range of valid indexes for the Group,

count is less than 0, or

index and count do not specify a valid section in the Group.

Definition at line 551 of file Group.cs.

Int32 StephenAshley.Biostatistics.Group.IndexOf ( NUMBER  value,
Int32  index 
)

Searches for the specified value and returns the zero-based index of the first occurrence within the range of elements in the Group that extends from the specified index to the last element.

Parameters:
value The value to locate in the Group.
index The zero-based starting index of the search.
Returns:
The zero-based index of the first occurrence of item within the range of elements in the Group that extends from index to the last element, if found; otherwise, –1.
Exceptions:
BiostatisticsException index is outside the range of valid indexes for the Group.

Definition at line 527 of file Group.cs.

int StephenAshley.Biostatistics.Group.IndexOf ( NUMBER  value  ) 

Searches for the specified value and returns the zero-based index of the first occurrence within the entire Group.

Parameters:
value The number to locate in the Group.
Returns:
The zero-based index of the first occurrence of the number within the entire Group, if found; otherwise, –1.

Definition at line 507 of file Group.cs.

void StephenAshley.Biostatistics.Group.Insert ( int  index,
NUMBER  value 
)

Inserts a member into the Group at the specified index.

Parameters:
index The zero-based index at which value should be inserted.
value The value to insert.
Exceptions:
BiostatisticsException index is less than 0, or

index is greater than n().

Definition at line 567 of file Group.cs.

bool StephenAshley.Biostatistics.Group.IsFixedSize (  ) 

Returns a value indicating whether the Group has a fixed size.

Returns:
True if the Group has a fixed size; otherwise, False.

Definition at line 678 of file Group.cs.

bool StephenAshley.Biostatistics.Group.IsNull (  ) 

Returns a value indicating whether the Group has a null value.

Returns:
True if dataList is null, otherwise False.

Definition at line 688 of file Group.cs.

bool StephenAshley.Biostatistics.Group.IsReadOnly (  ) 

Returns a value indicating whether the Group is read-only.

Returns:
True if the Group is read-only; otherwise, False.

Definition at line 702 of file Group.cs.

bool StephenAshley.Biostatistics.Group.IsValid (  ) 

Returns a value indicating the Group is valid.

Returns:
The validity of the Group.

Definition at line 711 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.Maximum (  ) 

Returns the maximum value in the Group.

Returns:
The maximum.
Exceptions:
BiostatisticsException the Group contains no elements.

Definition at line 729 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.Mean (  ) 

Returns the mean of the values in the Group.

Synonym for Average.

Returns:
The mean.
Exceptions:
BiostatisticsException Group has no members.

Definition at line 767 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.Median (  ) 

Returns the median of the values in the Group.

Returns:
The median.
Exceptions:
BiostatisticsException the Group has no members.

Definition at line 780 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.Minimum (  ) 

Returns the minimum value in the Group.

Returns:
The minimum
Exceptions:
BiostatisticsException the Group contains no elements.

Definition at line 747 of file Group.cs.

Int32 StephenAshley.Biostatistics.Group.n (  ) 

Returns the number of elements actually contained in the Group.

Synonym for Count.

Returns:
The number of elements actually contained in the Group.

Definition at line 802 of file Group.cs.

Int16 StephenAshley.Biostatistics.Group.Number (  ) 

Returns the Group object’s identification number.

Returns:
The number.

Definition at line 809 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.PopulationStandardDeviation (  ) 

Returns the population standard deviation of the values in the Group.

Returns:
The population standard deviation.
Exceptions:
BiostatisticsException n() equals 0.

Definition at line 820 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.PopulationVariance (  ) 

Returns the population variance of the values in the Group.

Returns:
The population variance.
Exceptions:
BiostatisticsException n() equals 0.

Definition at line 834 of file Group.cs.

bool StephenAshley.Biostatistics.Group.Remove ( NUMBER  value  ) 

Removes the first occurrence of a specific value from the Group.

Parameters:
value The value to remove from the Group.
Returns:
True if value is successfully removed; otherwise, false. This method also returns false if value was not found in the Group.

Definition at line 588 of file Group.cs.

void StephenAshley.Biostatistics.Group.RemoveAt ( int  index  ) 

Removes the element at the specified index of the Group.

Parameters:
index The zero-based index of the element to remove.
Exceptions:
BiostatisticsException Parameter index is less than 0, or index is equal to or greater than Count.

Definition at line 603 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.SampleStandardDeviation (  ) 

Returns the sample standard deviation of the values in the Group.

Returns:
The sample standard deviation.
Exceptions:
BiostatisticsException n() equals 0 or 1.

Definition at line 855 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.SampleVariance (  ) 

Returns the sample variance of the values in the Group.

Returns:
The sample variance.
Exceptions:
BiostatisticsException n() equals 0 or 1.

Definition at line 870 of file Group.cs.

void StephenAshley.Biostatistics.Group.SetIndentificationNumber ( Int16  value  ) 

Sets the Group object’s identification number.

Parameters:
value The number.

Definition at line 667 of file Group.cs.

void StephenAshley.Biostatistics.Group.SetIsValid ( bool  value  ) 

Sets the flag reflecting the validity of the Group.

Parameters:
value The value assigned to columnData.IsValid.

Definition at line 720 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.StandardErrorOfMean (  ) 

Returns the standard error of the mean for the Group.

Returns:
The standard error of the mean.
Exceptions:
BiostatisticsException n() is less than 1.

Definition at line 887 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.Sum (  ) 

Returns the sum of the numbers in the Group using Kahan Summation.

Returns:
The sum of the numbers in the Group.

Definition at line 900 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.SumOfSquaredDeviates (  ) 

Returns the sum of the squared deviates (SS) of the numbers in the Group.

Exceptions:
BiostatisticsException Group contains no elements.

Definition at line 926 of file Group.cs.

NUMBER StephenAshley.Biostatistics.Group.SumOfSquares (  ) 

Returns the sum of the squared values in the Group.

Returns:
The sum of squared values.

Definition at line 940 of file Group.cs.

NUMBER [] StephenAshley.Biostatistics.Group.ToArray (  ) 

Constructs an array from a Group.

Returns:
An array that contains the elements of the Group.

Definition at line 612 of file Group.cs.


Member Data Documentation

Contains the members of the Group.

Definition at line 78 of file Group.cs.

The Group object’s identification number.

Definition at line 86 of file Group.cs.


Property Documentation

NUMBER StephenAshley.Biostatistics.Group.this[int index] [get, set]

Returns or sets the value at the specified index.

Parameters:
index The zero-based index of the element to get or set.
Returns:
The value at the specified index.
Exceptions:
ArgumentOutOfRangeException Parameter index is less than 0, or index is equal to or greater than n().

Definition at line 957 of file Group.cs.


The documentation for this class was generated from the following file:

Generated on Sun May 31 19:43:39 2009 for "Biostatistics Documentation" by  doxygen 1.5.9