Functions to estimate the item response functions by Nadaraya-Watson. (Kernel smoothing, Testgraf).
More...
#include "libirt.h"
#include <stdio.h>
#include <math.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_sort_vector_double.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_randist.h>
Functions |
void | nadaraya_watson (double bandwidth, gsl_matrix_int *patterns, gsl_vector *quad_points, gsl_vector *quad_weights, gsl_matrix *probs, gsl_matrix *probs_stddev) |
| Estimate the response functions by Nadaraya-Watson kernel smoothing (Testgraf).
|
Detailed Description
Functions to estimate the item response functions by Nadaraya-Watson. (Kernel smoothing, Testgraf).
- Author
- Stephane Germain germs.nosp@m.te@g.nosp@m.mail..nosp@m.com
Function Documentation
void nadaraya_watson |
( |
double |
bandwidth, |
|
|
gsl_matrix_int * |
patterns, |
|
|
gsl_vector * |
quad_points, |
|
|
gsl_vector * |
quad_weights, |
|
|
gsl_matrix * |
probs, |
|
|
gsl_matrix * |
probs_stddev |
|
) |
| |
Estimate the response functions by Nadaraya-Watson kernel smoothing (Testgraf).
- Parameters
-
[in] | bandwidth | The smoothing parameter, will be multiply by the number of distinct scores to the power of -0.2 to give the bandwidth. |
[in] | patterns | A matrix(patterns x items). |
[in] | quad_points | A vector(classes) with the middle points of each quadrature class. |
[in] | quad_weights | A vector(classes) with the prior weights of each quadrature class. |
[out] | probs | A matrix(items x classes) with the estimated response functions. They should be initialize first. |
[out] | probs_stddev | matrix(items x classes) with the standard error of the logit response functions. |
- Warning
- Do not group the patterns before.
-
The memory for the response functions should be allocated before.