etirm::ICCLogistic< 3 > Class Template Reference

Three-parameter logistic item response model. More...

#include <ICCLogistic.h>

Inheritance diagram for etirm::ICCLogistic< 3 >:

Inheritance graph
[legend]
Collaboration diagram for etirm::ICCLogistic< 3 >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ICCLogistic (Real D)
 Instantiation of logistic item response model, fixing scale constant.
Real ICC (const RealVector &param, Real theta) const
 Returns value of the 3PL item characteristic curve (ICC) for a set of item parameters and theta value.
Real OpenICC (const RealVector &param, Real theta) const
 Returns value of the 3PL item characteristic curve (ICC) in open interval (0, 1); for a set of item parameters and theta value.
void ICCDeriv1 (const RealVector &param, Real theta, RealVector &deriv) const
 Computes (gradient) vector of first partial derivatives of the 3PL model with respect to item parameters.
void ICCDeriv2 (const RealVector &param, Real theta, RealMatrix &deriv) const
 Computes (hessian) matrix of second partial derivatives of the 3PL model with respect to item parameters.
bool GradientDefined () const
 Function to indicate that the algebraic gradient of the item (ICCDeriv1) is defined.
bool HessianDefined () const
 Function to indicate that the algebraic hessian of the item (ICCDeriv2) is defined.
void Scale (Real slope, Real intercept, RealVector &param)
 Transforms the parameters of a logistic item to a different latent variable scale.
Real GetD () const
 Returns scaling constant D.
void GetAllParameters (const RealVector &estParam, RealVector &allParam) const
 Copies a, b, and c parameters from estParam into allParam.
int NumParameters () const
 Returns number of estimated parameters.
int NumAllParameters () const
 Returns sum of number of fixed and estimated parameters.
bool ValidParameters (const RealVector &param) const
 Returns true if vector param contains valid item parameters.
std::string Name () const
 Returns name of model.
IRTModel Model () const
 Returns model type from enum defined in etirmtypes.h.
template<class I>
void SetAllParameters (I begin_param, I end_param, RealVector &estParam)
 Assigns all item parameters (a, b, and c), fixed and estimated.

Private Member Functions

Real ValidC (Real c) const
 Returns c parameter, if valid, or throws an exception otherwise.


Detailed Description

template<>
class etirm::ICCLogistic< 3 >

Three-parameter logistic item response model.

Definition at line 179 of file ICCLogistic.h.


Constructor & Destructor Documentation

etirm::ICCLogistic< 3 >::ICCLogistic ( Real  D  ) 

Instantiation of logistic item response model, fixing scale constant.

Function Parameters

Parameters:
[in] D Scale constant defining the metric of the parameter estimates. Typical choices are 1 (for the logistic metric) and 1.7 (for the normal-ogive metric).
Constructor for three-parameter logistic ICC object

Definition at line 220 of file ICCLogistic.cpp.

00220                                     :
00221     ICC3PLFunc(3, D)
00222   {
00223   }


Member Function Documentation

Real etirm::ICCLogistic< 3 >::ICC ( const RealVector param,
Real  theta 
) const [inline]

Returns value of the 3PL item characteristic curve (ICC) for a set of item parameters and theta value.

Function Parameters

Parameters:
[in] &param Address of item parameter vector with entries = (a, b, c).
[in] theta Examinee ability parameter.

Definition at line 206 of file ICCLogistic.h.

00207     {
00208       return ICC3PL(param(1), param(2), ValidC(param(3)), theta);
00209     }

Real etirm::ICCLogistic< 3 >::OpenICC ( const RealVector param,
Real  theta 
) const [inline]

Returns value of the 3PL item characteristic curve (ICC) in open interval (0, 1); for a set of item parameters and theta value.

This function version can be used when the logarithm of the probability or logit of the probability needs to be taken.

Function Parameters

Parameters:
[in] &param Address of item parameter vector with entries = (a, b, c).
[in] theta Examinee ability parameter.

Definition at line 224 of file ICCLogistic.h.

00225     {
00226       return OpenICC3PL(param(1), param(2), ValidC(param(3)), theta);
00227     }

void etirm::ICCLogistic< 3 >::ICCDeriv1 ( const RealVector param,
Real  theta,
RealVector deriv 
) const [inline]

Computes (gradient) vector of first partial derivatives of the 3PL model with respect to item parameters.

Returns results in deriv vector.

Function Parameters

Parameters:
[in] &param Address of item parameter vector with entries (a, b, c).
[in] theta Examinee ability parameter.
[out] &deriv Address of gradient vector of length 3.

Definition at line 242 of file ICCLogistic.h.

00243     {
00244       ICC3PLDeriv1(3, param(1), param(2), ValidC(param(3)), theta, deriv);
00245     }

void etirm::ICCLogistic< 3 >::ICCDeriv2 ( const RealVector param,
Real  theta,
RealMatrix deriv 
) const [inline]

Computes (hessian) matrix of second partial derivatives of the 3PL model with respect to item parameters.

Returns results in deriv matrix.

Function Parameters

Parameters:
[in] &param Address of item parameter vector with entries (a, b, c).
[in] theta Examinee ability parameter.
[out] &deriv Address of 3x3 hessian matrix. Only the lower half and diagonal of the matrix are populated, the upper off-diagonal entries remain undefined.

Definition at line 261 of file ICCLogistic.h.

00262     {
00263       ICC3PLDeriv2(3, param(1), param(2), ValidC(param(3)), theta, deriv);
00264     }

bool etirm::ICCLogistic< 3 >::GradientDefined (  )  const [inline]

Function to indicate that the algebraic gradient of the item (ICCDeriv1) is defined.

This function can be used by UNCMIN++.

Definition at line 272 of file ICCLogistic.h.

00273     {
00274       return true;
00275     }

bool etirm::ICCLogistic< 3 >::HessianDefined (  )  const [inline]

Function to indicate that the algebraic hessian of the item (ICCDeriv2) is defined.

This function can be used by UNCMIN++.

Definition at line 283 of file ICCLogistic.h.

00284     {
00285       return true;
00286     }

void etirm::ICCLogistic< 3 >::Scale ( Real  slope,
Real  intercept,
RealVector param 
) [inline]

Transforms the parameters of a logistic item to a different latent variable scale.

Function Parameters

Parameters:
[in] slope Slope parameter of linear scale transformation.
[in] intercept Intercept parameter of linear scale transformation.
[in,out] &param Address of item parameter vector to be transformed. Only the first two entries (slope and location) will be transformed.

Definition at line 299 of file ICCLogistic.h.

References etirm::ICC3PLFunc::Scale().

00300     {
00301       ICC3PLFunc::Scale(slope, intercept, param(1), param(2));
00302     }

Here is the call graph for this function:

Real etirm::ICCLogistic< 3 >::GetD (  )  const [inline]

Returns scaling constant D.

Definition at line 305 of file ICCLogistic.h.

00306     {
00307       return mD;
00308     }

void etirm::ICCLogistic< 3 >::GetAllParameters ( const RealVector estParam,
RealVector allParam 
) const

Copies a, b, and c parameters from estParam into allParam.

Method to return allParam for 3PL item.

Function Parameters

Parameters:
[in] &estParam Address of vector of item parameter estimates.
[out] &allParam Address of copied item parameter vector.

Definition at line 244 of file ICCLogistic.cpp.

00246   {
00247     allParam = estParam;
00248   }

int etirm::ICCLogistic< 3 >::NumParameters (  )  const [inline]

Returns number of estimated parameters.

Definition at line 322 of file ICCLogistic.h.

00323     {
00324       return numParameters;
00325     }

int etirm::ICCLogistic< 3 >::NumAllParameters (  )  const [inline]

Returns sum of number of fixed and estimated parameters.

Definition at line 328 of file ICCLogistic.h.

00329     {
00330       return numParameters;
00331     }

bool etirm::ICCLogistic< 3 >::ValidParameters ( const RealVector param  )  const [inline]

Returns true if vector param contains valid item parameters.

Function Parameters

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

Definition at line 341 of file ICCLogistic.h.

00342     {
00343       return (param(3) >= 0.0 && param(3) <= 1.0);
00344     }

std::string etirm::ICCLogistic< 3 >::Name (  )  const [inline]

Returns name of model.

Definition at line 347 of file ICCLogistic.h.

00348     {
00349       return std::string("3PL");
00350     }

IRTModel etirm::ICCLogistic< 3 >::Model (  )  const [inline]

Returns model type from enum defined in etirmtypes.h.

Definition at line 353 of file ICCLogistic.h.

References etirm::ThreePL.

00354     {
00355       return ThreePL;
00356     }

template<class I>
void etirm::ICCLogistic< 3 >::SetAllParameters ( begin_param,
end_param,
RealVector estParam 
) [inline]

Assigns all item parameters (a, b, and c), fixed and estimated.

Template Parameters

Parameters:
I Type of iterator over item parameters.

Function Parameters

Parameters:
[in] begin_param Iterator pointing to first item parameter for the item.
[in] end_param Iterator point to one after the last parameter for the item.
[out] &estParam Address to vector "all" parameters for this item.

Definition at line 372 of file ICCLogistic.h.

00373     {
00374       if ((end_param - begin_param) != 3 || estParam.size() != 3)
00375         throw InvalidArgument("Wrong number of parameters", "ICCLogistic<3>::SetAllParameters");
00376 
00377       if (begin_param[2] < 0.0 || begin_param[2] > 1.0)
00378         throw InvalidArgument("Invalid c parameter","ICCLogistic<3>::SetAllParameters");
00379 
00380       RealVector::iterator ie = estParam.begin();
00381       for (int i = 3; i--; ++ie, ++begin_param)
00382       {
00383         *ie = *begin_param;
00384       }
00385     }

Real etirm::ICCLogistic< 3 >::ValidC ( Real  c  )  const [inline, private]

Returns c parameter, if valid, or throws an exception otherwise.

Function Parameters

Parameters:
[in] c Pseudo-guessing parameter c for the item.

Definition at line 396 of file ICCLogistic.h.

00397     {
00398       if (c < 0.0 || c > 1.0)throw RuntimeError("Invalid c parameter","ICCLogistic<3>::ValidC"); 
00399     
00400       return c;
00401     }


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