etirm::Examinee< R, P > Class Template Reference

Class to store a response pattern, its frequency, the posterior distribution of the ability parameter and the marginal likelihood of the pattern. More...

#include <Examinee.h>

Inheritance diagram for etirm::Examinee< R, P >:

Inheritance graph
[legend]

List of all members.

Public Types

typedef R response_vector
 Response vector type.
typedef P posterior_vector
 Type for vector of posterior probabilities.
typedef R::value_type response_type
 Response type.
typedef R::iterator response_iterator
 Iterator over item responses.

Public Member Functions

 Examinee (int nitems=0)
 Constructor.
virtual ~Examinee ()
 Destructor.
void SetResponses (response_vector &responses)
 Assigns the examinee's item responses (copies response vector).
response_iterator responses_begin ()
 Iterator to first response.
response_iterator responses_end ()
 Iterator to one past last response.
Real Count ()
 Returns the number of times to count the pattern of item responses for this examinee.
void SetCount (Real count)
 Assigns the number of times to count the pattern of item responses for this examinee.
int NumItems ()
 Number of items in examinee response vector.
void SetPosterior (posterior_vector &posterior)
 Assigns posterior latent variable probabilities for examinee.
P::iterator posterior_begin ()
 Assigns iterator to first element of the examinee's posterior probability vector.
int NumLatentVarCat ()
 Number of categories in discrete latent variable distribution.
void SetMarginalRespLikelihood (Real likelihood)
 Assigns marginal likelihood of examinee's response pattern.
Real GetMarginalRespLikelihood ()
 Returns marginal likelihood of examinee's response pattern.

Protected Attributes

Real mCount
 Number of examinees with the pattern of item responses in mResponses.
response_vector mResponses
 Responses to items. Includes responses to items not presented to the examinee.
posterior_vectormPosterior
 Posterior latent variable probabilities for examinee.
Real mMarginalResponseLikelihood
 Marginal likelihood of examinee's response pattern.


Detailed Description

template<class R, class P>
class etirm::Examinee< R, P >

Class to store a response pattern, its frequency, the posterior distribution of the ability parameter and the marginal likelihood of the pattern.

Template Parameters

Parameters:
P Type for storing vector of posterior probabilities.
R Type for storing vector of item responses.

Definition at line 49 of file Examinee.h.


Member Typedef Documentation

template<class R, class P>
typedef R etirm::Examinee< R, P >::response_vector

Response vector type.

Definition at line 54 of file Examinee.h.

template<class R, class P>
typedef P etirm::Examinee< R, P >::posterior_vector

Type for vector of posterior probabilities.

Definition at line 56 of file Examinee.h.

template<class R, class P>
typedef R::value_type etirm::Examinee< R, P >::response_type

Response type.

Definition at line 58 of file Examinee.h.

template<class R, class P>
typedef R::iterator etirm::Examinee< R, P >::response_iterator

Iterator over item responses.

Definition at line 60 of file Examinee.h.


Constructor & Destructor Documentation

template<class R, class P>
etirm::Examinee< R, P >::Examinee ( int  nitems = 0  )  [inline]

Constructor.

Definition at line 63 of file Examinee.h.

00063                              :
00064       mCount(1.0), mResponses(nitems), mPosterior(0), mMarginalResponseLikelihood(0.0)
00065     {
00066     }

template<class R, class P>
etirm::Examinee< R, P >::~Examinee (  )  [inline, virtual]

Destructor.

Destructor

Definition at line 189 of file Examinee.h.

References etirm::Examinee< R, P >::mPosterior.

00190   {
00191     if (mPosterior)
00192       delete mPosterior;
00193   }


Member Function Documentation

template<class R, class P>
void etirm::Examinee< R, P >::SetResponses ( response_vector responses  )  [inline]

Assigns the examinee's item responses (copies response vector).

Function Parameters

Parameters:
[in] &responses Address of examinee's response vector.

Definition at line 79 of file Examinee.h.

References etirm::Examinee< R, P >::mResponses.

Referenced by etirm::add_examinee().

00080     {
00081       mResponses = responses;
00082     }

Here is the caller graph for this function:

template<class R, class P>
response_iterator etirm::Examinee< R, P >::responses_begin (  )  [inline]

Iterator to first response.

Definition at line 85 of file Examinee.h.

References etirm::Examinee< R, P >::mResponses.

Referenced by etirm::examinee_response_str(), and etirm::examinee_responses().

00086     {
00087       return mResponses.begin();
00088     }

Here is the caller graph for this function:

template<class R, class P>
response_iterator etirm::Examinee< R, P >::responses_end (  )  [inline]

Iterator to one past last response.

Definition at line 91 of file Examinee.h.

References etirm::Examinee< R, P >::mResponses.

Referenced by etirm::examinee_response_str(), and etirm::examinee_responses().

00092     {
00093       return mResponses.end();
00094     }

Here is the caller graph for this function:

template<class R, class P>
Real etirm::Examinee< R, P >::Count (  )  [inline]

Returns the number of times to count the pattern of item responses for this examinee.

Definition at line 97 of file Examinee.h.

References etirm::Examinee< R, P >::mCount.

Referenced by etirm::examinee_get_count().

00098     {
00099       return mCount;
00100     }

Here is the caller graph for this function:

template<class R, class P>
void etirm::Examinee< R, P >::SetCount ( Real  count  )  [inline]

Assigns the number of times to count the pattern of item responses for this examinee.

Function Parameters

Parameters:
[in] count Weight for counting the examinee's item response vector.

Definition at line 110 of file Examinee.h.

References etirm::Examinee< R, P >::mCount.

Referenced by etirm::add_examinee(), and etirm::examinee_set_count().

00111     {
00112       mCount = count;
00113     }

Here is the caller graph for this function:

template<class R, class P>
int etirm::Examinee< R, P >::NumItems (  )  [inline]

Number of items in examinee response vector.

Definition at line 116 of file Examinee.h.

References etirm::Examinee< R, P >::mResponses.

Referenced by etirm::examinee_response_str(), and etirm::examinee_responses().

00117     {
00118       return mResponses.size();
00119     }

Here is the caller graph for this function:

template<class R, class P>
void etirm::Examinee< R, P >::SetPosterior ( posterior_vector posterior  )  [inline]

Assigns posterior latent variable probabilities for examinee.

Function Parameters

Parameters:
[in] &posterior Address of posterior probability vector for examinee.

Definition at line 196 of file Examinee.h.

References etirm::Examinee< R, P >::mPosterior.

Referenced by etirm::examinee_set_posterior().

00197   {
00198     if (mPosterior)
00199     {
00200       *mPosterior = posterior;
00201     }
00202     else
00203     {
00204       mPosterior = new posterior_vector(posterior);
00205     }
00206   }

Here is the caller graph for this function:

template<class R, class P>
P::iterator etirm::Examinee< R, P >::posterior_begin (  )  [inline]

Assigns iterator to first element of the examinee's posterior probability vector.

Note: This function is defined within the class definition so that it compiles with Microsoft Visual C++ 6.

Definition at line 138 of file Examinee.h.

References etirm::Examinee< R, P >::mPosterior.

Referenced by etirm::examinee_get_posterior(), and etirm::examinee_posterior_mean().

00139     {
00140       if (!mPosterior)
00141         throw RuntimeError("No posterior distribution for examinee", "Examinee::posterior_begin");
00142       return mPosterior->begin();
00143     }

Here is the caller graph for this function:

template<class R, class P>
int etirm::Examinee< R, P >::NumLatentVarCat (  )  [inline]

Number of categories in discrete latent variable distribution.

Definition at line 146 of file Examinee.h.

References etirm::Examinee< R, P >::mPosterior.

Referenced by etirm::examinee_get_posterior(), and etirm::examinee_posterior_mean().

00147     {
00148       return (mPosterior ? mPosterior->size() : 0);
00149     }

Here is the caller graph for this function:

template<class R, class P>
void etirm::Examinee< R, P >::SetMarginalRespLikelihood ( Real  likelihood  )  [inline]

Assigns marginal likelihood of examinee's response pattern.

Function Parameters

Parameters:
[in] likelihood Value of marginal likelihood of examinee's response pattern.

Definition at line 159 of file Examinee.h.

References etirm::Examinee< R, P >::mMarginalResponseLikelihood.

00160     {
00161       mMarginalResponseLikelihood = likelihood;
00162     }

template<class R, class P>
Real etirm::Examinee< R, P >::GetMarginalRespLikelihood (  )  [inline]

Returns marginal likelihood of examinee's response pattern.

Definition at line 168 of file Examinee.h.

References etirm::Examinee< R, P >::mMarginalResponseLikelihood.

00169     {
00170       return mMarginalResponseLikelihood;
00171     }


Member Data Documentation

template<class R, class P>
Real etirm::Examinee< R, P >::mCount [protected]

Number of examinees with the pattern of item responses in mResponses.

Definition at line 176 of file Examinee.h.

Referenced by etirm::Examinee< R, P >::Count(), and etirm::Examinee< R, P >::SetCount().

template<class R, class P>
response_vector etirm::Examinee< R, P >::mResponses [protected]

Responses to items. Includes responses to items not presented to the examinee.

Definition at line 179 of file Examinee.h.

Referenced by etirm::Examinee< R, P >::NumItems(), etirm::Examinee< R, P >::responses_begin(), etirm::Examinee< R, P >::responses_end(), and etirm::Examinee< R, P >::SetResponses().

template<class R, class P>
posterior_vector* etirm::Examinee< R, P >::mPosterior [protected]

Posterior latent variable probabilities for examinee.

Definition at line 182 of file Examinee.h.

Referenced by etirm::Examinee< R, P >::NumLatentVarCat(), etirm::Examinee< R, P >::posterior_begin(), etirm::Examinee< R, P >::SetPosterior(), and etirm::Examinee< R, P >::~Examinee().

template<class R, class P>
Real etirm::Examinee< R, P >::mMarginalResponseLikelihood [protected]

Marginal likelihood of examinee's response pattern.

Definition at line 185 of file Examinee.h.

Referenced by etirm::Examinee< R, P >::GetMarginalRespLikelihood(), and etirm::Examinee< R, P >::SetMarginalRespLikelihood().


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