The exported functions definition of the libirt library. More...
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
Macros | |
#define | LIBIRT_H 1 |
Define a flag if this header file is already included. | |
#define | BLANK -1 |
Define the representation of blank as integer. | |
#define | FALSE 0 |
Define the representation of false as integer. | |
#define | TRUE 1 |
Define the representation of true as integer. | |
#define | VERY_SMALL_PROB ((double)1.0e-10) |
Define the smallest probability allowed. | |
#define | VERY_SMALL_FREQ ((double)1.0e-3) |
Define the smallest frequency allowed. | |
#define | VERY_BIG_LOGIT ((double)23.0) |
Define the biggest logit allowed in absolute value. | |
#define | MAX_POLYCOR ((double)0.9999) |
Define the biggest absolute polyserial correlation allowed. |
Functions | |
int | read_bin_patterns_delimited (FILE *file, int nbr_item, int nbr_subject, int skip, char delimiter, int offset, int extra, char *true_string, char *false_string, char *blank_string, int trimming, gsl_matrix_int **patterns) |
Read binary patterns from a file in delimited format. | |
int | read_mc_patterns_delimited (FILE *file, int nbr_item, int nbr_subject, int skip, char delimiter, int offset, int extra, int trimming, gsl_matrix_int **patterns, gsl_vector_int **nbr_options) |
Read multiple choice patterns from a file in delimited format. | |
double | logit (double p) |
Compute the logit transformation. | |
double | logistic (double t) |
Compute the logistic transformation. | |
double | prob_3plm (double ability, double slope, double threshold, double asymptote) |
Compute the 3 parameter logistic function. | |
void | quadrature (int nbr_quad, double from, double to, gsl_vector *quad_points, gsl_vector *quad_weights) |
Generate the quadrature classes. | |
void | patterns_counts (gsl_matrix_int *subjects, gsl_vector_int **index, gsl_matrix_int **patterns, gsl_vector **counts) |
Group the identical patterns from subjects into patterns. | |
void | probs_3plm (gsl_vector *slopes, gsl_vector *thresholds, gsl_vector *asymptotes, gsl_vector *quad_points, gsl_matrix *probs) |
Compute the response functions for a 3PLM. | |
void | likelihood (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_matrix *like) |
Compute the likelihood of each patterns. | |
void | likelihood_mc (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_matrix *like) |
Compute the likelihood of each multiple choice patterns. | |
void | posteriors (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_vector *quad_weights, gsl_matrix *post) |
Compute the posteriori probabilities. | |
void | posteriors_mc (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_vector *quad_weights, gsl_matrix *post) |
Compute the posteriori probabilities for multiple choice patterns. | |
void | frequencies (gsl_matrix_int *patterns, gsl_vector *counts, gsl_matrix *post, gsl_matrix *probs, gsl_vector *quad_sizes, gsl_matrix *quad_freqs) |
Compute the expected numbers of subjects. | |
int | set_ignore (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_vector *thresholds, gsl_vector_int *ignore) |
Check for degenerate items. | |
void | constrain_probs (gsl_matrix *probs, double eps) |
Reset the probabilities to be inside the open interval (0,1). | |
void | patterns_expand (gsl_matrix_int *patterns_mc, gsl_vector_int *items_nbr, gsl_matrix_int *patterns, gsl_vector_int *items_pos) |
Transform a matrix with multiple choice items into a matrix with binary items by creating a new "item"for each option. | |
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. | |
void | eap_abilities (gsl_matrix *post, gsl_vector *quad_points, gsl_vector *quad_weights, gsl_vector *abilities, gsl_vector *abilities_stddev) |
Estimate the abilities by Bayes exact a posteriori. | |
int | em_bme_3plm (int nbr_par, int max_em_iter, int max_nr_iter, double prec, gsl_matrix_int *patterns, gsl_vector *counts, gsl_vector *quad_points, gsl_vector *quad_weights, int slope_prior, double slope_mean, double slope_dev, int thresh_prior, double thresh_mean, double thresh_dev, int asymp_prior, double asymp_mean, double asymp_weight, gsl_vector *slopes, gsl_vector *thresholds, gsl_vector *asymptotes, gsl_vector *slopes_stddev, gsl_vector *thresh_stddev, gsl_vector *asymp_stddev, gsl_vector_int *ignore, int *nbr_notconverge, gsl_vector_int *notconverge, int adjust_weights) |
Estimate the parameters of a 2PLM or 3PLM by MMLE or more generally (if a prior is used) by BME. | |
int | em_mple_wave (int max_em_iter, int max_nr_iter, double prec, double smooth_factor, gsl_matrix_int *patterns, gsl_vector *counts, gsl_vector *quad_points, gsl_vector *quad_weights, gsl_matrix *probs, gsl_matrix *probs_stddev, gsl_vector_int *ignore, int *nbr_notconverge, gsl_vector_int *notconverge, int adjust_weights) |
Estimate the response functions by PMMLE (Penalized Maximum Marginal Likelihood). | |
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). | |
void | logits_from_probs (gsl_matrix *probs, gsl_matrix *logits) |
Compute the logit from the options characteristic curves. | |
void | probs_from_logits (gsl_matrix *logits, gsl_matrix *probs) |
Compute the options characteristic curves from the logits. | |
int | em_mple_wave_mc (int max_em_iter, int max_nr_iter, double prec, double smooth_factor, gsl_matrix_int *patterns, gsl_vector *counts, gsl_vector *quad_points, gsl_vector *quad_weights, gsl_vector_int *items_pos, gsl_vector_int *items_nbr, gsl_matrix *probs, gsl_matrix *probs_stddev, gsl_vector_int *ignore, int *nbr_notconverge, gsl_vector_int *notconverge, int adjust_weights) |
Estimate the options response functions by PMMLE (Penalized Maximum Marginal Likelihood). | |
int | set_ignore_mc (gsl_matrix_int *patterns, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_matrix *probs, gsl_vector *thresholds, gsl_vector_int *ignore) |
Check for degenerate multiple choice items. | |
void | nadaraya_watson_mc (double bandwidth, gsl_matrix_int *patterns, gsl_vector_int *items_pos, gsl_vector_int *nbr_options, gsl_vector *options_weights, 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). | |
void | probs_2plm_mc (gsl_vector *slopes, gsl_vector *thresholds, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_vector *quad_points, gsl_matrix *probs) |
Compute the response functions for a multivariate logistic model. | |
int | mmle_2plm_mc (int max_em_iter, int max_nr_iter, double prec, gsl_matrix_int *patterns, gsl_vector *counts, gsl_vector *quad_points, gsl_vector *quad_weights, gsl_vector_int *items_pos, gsl_vector_int *nbr_options, gsl_vector *thresholds, gsl_vector *thresh_stddev, gsl_vector *slopes, gsl_vector *slopes_stddev, gsl_vector_int *ignore, int *nbr_notconverge, gsl_vector_int *notconverge, int adjust_weights) |
Estimate the options response functions by MMLE (Maximum Marginal Likelihood). | |
void | probs_2plm_grad (gsl_vector *slopes, gsl_vector *thresholds, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_vector *quad_points, gsl_matrix *probs, gsl_matrix *bounds) |
Compute the response functions for a graded model. | |
int | mmle_2plm_grad (int max_em_iter, int max_nr_iter, double prec, gsl_matrix_int *patterns, gsl_vector *counts, gsl_vector *quad_points, gsl_vector *quad_weights, gsl_vector_int *items_pos, gsl_vector_int *nbr_options, gsl_vector *thresholds, gsl_vector *thresh_stddev, gsl_vector *slopes, gsl_vector *slopes_stddev, gsl_vector_int *ignore, int *nbr_notconverge, gsl_vector_int *notconverge, int adjust_weights) |
Estimate the options response functions by MMLE (Maximum Marginal Likelihood). | |
void | icc_from_probs (gsl_matrix *probs, gsl_matrix *probs_stddev, gsl_vector *options_weights, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_matrix *iccs, gsl_matrix *iccs_stddev) |
Compute the items' characteristic curves from the options' characteristic curves. | |
void | info_from_probs (gsl_matrix *probs, gsl_vector *quad_points, gsl_matrix *infos, gsl_vector *test_info) |
Compute the items' information curves from the response functions. | |
void | info_from_probs_mc (gsl_matrix *probs, gsl_vector *quad_points, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_matrix *options_infos, gsl_matrix *infos, gsl_vector *test_info) |
Compute the options' information curves from the response functions for a multivariate model. | |
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. | |
void | classical_statistics (gsl_matrix_int *patterns, gsl_vector *items_mean, gsl_vector *items_sd, gsl_vector *items_corr, gsl_vector *items_bis_corr, gsl_vector_int *items_nbr, gsl_vector *subjects_mean, gsl_vector_int *subjects_nbr, int *nbr, double *mean, double *sd, double *alpha, gsl_matrix *pairs_corr) |
Compute the classical test theory statistics. | |
void | classical_statistics_mc (gsl_matrix_int *patterns, gsl_vector *options_weights, gsl_vector_int *items_pos, gsl_vector_int *nbr_options, gsl_vector *items_mean, gsl_vector *items_sd, gsl_vector *items_corr, gsl_vector *items_poly_corr, gsl_vector_int *items_nbr, gsl_vector *subjects_score, gsl_vector_int *subjects_nbr, int *nbr, double *mean, double *sd, double *alpha, gsl_matrix *pairs_corr) |
Compute the classical test theory statistics. | |
void | llk_ratio_ld_test (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_vector *quad_weights, gsl_matrix *chi2, gsl_matrix_int *df, gsl_matrix *p_value) |
Compute the log likelihood ratio statistics of each items pairs for local dependance. | |
void | llk_ratio_ld_test_mc (gsl_matrix_int *patterns, gsl_matrix *probs, gsl_vector *quad_weights, gsl_vector_int *nbr_options, gsl_vector_int *items_pos, gsl_matrix *chi2, gsl_matrix_int *df, gsl_matrix *p_value) |
Compute the log likelihood ratio statistics of each multiple choice items pairs for local dependance. | |
void | adjust_quad_weights (double nbr_subject, gsl_vector *quad_sizes, gsl_vector *quad_points, gsl_vector *quad_weights) |
Recompute the quadrature weights based on the observations. | |
int | wmle_abilities (int max_iter, double prec, gsl_matrix *like, gsl_vector *info, gsl_vector *quad_points, gsl_vector *abilities, gsl_vector *abilities_stddev) |
Compute the WMLE of the abilities. | |
double | polyserial_factor (gsl_vector_int *patterns, int nbr_option, int offset, gsl_vector *options_weights) |
Compute the polyserial correlation factor to be multiplied to the point-biserial (pearson) correlation. |
Variables | |
const char * | libirt_version |
The version of the library. | |
int | libirt_verbose |
Control the verbosity level. |
The exported functions definition of the libirt library.
#define LIBIRT_H 1 |
Define a flag if this header file is already included.
#define BLANK -1 |
Define the representation of blank as integer.
#define FALSE 0 |
Define the representation of false as integer.
#define TRUE 1 |
Define the representation of true as integer.
#define VERY_SMALL_PROB ((double)1.0e-10) |
Define the smallest probability allowed.
#define VERY_SMALL_FREQ ((double)1.0e-3) |
Define the smallest frequency allowed.
#define VERY_BIG_LOGIT ((double)23.0) |
Define the biggest logit allowed in absolute value.
#define MAX_POLYCOR ((double)0.9999) |
Define the biggest absolute polyserial correlation allowed.
int read_bin_patterns_delimited | ( | FILE * | file, |
int | nbr_item, | ||
int | nbr_subject, | ||
int | skip, | ||
char | delimiter, | ||
int | offset, | ||
int | extra, | ||
char * | true_string, | ||
char * | false_string, | ||
char * | blank_string, | ||
int | trimming, | ||
gsl_matrix_int ** | patterns | ||
) |
Read binary patterns from a file in delimited format.
[in] | file | A open file descriptor with a rewind capability (not stdin). |
[in] | nbr_item | The number of item to read or 0 for autodetection. |
[in] | nbr_subject | The number of pattern to read or 0 for autodetection. |
[in] | skip | The number of line to skip at the start of the file. |
[in] | delimiter | The delimiter to use. |
[in] | offset | The number of field to skip at the start of each line. |
[in] | extra | The number of field between the items. |
[in] | true_string | The string representing a success. |
[in] | false_string | The string representing a failure. If NULL then anything not a success nor a non response will be assume to be a failure. |
[in] | blank_string | The string representing a non response. If NULL then anything not a success nor a failure will be assume to be a non response. A empty field is always assumed to be a non response. |
[in] | trimming | Enable the trimming of spaces. |
[out] | patterns | A matrix(patterns x items) of binary responses. |
int read_mc_patterns_delimited | ( | FILE * | file, |
int | nbr_item, | ||
int | nbr_subject, | ||
int | skip, | ||
char | delimiter, | ||
int | offset, | ||
int | extra, | ||
int | trimming, | ||
gsl_matrix_int ** | patterns, | ||
gsl_vector_int ** | nbr_options | ||
) |
Read multiple choice patterns from a file in delimited format.
The responses are assumed to be positive integer, anything else will be assumed to be a non response.
[in] | file | A open file descriptor with a rewind capability (not stdin). |
[in] | nbr_item | The number of item to read or 0 for autodetection. |
[in] | nbr_subject | The number of pattern to read or 0 for autodetection. |
[in] | skip | The number of line to skip at the start of the file. |
[in] | delimiter | The delimiter to use. |
[in] | offset | The number of field to skip at the start of each line. |
[in] | extra | The number of field to ignore after each items. |
[in] | trimming | Enable the trimming of spaces. |
[out] | patterns | A matrix(patterns x items) of mc responses. |
[out] | nbr_options | A vector(items) with the number of option of each item in patterns (and probs). |
double logit | ( | double | p | ) |
Compute the logit transformation.
double logistic | ( | double | t | ) |
Compute the logistic transformation.
double prob_3plm | ( | double | ability, |
double | slope, | ||
double | threshold, | ||
double | asymptote | ||
) |
Compute the 3 parameter logistic function.
[in] | ability | |
[in] | slope | |
[in] | threshold | |
[in] | asymptote |
void quadrature | ( | int | nbr_quad, |
double | from, | ||
double | to, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights | ||
) |
Generate the quadrature classes.
[in] | nbr_quad | The number of classes. |
[in] | from | The starting value for the middle points of the classes. |
[in] | to | The ending value for the middle points of the classes. |
[out] | quad_points | A vector(classes) with the middle points of each class. |
[out] | quad_weights | A vector(classes) with the normal weights of each class. |
void patterns_counts | ( | gsl_matrix_int * | subjects, |
gsl_vector_int ** | index, | ||
gsl_matrix_int ** | patterns, | ||
gsl_vector ** | counts | ||
) |
Group the identical patterns from subjects into patterns.
[in] | subjects | A matrix(subjects x items) of binary responses. |
[out] | patterns | A matrix(patterns x items) with the uniques patterns. |
[out] | counts | A vector(patterns) with the count of each pattern. |
[out] | index | A vector(subjects) with the new position of each subjects in patterns. |
void probs_3plm | ( | gsl_vector * | slopes, |
gsl_vector * | thresholds, | ||
gsl_vector * | asymptotes, | ||
gsl_vector * | quad_points, | ||
gsl_matrix * | probs | ||
) |
Compute the response functions for a 3PLM.
[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 a 2PLM. |
[in] | quad_points | A vector(classes) with the middle points of each quadrature class. |
[out] | probs | A matrix(items x classes) with the response functions. |
void likelihood | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_matrix * | like | ||
) |
Compute the likelihood of each patterns.
[in] | patterns | A matrix (patterns x items) of binary responses. |
[in] | probs | A matrix(items x classes) with response functions. |
[out] | like | A matrix(patterns x classes) with the likelihood of each pattern in each quadrature class. |
void likelihood_mc | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_matrix * | like | ||
) |
Compute the likelihood of each multiple choice patterns.
[in] | patterns | A matrix (patterns x options) of binary responses. |
[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 patterns. |
[out] | like | A matrix(patterns x classes) with the likelihood of each pattern in each quadrature class. |
void posteriors | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_vector * | quad_weights, | ||
gsl_matrix * | post | ||
) |
Compute the posteriori probabilities.
[in] | patterns | A matrix (patterns x items) of binary responses. |
[in] | probs | A matrix(items x classes) with response functions. |
[in] | quad_weights | A vector(classes) with the prior weights of each quadrature class. |
[out] | post | A matrix(patterns x classes) with the probability that a pattern is in a quadrature class. |
void posteriors_mc | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector * | quad_weights, | ||
gsl_matrix * | post | ||
) |
Compute the posteriori probabilities for multiple choice patterns.
[in] | patterns | A matrix (patterns x options) of binary responses. |
[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 patterns. |
[in] | quad_weights | A vector(classes) with the prior weights of each quadrature class. |
[out] | post | A matrix(patterns x classes) with the probability that a pattern is in a quadrature class. |
void frequencies | ( | gsl_matrix_int * | patterns, |
gsl_vector * | counts, | ||
gsl_matrix * | post, | ||
gsl_matrix * | probs, | ||
gsl_vector * | quad_sizes, | ||
gsl_matrix * | quad_freqs | ||
) |
Compute the expected numbers of subjects.
[in] | patterns | A matrix (patterns x items) of binary responses. |
[in] | counts | A vector(patterns) with the count of each pattern. |
[in] | post | A matrix(patterns x classes) with the probability that a pattern is in a quadrature class. |
[in] | probs | A matrix(items x classes) with response functions. Used to replace the missing data. |
[out] | quad_sizes | A vector(classes) with the expected number of subjects in the class. |
[out] | quad_freqs | A matrix(items x classes) with the expected number of subjects in the class having a success at the item. |
int set_ignore | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_vector * | thresholds, | ||
gsl_vector_int * | ignore | ||
) |
Check for degenerate items.
For each items, check if it's almost either all success or all failures, and if so enable the ignore flag and set the prob accordingly.
[in] | patterns | A matrix (patterns x items) of binary responses. |
[out] | probs | A matrix (items x classes) of response functions. |
[out] | thresholds | A vector(items) with the threshold parameters of each item. |
[out] | ignore | A vector (items) of flag. |
void constrain_probs | ( | gsl_matrix * | probs, |
double | eps | ||
) |
Reset the probabilities to be inside the open interval (0,1).
[in,out] | probs | A matrix (items x classes) of response functions. |
[in] | eps | The minimal distance allowed from 0 or 1. |
void patterns_expand | ( | gsl_matrix_int * | patterns_mc, |
gsl_vector_int * | items_nbr, | ||
gsl_matrix_int * | patterns, | ||
gsl_vector_int * | items_pos | ||
) |
Transform a matrix with multiple choice items into a matrix with binary items by creating a new "item"for each option.
[in] | patterns_mc | A matrix(patterns x items) of multiple choice responses. |
[in] | nbr_options | A vector(items) with the number of option of each items. |
[out] | patterns | A matrix(patterns x options) of binary responses. |
[out] | items_pos | A vector(items) with the position of the first option of each item in patterns. |
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.
[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. |
detect the degenerates patterns.
void eap_abilities | ( | gsl_matrix * | post, |
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights, | ||
gsl_vector * | abilities, | ||
gsl_vector * | abilities_stddev | ||
) |
Estimate the abilities by Bayes exact a posteriori.
Work also for expanded multiple choices patterns.
[in] | post | A matrix(patterns x classes) with the probability that a pattern is in a quadrature class. |
[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] | abilities | A vector(patterns) with the estimated abilities. |
[out] | abilities_stddev | A vector(items) with the standard errors of the estimated abilities. |
int em_bme_3plm | ( | int | nbr_par, |
int | max_em_iter, | ||
int | max_nr_iter, | ||
double | prec, | ||
gsl_matrix_int * | patterns, | ||
gsl_vector * | counts, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights, | ||
int | slope_prior, | ||
double | slope_mean, | ||
double | slope_dev, | ||
int | thresh_prior, | ||
double | thresh_mean, | ||
double | thresh_dev, | ||
int | asymp_prior, | ||
double | asymp_mean, | ||
double | asymp_weight, | ||
gsl_vector * | slopes, | ||
gsl_vector * | thresholds, | ||
gsl_vector * | asymptotes, | ||
gsl_vector * | slopes_stddev, | ||
gsl_vector * | thresh_stddev, | ||
gsl_vector * | asymp_stddev, | ||
gsl_vector_int * | ignore, | ||
int * | nbr_notconverge, | ||
gsl_vector_int * | notconverge, | ||
int | adjust_weights | ||
) |
Estimate the parameters of a 2PLM or 3PLM by MMLE or more generally (if a prior is used) by BME.
[in] | nbr_par | The number of parameter (1, 2 or 3). |
[in] | max_em_iter | The maximum number of EM iterations. At least 20 iteration are made. |
[in] | max_nr_iter | The maximum number of Newton iterations performed for each item at each EM iteration. |
[in] | prec | The relative change in the likelihood to stop the EM algorithm. This value divided by 10 is also the desired precision of each parameter estimate. |
[in] | patterns | A matrix(patterns x items) of binary responses. |
[in] | counts | A vector(patterns) with the count of each pattern. If NULL the counts are assumed to be all 1. |
[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. |
[in] | slope_prior | Controls whether to use a lognormal(slope_mean, slope_dev) prior on the slope. |
[in] | slope_mean | The mean of the lognormal prior on the slope. |
[in] | slope_dev | The standard deviation of the lognormal prior on the slope. |
[in] | thresh_prior | Controls whether to use a normal(thresh_mean, thresh_dev) prior on the threshold |
[in] | thresh_mean | The mean of the normal prior on the threshold. |
[in] | thresh_dev | The standard deviation of the normal prior on the threshold. |
[in] | asymp_prior | Controls whether to use a beta(asymp_mean, asymp_weight) prior on the asymptote |
[in] | asymp_mean | The mean of the beta prior on the asymptote. The alpha and beta parameter are alpha = mean * weight + 1 and beta = (1 - mean) * weight + 1). |
[in] | asymp_weight | The weight of the beta prior on the asymptote. The alpha and beta parameter are alpha = mean * weight + 1 and beta = (1 - mean) * weight + 1). |
[in,out] | slopes | A vector(items) with the estimated slope parameters. They should be initialize first. |
[out] | slopes_stddev | A vector(items) with the standard errors of the estimated slopes. |
[in,out] | thresholds | A vector(items) with the estimated threshold parameters. They should be initialize first. |
[out] | thresh_stddev | A vector(items) with the standard errors of the estimated thresholds. |
[in,out] | asymptotes | A vector(items) with the estimated asymptote parameters. They should be initialize first. |
[out] | asymp_stddev | A vector(items) with the standard errors of the estimated asymptotes. |
[in] | ignore | A vector(items) of ignore flag. |
[out] | nbr_notconverge | The number of items that didn't converged. |
[out] | notconverge | A vector(items) of flag set for the items that didn't converged. |
[in] | adjust_weights | Controls whether adjust the quadrature weights after each iteration. |
int em_mple_wave | ( | int | max_em_iter, |
int | max_nr_iter, | ||
double | prec, | ||
double | smooth_factor, | ||
gsl_matrix_int * | patterns, | ||
gsl_vector * | counts, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights, | ||
gsl_matrix * | probs, | ||
gsl_matrix * | probs_stddev, | ||
gsl_vector_int * | ignore, | ||
int * | nbr_notconverge, | ||
gsl_vector_int * | notconverge, | ||
int | adjust_weights | ||
) |
Estimate the response functions by PMMLE (Penalized Maximum Marginal Likelihood).
[in] | max_em_iter | The maximum number of EM iterations. At least 20 iteration are made. |
[in] | max_nr_iter | The maximum number of Newton iterations performed for each item at each EM iteration. |
[in] | prec | The relative change in the likelihood to stop the EM algorithm. This value divided by 10 is also the desired precision of each parameter estimate. |
[in] | smooth_factor | The factor to the penality term. |
[in] | patterns | A matrix(patterns x items) of binary responses. |
[in] | counts | A vector(patterns) with the count of each pattern. If NULL the counts are assumed to be all 1. |
[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. |
[in,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. |
[in] | ignore | A vector(items) of ignore flag. |
[out] | nbr_notconverge | The number of items that didn't converged. |
[out] | notconverge | A vector(items) of flag set for the items that didn't converged. |
[in] | adjust_weights | Controls whether adjust the quadrature weights after each iteration. |
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).
[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. |
void logits_from_probs | ( | gsl_matrix * | probs, |
gsl_matrix * | logits | ||
) |
Compute the logit from the options characteristic curves.
[in] | probs | A matrix(options x classes). |
[out] | logits | A matrix(logits x classes). |
void probs_from_logits | ( | gsl_matrix * | logits, |
gsl_matrix * | probs | ||
) |
Compute the options characteristic curves from the logits.
[in] | logits | A matrix(logits x classes). |
[out] | probs | A matrix(options x classes). |
int em_mple_wave_mc | ( | int | max_em_iter, |
int | max_nr_iter, | ||
double | prec, | ||
double | smooth_factor, | ||
gsl_matrix_int * | patterns, | ||
gsl_vector * | counts, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector_int * | nbr_options, | ||
gsl_matrix * | probs, | ||
gsl_matrix * | probs_stddev, | ||
gsl_vector_int * | ignore, | ||
int * | nbr_notconverge, | ||
gsl_vector_int * | notconverge, | ||
int | adjust_weights | ||
) |
Estimate the options response functions by PMMLE (Penalized Maximum Marginal Likelihood).
[in] | max_em_iter | The maximum number of EM iterations. At least 20 iteration are made. |
[in] | max_nr_iter | The maximum number of Newton iterations performed for each item at each EM iteration. |
[in] | prec | The relative change in the likelihood to stop the EM algorithm. This value divided by 10 is also the desired precision of each parameter estimate. |
[in] | smooth_factor | The factor to the penality term. |
[in] | patterns | A matrix(patterns x options) of binary responses. |
[in] | counts | A vector(patterns) with the count of each pattern. If NULL the counts are assumed to be all 1. |
[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. |
[in] | items_pos | A vector(items) with the position of the first option of each item in patterns (and probs). |
[in] | nbr_options | A vector(items) with the number of option of each item in patterns (and probs). |
[in,out] | probs | A matrix(options 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. |
[in] | ignore | A vector(items) of ignore flag. |
[out] | nbr_notconverge | The number of items that didn't converged. |
[out] | notconverge | A vector(items) of flag set for the items that didn't converged. |
[in] | adjust_weights | Controls whether adjust the quadrature weights after each iteration. |
int set_ignore_mc | ( | gsl_matrix_int * | patterns, |
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_matrix * | probs, | ||
gsl_vector * | thresholds, | ||
gsl_vector_int * | ignore | ||
) |
Check for degenerate multiple choice items.
For each items, check if a option is all success, and if so enable the ignore flag and set the prob accordingly.
[in] | patterns | A matrix (patterns x options) of binary responses. |
[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 patterns. |
[out] | probs | A matrix (options x classes) of option response functions. |
[out] | thresholds | A vector(options) with the threshold parameters of each logit. |
[out] | ignore | A vector (items) of flag. |
void nadaraya_watson_mc | ( | double | bandwidth, |
gsl_matrix_int * | patterns, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector * | options_weights, | ||
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).
[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 options) of binary response. |
[in] | items_pos | A vector(items) with the position of the first option of each item in patterns (and probs). |
[in] | nbr_options | A vector(items) with the number of option of each item in patterns (and probs). |
[in] | options_weights | A vector(options) of weights to compute the score. |
[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(options x classes) with the estimated response functions. |
[out] | probs_stddev | matrix(options x classes) with the standard error. |
void probs_2plm_mc | ( | gsl_vector * | slopes, |
gsl_vector * | thresholds, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector * | quad_points, | ||
gsl_matrix * | probs | ||
) |
Compute the response functions for a multivariate logistic model.
[in] | slopes | A vector(options) with the slope parameters of each option. |
[in] | thresholds | A vector(options) with the threshold parameters of each option. |
[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 patterns. |
[in] | quad_points | A vector(classes) with the middle points of each quadrature class. |
[out] | probs | A matrix(options x classes) with the response functions. |
int mmle_2plm_mc | ( | int | max_em_iter, |
int | max_nr_iter, | ||
double | prec, | ||
gsl_matrix_int * | patterns, | ||
gsl_vector * | counts, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector * | thresholds, | ||
gsl_vector * | thresh_stddev, | ||
gsl_vector * | slopes, | ||
gsl_vector * | slopes_stddev, | ||
gsl_vector_int * | ignore, | ||
int * | nbr_notconverge, | ||
gsl_vector_int * | notconverge, | ||
int | adjust_weights | ||
) |
Estimate the options response functions by MMLE (Maximum Marginal Likelihood).
[in] | max_em_iter | The maximum number of EM iterations. At least 20 iteration are made. |
[in] | max_nr_iter | The maximum number of Newton iterations performed for each item at each EM iteration. |
[in] | prec | The relative change in the likelihood to stop the EM algorithm. This value divided by 10 is also the desired precision of each parameter estimate. |
[in] | patterns | A matrix(patterns x options) of binary responses. |
[in] | counts | A vector(patterns) with the count of each pattern. If NULL the counts are assumed to be all 1. |
[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. |
[in] | items_pos | A vector(items) with the position of the first option of each item in patterns (and probs). |
[in] | nbr_options | A vector(items) with the number of option of each item in patterns (and probs). |
[in,out] | thresholds | A vector(options) with the estimated thresholds. They should be initialize first. |
[out] | thresh_stddev | A vector(options) with the estimated thresholds standard deviation. |
[in,out] | slopes | A vector(options) with the estimated slopes. They should be initialize first. |
[out] | slopes_stddev | A vector(options) with the estimated slopes standard deviation. |
[in] | ignore | A vector(items) of ignore flag. |
[out] | nbr_notconverge | The number of items that didn't converged. |
[out] | notconverge | A vector(items) of flag set for the items that didn't converged. |
[in] | adjust_weights | Controls whether adjust the quadrature weights after each iteration. |
void probs_2plm_grad | ( | gsl_vector * | slopes, |
gsl_vector * | thresholds, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector * | quad_points, | ||
gsl_matrix * | probs, | ||
gsl_matrix * | bounds | ||
) |
Compute the response functions for a graded model.
[in] | slopes | A vector(items) with the slope parameters of each item. |
[in] | thresholds | A vector(options) with the "modal" threshold parameters of each option. |
[in] | nbr_options | A vector(items) with the number of option of each items. Optional, assumed there is only one item. |
[in] | items_pos | A vector(items) with the position of the first option of each item in patterns. Optional, assumed threre is only one item. |
[in] | quad_points | A vector(classes) with the middle points of each quadrature class. |
[out] | probs | A matrix(options x classes) with the response functions. |
[out] | bounds | A matrix((options+items) x classes) with the boundary functions including the 0-th and last. Optional. |
int mmle_2plm_grad | ( | int | max_em_iter, |
int | max_nr_iter, | ||
double | prec, | ||
gsl_matrix_int * | patterns, | ||
gsl_vector * | counts, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector * | thresholds, | ||
gsl_vector * | thresh_stddev, | ||
gsl_vector * | slopes, | ||
gsl_vector * | slopes_stddev, | ||
gsl_vector_int * | ignore, | ||
int * | nbr_notconverge, | ||
gsl_vector_int * | notconverge, | ||
int | adjust_weights | ||
) |
Estimate the options response functions by MMLE (Maximum Marginal Likelihood).
[in] | max_em_iter | The maximum number of EM iterations. At least 20 iteration are made. |
[in] | max_nr_iter | The maximum number of Newton iterations performed for each item at each EM iteration. |
[in] | prec | The relative change in the likelihood to stop the EM algorithm. This value divided by 10 is also the desired precision of each parameter estimate. |
[in] | patterns | A matrix(patterns x options) of binary responses. |
[in] | counts | A vector(patterns) with the count of each pattern. If NULL the counts are assumed to be all 1. |
[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. |
[in] | items_pos | A vector(items) with the position of the first option of each item in patterns (and probs). |
[in] | nbr_options | A vector(items) with the number of option of each item in patterns (and probs). |
[in,out] | thresholds | A vector(options) with the estimated "modal" thresholds. They should be initialize first. |
[out] | thresh_stddev | A vector(options) with the estimated thresholds standard deviation. |
[in,out] | slopes | A vector(items) with the estimated slopes. They should be initialize first. |
[out] | slopes_stddev | A vector(items) with the estimated slopes standard deviation. |
[in] | ignore | A vector(items) of ignore flag. |
[out] | nbr_notconverge | The number of items that didn't converged. |
[out] | notconverge | A vector(items) of flag set for the items that didn't converged. |
[in] | adjust_weights | Controls whether adjust the quadrature weights after each iteration. |
void icc_from_probs | ( | gsl_matrix * | probs, |
gsl_matrix * | probs_stddev, | ||
gsl_vector * | options_weights, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_matrix * | iccs, | ||
gsl_matrix * | iccs_stddev | ||
) |
Compute the items' characteristic curves from the options' characteristic curves.
[in] | probs | A matrix (options x classes) of options' characteristic curves. |
[in] | probs_stddev | A matrix (options x classes) of occ standard error. |
[in] | options_weights | A vector (options) of options' weights. |
[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. |
[out] | iccs | A matrix (items+1 x classes) of items' characteristic curves and the test characteristic curve. |
[out] | iccs_stddev | A matrix (items+1 x classes) of icc standard error. |
void info_from_probs | ( | gsl_matrix * | probs, |
gsl_vector * | quad_points, | ||
gsl_matrix * | infos, | ||
gsl_vector * | test_info | ||
) |
Compute the items' information curves from the response functions.
[in] | probs | A matrix (items x classes) of response functions. |
[in] | quad_points | A vector(classes) with the middle points of each class. |
[out] | infos | A matrix (items x classes) of items' information curves. |
[out] | test_info | A vector (classes) with test information curve. |
void info_from_probs_mc | ( | gsl_matrix * | probs, |
gsl_vector * | quad_points, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_matrix * | options_infos, | ||
gsl_matrix * | infos, | ||
gsl_vector * | test_info | ||
) |
Compute the options' information curves from the response functions for a multivariate model.
[in] | probs | A matrix (options x classes) of response functions. |
[in] | quad_points | A vector(classes) with the middle points of each class. |
[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. |
[out] | options_infos | A matrix (options x classes) of options' information curves. |
[out] | infos | A matrix (items x classes) of items' information curves. |
[out] | test_info | A vector (classes) with test information curve. |
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.
[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. |
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.
[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. |
void classical_statistics | ( | gsl_matrix_int * | patterns, |
gsl_vector * | items_mean, | ||
gsl_vector * | items_sd, | ||
gsl_vector * | items_corr, | ||
gsl_vector * | items_bis_corr, | ||
gsl_vector_int * | items_nbr, | ||
gsl_vector * | subjects_score, | ||
gsl_vector_int * | subjects_nbr, | ||
int * | nbr, | ||
double * | mean, | ||
double * | sd, | ||
double * | alpha, | ||
gsl_matrix * | pairs_corr | ||
) |
Compute the classical test theory statistics.
[in] | patterns | A matrix(subjects x items) with the binary patterns. |
[out] | items_mean | A vector(items) with the means of each items. |
[out] | items_sd | A vector(items) with the sd of each items. |
[out] | items_corr | A vector(items) with the correlations between each items and the score of each subject without the item. |
[out] | items_bis_corr | A vector(items) with the biserial correlations between each items and the score of each subject without the item. |
[out] | items_nbr | A vector(items) with the number of non missing response for each items. |
[out] | subjects_score | A vector(subjects) with the scores of each subjects. |
[out] | subjects_nbr | A vector(subjects) with the number of non missing response of each subjects. |
[out] | nbr | The total number of non missing response. |
[out] | mean | The mean score. |
[out] | sd | The score sd. |
[out] | alpha | The fiability coefficient alpha. |
[out] | pairs_corr | A matrix(items x items) of correlation for each pair of items |
void classical_statistics_mc | ( | gsl_matrix_int * | patterns, |
gsl_vector * | options_weights, | ||
gsl_vector_int * | items_pos, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector * | items_mean, | ||
gsl_vector * | items_sd, | ||
gsl_vector * | items_corr, | ||
gsl_vector * | items_poly_corr, | ||
gsl_vector_int * | items_nbr, | ||
gsl_vector * | subjects_score, | ||
gsl_vector_int * | subjects_nbr, | ||
int * | nbr, | ||
double * | mean, | ||
double * | sd, | ||
double * | alpha, | ||
gsl_matrix * | pairs_corr | ||
) |
Compute the classical test theory statistics.
[in] | patterns | A matrix(subjects x items) with the multiple choice patterns. |
[in] | options_weights | A vector(options) of weights to compute the score. |
[in] | items_pos | A vector(items) with the position of the first option of each item in patterns (and probs). |
[in] | nbr_options | A vector(items) with the number of option of each item in patterns (and probs). |
[out] | items_mean | A vector(items) with the means of each items. |
[out] | items_sd | A vector(items) with the sd of each items. |
[out] | items_corr | A vector(items) with the correlations between each items and the score of each subject without the item. |
[out] | items_poly_corr | A vector(items) with the polyserial correlations between each items and the score of each subject without the item. |
[out] | items_nbr | A vector(items) with the number of non missing response for each items. |
[out] | subjects_score | A vector(subjects) with the scores of each subjects. |
[out] | subjects_nbr | A vector(subjects) with the number of non missing response of each subjects. |
[out] | nbr | The total number of non missing response. |
[out] | mean | The mean score. |
[out] | sd | The score sd. |
[out] | alpha | The fiability coefficient alpha. |
[out] | pairs_corr | A matrix(items x items) of correlation for each pair of items |
void llk_ratio_ld_test | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_vector * | quad_weights, | ||
gsl_matrix * | chi2, | ||
gsl_matrix_int * | df, | ||
gsl_matrix * | p_value | ||
) |
Compute the log likelihood ratio statistics of each items pairs for local dependance.
[in] | patterns | A matrix(subjects x items) with binary response. |
[in] | probs | A matrix(items x classes) with response functions. |
[in] | quad_weights | A vector(classes) with the normal weights of each class. |
[out] | chi2 | A matrix(items x items) with the statistics of each items pairs. |
[out] | df | A vector(items x items) with the degrees of freedom. |
[out] | p_value | A matrix(items x items) with the p-values of each items pairs. |
void llk_ratio_ld_test_mc | ( | gsl_matrix_int * | patterns, |
gsl_matrix * | probs, | ||
gsl_vector * | quad_weights, | ||
gsl_vector_int * | nbr_options, | ||
gsl_vector_int * | items_pos, | ||
gsl_matrix * | chi2, | ||
gsl_matrix_int * | df, | ||
gsl_matrix * | p_value | ||
) |
Compute the log likelihood ratio statistics of each multiple choice items pairs for local dependance.
[in] | patterns | A matrix(subjects x items) with the responses. |
[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] | quad_weights | A vector(classes) with the normal weights of each class. |
[out] | chi2 | A matrix(items x items) with the statistics of each items pairs. |
[out] | df | A vector(items x items) with the degrees of freedom. |
[out] | p_value | A matrix(items x items) with the p-values of each items pairs. |
void adjust_quad_weights | ( | double | nbr_subject, |
gsl_vector * | quad_sizes, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | quad_weights | ||
) |
Recompute the quadrature weights based on the observations.
[in] | nbr_subject | the number of subjects. |
[in] | quad_sizes | A vector(classes) with the expected number of subjects in the class. |
[in,out] | quad_points | A vector(classes) with the middle points of each class. |
[out] | quad_weights | A vector(classes) with the prior weights of each quadrature class. |
int wmle_abilities | ( | int | max_iter, |
double | prec, | ||
gsl_matrix * | like, | ||
gsl_vector * | info, | ||
gsl_vector * | quad_points, | ||
gsl_vector * | abilities, | ||
gsl_vector * | abilities_stddev | ||
) |
Compute the WMLE of the abilities.
[in] | max_iter | The maximum number of Newton iterations performed for each pattern. |
[in] | prec | The desired precision of each parameter estimate. |
[in] | like | A matrix (patterns x classes) of likelihood functions. |
[in] | info | A vecor (classes) with the test information function. |
[in] | quad_points | A vector(classes) with the middle points of each class. |
[out] | abilities | A vector(patterns) with the estimated abilities. |
[out] | abilities_stddev | A vector(items) with the standard errors of the estimated abilities. |
double polyserial_factor | ( | gsl_vector_int * | patterns, |
int | nbr_option, | ||
int | offset, | ||
gsl_vector * | options_weights | ||
) |
Compute the polyserial correlation factor to be multiplied to the point-biserial (pearson) correlation.
[in] | patterns | A vector(subjects) with the responses. |
[in] | nbr_option | The number of option.. |
[in] | offset | The value of the forst option. |
[in] | options_weights | The weights of each option. |
If there is no weights or the weights are not strictly increasing or there is only two options, then the biserial correlation factor is calculated (i.e. the response are corrected with the option having the biggest weight.
const char* libirt_version |
The version of the library.
int libirt_verbose |
Control the verbosity level.
By default it is 0 (silent).
Generated on Sun Jan 26 2014 15:27:27 for libirt by Doxygen. |