Beispiel #1
0
        // The item information function for the three parameter model.  See formula (6.12) on page 144 in Ayala.  Note that 'p_j' here represents
        // the three parameter model probability of obtaining a correct answer
        public double GetInformation(double theta)
        {
            double p     = _probabilityFunction.ProbabilityOfCorrectResponse(theta);
            double term1 = (p - _chi) / (1 - _chi);
            double term2 = (1 - p) / p;

            return(_alpha * _alpha * term1 * term1 * term2);
        }
        // Formula given on page 307 of https://ppw.kuleuven.be/okp/_pdf/Magis2013ANOTI.pdf
        public double GetInformation(double theta)
        {
            double p     = _probabilityFunction.ProbabilityOfCorrectResponse(theta);
            double term1 = (p - _chi) / (_epsilon - _chi);
            double term2 = (_epsilon - p);
            double term3 = p * (1 - p);

            return(_alpha * _alpha * term1 * term1 * term2 * term2 / term3);
        }
        // The standard error of estimate (SEE) for the location parameter theta.  The general formula is given by (2.11) on page 28.
        public double Calculate(List <QuestionInfo> questionHistory, double theta)
        {
            List <IModelParameters> modelParametersList = questionHistory.Select(x => x.Question.ModelParameters).ToList();
            List <int> responseVector = questionHistory.Select(x => (int)x.Score).ToList();

            double sum = 0;

            for (int i = 0; i < responseVector.Count; i++)
            {
                IModelParameters     modelParameters     = modelParametersList[i];
                IProbabilityFunction probabilityFunction = _probabilityFunctionFactory.Build(modelParameters);

                double p      = probabilityFunction.ProbabilityOfCorrectResponse(theta);
                double pPrime = probabilityFunction.FirstThetaDerivative(theta);

                sum += pPrime * pPrime / (p * (1 - p));
            }

            return(1 / Math.Sqrt(sum));
        }
Beispiel #4
0
        // The item information function for the two parameter model.  See formula (5.3) on page 102 of Ayala
        public double GetInformation(double theta)
        {
            double p = _twoParamProbabilityFunction.ProbabilityOfCorrectResponse(theta);

            return(_alpha * _alpha * p * (1 - p));
        }