Functions to estimate the abilities by ML.
More...
#include "libirt.h"
#include <stdio.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_roots.h>
Functions |
void | mle_ability_3plm_fdfdf2 (double ability, void *params, double *f, double *df, double *df2) |
| Compute the log likelihood, gradient and Hessian of the pattern.
|
double | mle_ability_3plm_f (double ability, void *params) |
| Compute the log likelihood of the pattern.
|
double | mle_ability_3plm_df (double ability, void *params) |
| Compute the log likelihood gradient of the pattern.
|
double | mle_ability_3plm_df2 (double ability, void *params) |
| Compute the log likelihood Hessian of the pattern.
|
void | mle_ability_3plm_dfdf2 (double ability, void *params, double *df, double *df2) |
| Compute the log likelihood gradient and Hessian of the pattern.
|
int | mle_abilities_3plm (int max_iter, double prec, gsl_matrix_int *patterns, gsl_vector *slopes, gsl_vector *thresholds, gsl_vector *asymptotes, gsl_vector *abilities, gsl_vector *abilities_stddev) |
| Estimate the abilities by maximum likelihood.
|
Detailed Description
Functions to estimate the abilities by ML.
- Author
- Stephane Germain germs.nosp@m.te@g.nosp@m.mail..nosp@m.com
Function Documentation
void mle_ability_3plm_fdfdf2 |
( |
double |
ability, |
|
|
void * |
params, |
|
|
double * |
f, |
|
|
double * |
df, |
|
|
double * |
df2 |
|
) |
| |
Compute the log likelihood, gradient and Hessian of the pattern.
- Parameters
-
[in] | ability | The ability level. |
[in] | params | The extra parameter to passes to the function. |
[out] | f | The log likelihood. |
[out] | df | The gradient of the log likelihood. |
[out] | df2 | The Hessian of the log likelihood. |
This function is not used directly by the root finding functions, but by others functions that comply with the gsl.
double mle_ability_3plm_f |
( |
double |
ability, |
|
|
void * |
params |
|
) |
| |
Compute the log likelihood of the pattern.
- Parameters
-
[in] | ability | The ability level. |
[in] | params | The extra parameter to passes to the function. |
This function is just a wrapper around mle_ability_3plm_fdfdf2 to be used by the root finding functions in the gsl.
- Returns
- The log likelihood.
double mle_ability_3plm_df |
( |
double |
ability, |
|
|
void * |
params |
|
) |
| |
Compute the log likelihood gradient of the pattern.
- Parameters
-
[in] | ability | The ability level. |
[in] | params | The extra parameter to passes to the function. |
This function is just a wrapper around mle_ability_3plm_fdfdf2 to be used by the root finding functions in the gsl.
- Returns
- The log likelihood gradient.
double mle_ability_3plm_df2 |
( |
double |
ability, |
|
|
void * |
params |
|
) |
| |
Compute the log likelihood Hessian of the pattern.
- Parameters
-
[in] | ability | The ability level. |
[in] | params | The extra parameter to passes to the function. |
This function is just a wrapper around mle_ability_3plm_fdfdf2 to be used by the root finding functions in the gsl.
- Returns
- The log likelihood Hessian.
void mle_ability_3plm_dfdf2 |
( |
double |
ability, |
|
|
void * |
params, |
|
|
double * |
df, |
|
|
double * |
df2 |
|
) |
| |
Compute the log likelihood gradient and Hessian of the pattern.
- Parameters
-
[in] | ability | The ability level. |
[in] | params | The extra parameter to passes to the function. |
[out] | df | The gradient of the log likelihood. |
[out] | df2 | The Hessian of the log likelihood. |
This function is just a wrapper around mle_ability_3plm_fdfdf2 to be used by the root finding functions in the gsl.
int mle_abilities_3plm |
( |
int |
max_iter, |
|
|
double |
prec, |
|
|
gsl_matrix_int * |
patterns, |
|
|
gsl_vector * |
slopes, |
|
|
gsl_vector * |
thresholds, |
|
|
gsl_vector * |
asymptotes, |
|
|
gsl_vector * |
abilities, |
|
|
gsl_vector * |
abilities_stddev |
|
) |
| |
Estimate the abilities by maximum likelihood.
- Parameters
-
[in] | max_iter | The maximum number of Newton iterations performed for each pattern. |
[in] | prec | The desired precision of each parameter estimate. |
[in] | patterns | A matrix(patterns x items) of binary responses. |
[in] | slopes | A vector(items) with the slope parameters of each item. |
[in] | thresholds | A vector(items) with the threshold parameters of each item. |
[in] | asymptotes | A vector(items) with the asymptote parameters of each item. Can be NULL for the 2PLM. |
[in,out] | abilities | A vector(patterns) with the estimated abilities. They should be initialize first. |
[out] | abilities_stddev | A vector(items) with the standard errors of the estimated abilities. |
- Returns
- The number of pattern that did not converged.
detect the degenerates patterns.