#include <Examinee.h>
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_vector * | mPosterior |
Posterior latent variable probabilities for examinee. | |
Real | mMarginalResponseLikelihood |
Marginal likelihood of examinee's response pattern. |
P | Type for storing vector of posterior probabilities. | |
R | Type for storing vector of item responses. |
Definition at line 49 of file Examinee.h.
typedef R etirm::Examinee< R, P >::response_vector |
typedef P etirm::Examinee< R, P >::posterior_vector |
typedef R::value_type etirm::Examinee< R, P >::response_type |
typedef R::iterator etirm::Examinee< R, P >::response_iterator |
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 }
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 }
void etirm::Examinee< R, P >::SetResponses | ( | response_vector & | responses | ) | [inline] |
Assigns the examinee's item responses (copies response vector).
[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 }
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 }
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 }
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 }
void etirm::Examinee< R, P >::SetCount | ( | Real | count | ) | [inline] |
Assigns the number of times to count the pattern of item responses for this examinee.
[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 }
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 }
void etirm::Examinee< R, P >::SetPosterior | ( | posterior_vector & | posterior | ) | [inline] |
Assigns posterior latent variable probabilities for examinee.
[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 }
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 }
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 }
void etirm::Examinee< R, P >::SetMarginalRespLikelihood | ( | Real | likelihood | ) | [inline] |
Assigns marginal likelihood of examinee's response pattern.
[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 }
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 }
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().
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().
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().
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().