etirm::ICC3PLFunc Class Reference

Common functions and data members used for specializations of ICCLogistic. More...

#include <ICCLogistic.h>

Inheritance diagram for etirm::ICC3PLFunc:

Inheritance graph
[legend]

List of all members.

Protected Member Functions

 ICC3PLFunc (int nparam, Real D)
 Logistic response function class for dichotomous items.
Real ICC3PL (Real a, Real b, Real c, Real theta) const
 Returns the probability of a correct response for the 3PL item with parameters a, b, c, and ability value theta.
Real OpenICC3PL (Real a, Real b, Real c, Real theta) const
 Returns the probability in the open interval (0, 1) of a correct response for the 3PL item with parameters a, b, c, and ability value theta.
void ICC3PLDeriv1 (int numParam, Real a, Real b, Real c, Real theta, RealVector &deriv) const
 Computes (gradient) vector of first partial derivatives of the 3PL model with respect to item parameters.
void ICC3PLDeriv2 (int numParam, Real a, Real b, Real c, Real theta, RealMatrix &deriv) const
 Computes (hessian) matrix of second partial derivatives of the 3PL model with respect to item parameters.
void Scale (Real slope, Real intercept, Real &a, Real &b)
 Transforms the parameters of a logistic item to a different latent variable scale.

Protected Attributes

Real mD
 D constant in ICC, use D=1.0 for logistic metric, D=1.7 for normal-ogive metric.
int numParameters
 Number of parameters in the (logistic) item response model.


Detailed Description

Common functions and data members used for specializations of ICCLogistic.

Definition at line 38 of file ICCLogistic.h.


Constructor & Destructor Documentation

etirm::ICC3PLFunc::ICC3PLFunc ( int  nparam,
Real  D 
) [inline, protected]

Logistic response function class for dichotomous items.

Function Parameters

Parameters:
[in] nparam Number of estimated item parameters (1, 2, or 3).
[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).

Definition at line 53 of file ICCLogistic.h.

00053                                    :
00054       mD(D), numParameters(nparam)
00055     {
00056     }


Member Function Documentation

Real etirm::ICC3PLFunc::ICC3PL ( Real  a,
Real  b,
Real  c,
Real  theta 
) const [protected]

Returns the probability of a correct response for the 3PL item with parameters a, b, c, and ability value theta.

Function Parameters

Parameters:
[in] a Item slope parameter.
[in] b Item location parameter.
[in] c Item pseudo-guessing parameter.
[in] theta Examinee ability parameter.

Definition at line 57 of file ICCLogistic.cpp.

References mD.

Referenced by OpenICC3PL().

00058   {
00059 
00060     Real prob = std::exp(-mD * a * (theta - b));
00061     prob += 1.0;
00062     prob = (1.0-c) / prob;
00063     prob += c;
00064 
00065     return prob;
00066   }

Here is the caller graph for this function:

Real etirm::ICC3PLFunc::OpenICC3PL ( Real  a,
Real  b,
Real  c,
Real  theta 
) const [protected]

Returns the probability in the open interval (0, 1) of a correct response for the 3PL item with parameters a, b, c, and ability value theta.

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

Function Parameters

Parameters:
[in] a Item slope parameter.
[in] b Item location parameter.
[in] c Item pseudo-guessing parameter.
[in] theta Examinee ability parameter.

Definition at line 83 of file ICCLogistic.cpp.

References ICC3PL().

00084   {
00085     double prob = ICC3PL(a, b, c, theta);
00086 
00087     /* Make sure probability is between 0 and 1 */
00088     if (prob <= 0.0)
00089     {
00090       prob = std::numeric_limits<Real>::min();
00091     }
00092     else if (prob >= 1.0)
00093     {
00094       prob = 1.0 - std::numeric_limits<Real>::epsilon();
00095     }
00096     return prob;
00097   }

Here is the call graph for this function:

void etirm::ICC3PLFunc::ICC3PLDeriv1 ( int  numParam,
Real  a,
Real  b,
Real  c,
Real  theta,
RealVector deriv 
) const [protected]

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] numParam Number of parameters (1, 2, or 3) of Logistic IRT model.
[in] a Item slope parameter.
[in] b Item location parameter.
[in] c Item pseudo-guessing parameter.
[in] theta Examinee ability parameter.
[out] &deriv Address of gradient vector of length numParam.

Definition at line 114 of file ICCLogistic.cpp.

References mD.

00115   {
00116     Real t = std::exp(-a*mD * (theta - b));
00117     Real onept2 = 1.0 + t;
00118     onept2 *= onept2;
00119 
00120     // derivative with respect to the b parameter   
00121     Real derivb = -a * (1.0 -c) * mD * t;
00122     derivb /= onept2;
00123 
00124     if (numParam == 1)
00125     {
00126       deriv(1) = derivb;
00127       return;
00128     }
00129 
00130     deriv(2) = derivb;
00131 
00132     // derivative with respect to the a parameter   
00133     deriv(1) = (1.0 - c) * (theta - b) * mD * t;
00134     deriv(1) /= onept2;
00135 
00136     // derivative with respect to the c parameter   
00137     if (numParam == 3)
00138     {
00139       deriv(3) = - 1.0 / (1.0 + t);
00140       deriv(3) += 1.0;
00141     }
00142   }

void etirm::ICC3PLFunc::ICC3PLDeriv2 ( int  numParam,
Real  a,
Real  b,
Real  c,
Real  theta,
RealMatrix deriv 
) const [protected]

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] numParam Number of parameters (1, 2, or 3) of Logistic IRT model.
[in] a Item slope parameter.
[in] b Item location parameter.
[in] c Item pseudo-guessing parameter.
[in] theta Examinee ability parameter.
[out] &deriv Address of hessian matrix of dimension numParam. Only the lower half and diagonal of the matrix are populated, the upper off-diagonal entries remain undefined.
Returns results in deriv matrix.

Function Parameters

Parameters:
[in] numParam Number of parameters (1, 2, or 3) of Logistic IRT model.
[in] a Item slope parameter.
[in] b Item location parameter.
[in] c Item pseudo-guessing parameter.
[in] theta Examinee ability parameter.
[out] &deriv Address of hessian matrix of dimension numParam. Only the lower half and diagonal of the matrix are populated, the upper off-diagonal entries remain undefined.

Definition at line 160 of file ICCLogistic.cpp.

References mD.

00161   {
00162 
00163     Real e = std::exp(a*mD * (theta - b));
00164     Real onepe3 = 1.0 + e;
00165     Real onepe2 = onepe3 * onepe3;
00166     onepe3 *= onepe2;
00167     Real d2 = mD * mD;
00168     Real cm1 = c - 1.0;
00169     Real em1 = e - 1.0;
00170 
00171     // second derivative with respect to the b parameter  
00172     Real derivt = a * a;
00173     derivt *= cm1 * d2;
00174     derivt *= e * em1;
00175     derivt /= onepe3;
00176 
00177     if (numParam == 1)
00178     {
00179       deriv(1, 1) = derivt;
00180       return;
00181     }
00182 
00183     deriv(2, 2) = derivt;
00184 
00185     Real bmt = b - theta;
00186 
00187     // second derivative with respect to the a parameter  
00188     derivt = cm1 * d2;
00189     derivt *= e * em1;
00190     derivt *= bmt * bmt;
00191     deriv(1, 1) = derivt / onepe3;
00192 
00193     // second derivative with respect to a and b 
00194     Real t2 = 1 + e;
00195     t2 += a * mD * em1 * bmt;
00196     derivt = t2 * cm1;
00197     derivt *= mD * e;
00198     deriv(2, 1) = derivt / onepe3;
00199 
00200     if (numParam == 3)
00201     { // second derivative with respect to the c parameter 
00202       deriv(3, 3) = 0.0;
00203 
00204       Real einv = 1.0 / e;
00205       Real onepeinv2 = 1.0 + einv;
00206       onepeinv2 *= onepeinv2;
00207 
00208       // second derivative with respect to a and c    
00209       derivt = mD * einv;
00210       derivt *= bmt;
00211       deriv(3, 1) = derivt / onepeinv2;
00212 
00213       // second derivative with respect to b and c    
00214       derivt = a * mD * einv;
00215       deriv(3, 2) = derivt / onepeinv2;
00216     }
00217   }

void etirm::ICC3PLFunc::Scale ( Real  slope,
Real  intercept,
Real a,
Real b 
) [inline, protected]

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] a Item slope parameter.
[in,out] b Item location parameter.

Definition at line 135 of file ICCLogistic.h.

Referenced by etirm::ICCLogistic< 1 >::Scale(), etirm::ICCLogistic< 2 >::Scale(), and etirm::ICCLogistic< 3 >::Scale().

00136     {
00137       a /= slope;
00138       b *= slope;
00139       b += intercept;
00140     }

Here is the caller graph for this function:


Member Data Documentation

Real etirm::ICC3PLFunc::mD [protected]

D constant in ICC, use D=1.0 for logistic metric, D=1.7 for normal-ogive metric.

Definition at line 143 of file ICCLogistic.h.

Referenced by ICC3PL(), ICC3PLDeriv1(), and ICC3PLDeriv2().

int etirm::ICC3PLFunc::numParameters [protected]

Number of parameters in the (logistic) item response model.

Definition at line 146 of file ICCLogistic.h.


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