etirm::ICCLogistic< 2 > Class Template Reference

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

#include <ICCLogistic.h>

Inheritance diagram for etirm::ICCLogistic< 2 >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ICCLogistic (Real D, Real c)
 Instantiation of 2-parameter logistic item response model, fixing scale constant D and pseudo-guessing parameter c.
Real ICC (const RealVector &param, Real theta) const
 Returns value of item characteristic curve (ICC) of the 2PL model for a set of item parameters and theta value.
Real OpenICC (const RealVector &param, Real theta) const
 Returns value of item characteristic curve (ICC) of the 2PL model in the 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 2PL 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 2PL 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 2-parameter 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 &) 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 Attributes

Real fixedC
 fixed c parameter


Detailed Description

template<>
class etirm::ICCLogistic< 2 >

Two-parameter logistic item response model.

Definition at line 409 of file ICCLogistic.h.


Constructor & Destructor Documentation

etirm::ICCLogistic< 2 >::ICCLogistic ( Real  D,
Real  c 
)

Instantiation of 2-parameter logistic item response model, fixing scale constant D and pseudo-guessing parameter c.

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).
[in] c Pseudo-guessing parameter for the item.
Constructor for two-parameter logistic ICC object

Definition at line 226 of file ICCLogistic.cpp.

00226                                             :
00227     ICC3PLFunc(2, D)
00228   {
00229     if (c < 0.0 || c> 1.0)throw InvalidArgument("Invalid c parameter",
00230         "ICCLogistic<2>::ICCLogistic");
00231     fixedC = c;
00232   }


Member Function Documentation

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

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

Function Parameters

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

Definition at line 438 of file ICCLogistic.h.

00439     {
00440       return ICC3PL(param(1), param(2), fixedC, theta);
00441     }

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

Returns value of item characteristic curve (ICC) of the 2PL model in the 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).
[in] theta Examinee ability parameter.

Definition at line 456 of file ICCLogistic.h.

00457     {
00458       return OpenICC3PL(param(1), param(2), fixedC, theta);
00459     }

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

Computes (gradient) vector of first partial derivatives of the 2PL 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).
[in] theta Examinee ability parameter.
[out] &deriv Address of gradient vector of length 2.

Definition at line 474 of file ICCLogistic.h.

00475     {
00476       ICC3PLDeriv1(2, param(1), param(2), fixedC, theta, deriv);
00477     }

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

Computes (hessian) matrix of second partial derivatives of the 2PL 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).
[in] theta Examinee ability parameter.
[out] &deriv Address of 2x2 hessian matrix. Only the lower half and diagonal of the matrix are populated, the upper off-diagonal entries remain undefined.

Definition at line 493 of file ICCLogistic.h.

00494     {
00495       ICC3PLDeriv2(2, param(1), param(2), fixedC, theta, deriv);
00496     }

bool etirm::ICCLogistic< 2 >::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 504 of file ICCLogistic.h.

00505     { 
00506       return true;
00507     }

bool etirm::ICCLogistic< 2 >::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 515 of file ICCLogistic.h.

00516     { 
00517       return true;
00518     }

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

Transforms the parameters of a 2-parameter 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 (slope and intercept) to be transformed.

Definition at line 532 of file ICCLogistic.h.

References etirm::ICC3PLFunc::Scale().

00533     {
00534       ICC3PLFunc::Scale(slope, intercept, param(1), param(2));
00535     }

Here is the call graph for this function:

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

Returns scaling constant D.

Definition at line 538 of file ICCLogistic.h.

00539     { 
00540       return mD;
00541     }

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

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

Function Parameters

Parameters:
[in] &estParam Address of vector of item parameter estimates.
[out] &allParam Address of copied item parameter vector.
Method to return allParam for 2PL item (estParam contains estimated parameters a and b, allParam is assigned to contain a, b, c).

Definition at line 252 of file ICCLogistic.cpp.

00254   {
00255     if (estParam.size() != 2 || allParam.size() != 3)
00256     {
00257       throw
00258       InvalidArgument("Invalid number of parameters",
00259           "ICCLogistic<2>::GetAllParameters");
00260     }
00261     allParam[0] = estParam[0];
00262     allParam[1] = estParam[1];
00263     allParam[2] = fixedC;
00264   }

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

Returns number of estimated parameters.

Definition at line 555 of file ICCLogistic.h.

00556     { 
00557       return numParameters;
00558     }

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

Returns sum of number of fixed and estimated parameters.

Definition at line 561 of file ICCLogistic.h.

00562     { 
00563       return numParameters+1;
00564     }

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

Returns true if vector param contains valid item parameters.

Function Parameters

Parameters:
[in] & Address of item parameter vector (not used with this model).

Definition at line 574 of file ICCLogistic.h.

00575     { 
00576       return true;
00577     }

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

Returns name of model.

Definition at line 580 of file ICCLogistic.h.

00581     { 
00582       return std::string("2PL");
00583     }

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

Returns model type from enum defined in etirmtypes.h.

Definition at line 586 of file ICCLogistic.h.

References etirm::TwoPL.

00587     { 
00588       return TwoPL;
00589     }

template<class I>
void etirm::ICCLogistic< 2 >::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 606 of file ICCLogistic.h.

00607     {
00608 
00609       if ((end_param - begin_param) != 3 || estParam.size() != 2)
00610       throw InvalidArgument("Wrong number of parameters", "ICCLogistic<2>::SetAllParameters");
00611 
00612       if (begin_param[2] < 0.0 || begin_param[2]> 1.0) throw InvalidArgument("Invalid c parameter","ICCLogistic<2>::SetAllParameters");
00613 
00614       RealVector::iterator ie = estParam.begin();
00615       for (int i = 2; i--; ++ie, ++begin_param)
00616       {
00617         *ie = *begin_param;
00618       }
00619 
00620       fixedC = *begin_param;
00621     }


Member Data Documentation

Real etirm::ICCLogistic< 2 >::fixedC [private]

fixed c parameter

Definition at line 626 of file ICCLogistic.h.


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