Log likelihood ratio test for goodness of fit.
More...
#include "libirt.h"
#include <math.h>
#include <gsl/gsl_cdf.h>
Functions |
void | llk_ratio_fit_test (gsl_vector *quad_sizes, gsl_matrix *quad_freqs, gsl_vector *quad_weights, gsl_matrix *probs, int nbr_inter, gsl_vector *chi2, gsl_vector_int *df, gsl_vector *p_value) |
| Compute the log likelihood ratio statistics of each items.
|
void | llk_ratio_fit_test_mc (gsl_vector *quad_sizes, gsl_matrix *quad_freqs, gsl_vector *quad_weights, gsl_matrix *probs, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, int nbr_inter, gsl_vector *chi2, gsl_vector_int *df, gsl_vector *p_value) |
| Compute the log likelihood ratio statistics of each multiple choice items.
|
Detailed Description
Log likelihood ratio test for goodness of fit.
- Author
- Stephane Germain germs.nosp@m.te@g.nosp@m.mail..nosp@m.com
Function Documentation
void llk_ratio_fit_test |
( |
gsl_vector * |
quad_sizes, |
|
|
gsl_matrix * |
quad_freqs, |
|
|
gsl_vector * |
quad_weights, |
|
|
gsl_matrix * |
probs, |
|
|
int |
nbr_inter, |
|
|
gsl_vector * |
chi2, |
|
|
gsl_vector_int * |
df, |
|
|
gsl_vector * |
p_value |
|
) |
| |
Compute the log likelihood ratio statistics of each items.
- Parameters
-
[in] | quad_sizes | A vector(classes) with the expected number of subjects in each class. |
[in] | quad_freqs | A matrix(items x classes) with the expected number of subjects in the class having a success at the item. |
[in] | quad_weights | A vector(classes) with the normal weights of each class. |
[in] | probs | A matrix(items x classes) with response functions. |
[in] | nbr_inter | The number of intervals to use. |
[out] | chi2 | A vector(items+1) with the statistics of each items and for the overall fit. |
[out] | df | A vector(items+1) with the degrees of freedom. |
[out] | p_value | A vector(items+1) with the p-values. |
- Warning
- The memory for the outputs should be allocated before.
void llk_ratio_fit_test_mc |
( |
gsl_vector * |
quad_sizes, |
|
|
gsl_matrix * |
quad_freqs, |
|
|
gsl_vector * |
quad_weights, |
|
|
gsl_matrix * |
probs, |
|
|
gsl_vector_int * |
nbr_options, |
|
|
gsl_vector_int * |
items_pos, |
|
|
int |
nbr_inter, |
|
|
gsl_vector * |
chi2, |
|
|
gsl_vector_int * |
df, |
|
|
gsl_vector * |
p_value |
|
) |
| |
Compute the log likelihood ratio statistics of each multiple choice items.
- Parameters
-
[in] | quad_sizes | A vector(classes) with the expected number of subjects in each class. |
[in] | quad_freqs | A matrix(options x classes) with the expected number of subjects in the class having a success at the option. |
[in] | quad_weights | A vector(classes) with the normal weights of each class. |
[in] | probs | A matrix(options x classes) with response functions. |
[in] | nbr_options | A vector(items) with the number of option of each items. |
[in] | items_pos | A vector(items) with the position of the first option of each item. |
[in] | nbr_inter | The number of intervals to use. |
[out] | chi2 | A vector(items+1) with the statistics of each items and for the overall fit. |
[out] | df | A vector(items+1) with the degrees of freedom. |
[out] | p_value | A vector(items+1) with the p-values. |
- Warning
- The memory for the outputs should be allocated before.