Public Member Functions | Public Attributes

bio_expression::Sum Class Reference

Class representing the sum of the same expression applied to a list of data. More...

Inheritance diagram for bio_expression::Sum:
bio_expression::Expression

List of all members.

Public Member Functions

def __init__
def getExpression

Public Attributes

 function
 iteratorName
 operatorIndex

Detailed Description

Class representing the sum of the same expression applied to a list of data.

The concept of iterators identifies a sequence such that, for each instance, the value of the variables is read from the data file, and an expression can be evaluated. The two expressions described in this section consider one iterator and one expression, and evaluate the expression for each instance defined by the iterator. A sum can then be computed. Example:

 prob = bioLogit(V,av,CHOICE)
 rowIterator('obsIter') 
 loglikelihood = Sum(log(prob),'obsIter')

When the iterator is of type drawIterator, the operator Sum actually computes the average and not the sum, as the result is automatically divided by the number R of draws (see loglikelihood::mixedloglikelihood). Example:

 drawIterator('drawIter')
 prob = Sum(condProb,'drawIter')

Constructor & Destructor Documentation

def bio_expression::Sum::__init__ (   self,
  term,
  iteratorName 
)
Parameters:
termany valid bio_expression
iteratorNamename of an iterator already defined

Member Function Documentation

def bio_expression::Sum::getExpression (   self )
Returns:
Return the string representation of the current expression

Reimplemented from bio_expression::Expression.


Member Data Documentation

Reimplemented from bio_expression::Expression.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables