etirm::ItemParamPrior Class Reference

Class representing a prior distribution used for item parameters in Bayes modal estimation. More...

#include <ItemParamPrior.h>

Inheritance diagram for etirm::ItemParamPrior:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ItemParamPrior (RealVector &param)
 Constructor assigning values of prior parameters from a vector.
 ItemParamPrior (int numparam)
 Constructor setting the number of prior parameters, but not values of the parameters.
virtual ~ItemParamPrior ()
 Virtual destructor used here so that the correct destructor gets called in derived classes.
void SetParameters (RealVector &param)
 Assigns item parameter from vector.
RealVector GetParameters ()
 Returns parameter vector for this item.
virtual int NumParameters ()=0
 Returns number of prior distribution parameters for the IRT parameter.
virtual bool ZeroDensity (Real)
 Returns true if density at p is zero. By default the density is non-zero at all points.
virtual Real NearestNonZero (Real x)
 If x has density zero, this function returns the value closest to x that has a non-zero density.
virtual Real LogDensity (Real p)=0
 Returns the log of the density function.
virtual Real DerivLogDensity1 (Real p)=0
 Returns the first derivative of the log density.
virtual Real DerivLogDensity2 (Real p)=0
 Returns the second derivative of the log density.
virtual std::string DistributionName () const =0
 Returns the string containing name of distribution used for prior.

Protected Attributes

RealVector mParameters
 Parameters of prior distribution.


Detailed Description

Class representing a prior distribution used for item parameters in Bayes modal estimation.

Definition at line 39 of file ItemParamPrior.h.


Constructor & Destructor Documentation

etirm::ItemParamPrior::ItemParamPrior ( RealVector param  ) 

Constructor assigning values of prior parameters from a vector.

Parameters:
[in] &param Address of parameter vector for this item.

Definition at line 29 of file ItemParamPrior.cpp.

00029                                                   :
00030     mParameters(param)
00031   {
00032   }

etirm::ItemParamPrior::ItemParamPrior ( int  numparam  )  [explicit]

Constructor setting the number of prior parameters, but not values of the parameters.

Parameters:
[in] numparam Number of parameter for this item.

Definition at line 35 of file ItemParamPrior.cpp.

00035                                              :
00036     mParameters(numparam)
00037   {
00038   }

etirm::ItemParamPrior::~ItemParamPrior (  )  [virtual]

Virtual destructor used here so that the correct destructor gets called in derived classes.

Definition at line 41 of file ItemParamPrior.cpp.

00042   {
00043   }


Member Function Documentation

void etirm::ItemParamPrior::SetParameters ( RealVector param  ) 

Assigns item parameter from vector.

Parameters:
[in] &param Address of parameter vector for this item.

Definition at line 46 of file ItemParamPrior.cpp.

References mParameters, and NumParameters().

00047   {
00048     if (param.size() != NumParameters())  // Changed "==" to "!=" (ww, 2-22-2008)
00049       throw InvalidArgument("Invalid number of parameters in prior distribution",
00050           "ItemParamPrior::SetParameters");
00051 
00052     mParameters = param;
00053   }

Here is the call graph for this function:

RealVector etirm::ItemParamPrior::GetParameters (  ) 

Returns parameter vector for this item.

Definition at line 56 of file ItemParamPrior.cpp.

References mParameters.

00057   {
00058     return RealVector(mParameters);
00059   }

virtual int etirm::ItemParamPrior::NumParameters (  )  [pure virtual]

Returns number of prior distribution parameters for the IRT parameter.

Defined in derived class to return number of parameters in prior density.

Implemented in etirm::ItemParamPriorBeta4, etirm::ItemParamPriorLogNormal, and etirm::ItemParamPriorNormal.

Referenced by SetParameters().

Here is the caller graph for this function:

virtual bool etirm::ItemParamPrior::ZeroDensity ( Real   )  [inline, virtual]

Returns true if density at p is zero. By default the density is non-zero at all points.

Reimplemented in etirm::ItemParamPriorBeta4, and etirm::ItemParamPriorLogNormal.

Definition at line 84 of file ItemParamPrior.h.

virtual Real etirm::ItemParamPrior::NearestNonZero ( Real  x  )  [inline, virtual]

If x has density zero, this function returns the value closest to x that has a non-zero density.

The Default is to assume all values of x have a non-zero density.

Parameters:
[in] x Quadrature point.

Reimplemented in etirm::ItemParamPriorBeta4, and etirm::ItemParamPriorLogNormal.

Definition at line 99 of file ItemParamPrior.h.

00100     {
00101       return x;
00102     }

virtual Real etirm::ItemParamPrior::LogDensity ( Real  p  )  [pure virtual]

Returns the log of the density function.

Implemented in etirm::ItemParamPriorBeta4, etirm::ItemParamPriorLogNormal, and etirm::ItemParamPriorNormal.

virtual Real etirm::ItemParamPrior::DerivLogDensity1 ( Real  p  )  [pure virtual]

Returns the first derivative of the log density.

Implemented in etirm::ItemParamPriorBeta4, etirm::ItemParamPriorLogNormal, and etirm::ItemParamPriorNormal.

virtual Real etirm::ItemParamPrior::DerivLogDensity2 ( Real  p  )  [pure virtual]

Returns the second derivative of the log density.

Implemented in etirm::ItemParamPriorBeta4, etirm::ItemParamPriorLogNormal, and etirm::ItemParamPriorNormal.

virtual std::string etirm::ItemParamPrior::DistributionName (  )  const [pure virtual]

Returns the string containing name of distribution used for prior.

Implemented in etirm::ItemParamPriorBeta4, etirm::ItemParamPriorLogNormal, and etirm::ItemParamPriorNormal.


Member Data Documentation

RealVector etirm::ItemParamPrior::mParameters [protected]

Parameters of prior distribution.

Definition at line 119 of file ItemParamPrior.h.

Referenced by etirm::ItemParamPriorNormal::DerivLogDensity1(), etirm::ItemParamPriorLogNormal::DerivLogDensity1(), etirm::ItemParamPriorBeta4::DerivLogDensity1(), etirm::ItemParamPriorLogNormal::DerivLogDensity2(), etirm::ItemParamPriorBeta4::DerivLogDensity2(), GetParameters(), etirm::ItemParamPriorBeta4::ItemParamPriorBeta4(), etirm::ItemParamPriorLogNormal::ItemParamPriorLogNormal(), etirm::ItemParamPriorNormal::ItemParamPriorNormal(), etirm::ItemParamPriorNormal::LogDensity(), etirm::ItemParamPriorLogNormal::LogDensity(), etirm::ItemParamPriorBeta4::LogDensity(), etirm::ItemParamPriorBeta4::NearestNonZero(), SetParameters(), and etirm::ItemParamPriorBeta4::ZeroDensity().


The documentation for this class was generated from the following files:
Generated on Sat Mar 1 21:41:48 2008 for ETIRM by  doxygen 1.5.4