C:/programs/etirm/src/ItemParamPriorNormal.h

Go to the documentation of this file.
00001 /*! \file ItemParamPriorNormal.h
00002  
00003   \brief
00004   Class derived from ItemParamPrior representing a normal prior distribution
00005   of item parameters for use in Bayes modal estimation.
00006  
00007   mParameter[0] = mean of normal distribution
00008   mParameter[1] = standard deviation of normal distribution.
00009 
00010   Note the second parameter is the standard deviation, NOT the variance.
00011 
00012   Estimation Toolkit for Item Response Models (ETIRM)
00013   http://www.smallwaters.com/software/cpp/etirm.html
00014 
00015   Author(s): 
00016   Werner Wothke, maintenance (http://www.smallwaters.com)
00017   Brad Hanson (http://www.b-a-h.com/)
00018   See the file LICENSE for information on usage and redistribution.
00019 
00020   Copyright (C) 2008, Werner Wothke
00021   Copyright (c) 2000-2001, Bradley A. Hanson
00022  */
00023 
00024 #ifndef ETIRM_ITEMPARAMPRIORNORMAL_H_
00025 #define ETIRM_ITEMPARAMPRIORNORMAL_H_
00026 
00027 #ifdef ETIRM_NO_DIR_PREFIX
00028 #include "ItemParamPrior.h"
00029 #else
00030 #include "etirm/ItemParamPrior.h"
00031 #endif
00032 
00033 namespace etirm
00034 {
00035   /*!
00036     \brief
00037     Class derived from ItemParamPrior representing a normal prior distribution
00038     of item parameters for use in Bayes modal estimation.
00039    */
00040   class ItemParamPriorNormal : public ItemParamPrior
00041   {
00042 public:
00043 
00044     ItemParamPriorNormal();
00045     ItemParamPriorNormal(RealVector &param);
00046     ItemParamPriorNormal(Real mean, Real sd);
00047     
00048     //! Returns number of prior Normal distribution parameters for the IRT item.
00049     virtual int NumParameters()
00050     {
00051       return 2;
00052     }
00053 
00054     virtual Real LogDensity(Real p);
00055     // Returns log of the density function.
00056 
00057     virtual Real DerivLogDensity1(Real p);
00058     // Returns the first derivative of the log density
00059 
00060     virtual Real DerivLogDensity2(Real p);
00061     // Returns the second derivative of the log density
00062 
00063     virtual std::string DistributionName() const
00064     {
00065       return std::string("normal");
00066     }
00067     //!< Returns string containing name of distribution used for prior.
00068 
00069 
00070 private:
00071 
00072     Real variance;
00073     //!< Variance of Normal distribution.
00074   };
00075 
00076 } // namespace etirm
00077 
00078 #endif // ETIRM_ITEMPARAMPRIORNORMAL_H_
00079  

Generated on Sat Mar 1 21:40:16 2008 for ETIRM by  doxygen 1.5.4