Functions
nadaraya_watson_mc.c File Reference

Functions to estimate the option 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_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).

Detailed Description

Functions to estimate the option 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_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).

Parameters
[in]bandwidthThe smoothing parameter, will be multiply by the number of distinct scores to the power of -0.2 to give the bandwidth.
[in]patternsA matrix(patterns x options) of binary response.
[in]items_posA vector(items) with the position of the first option of each item in patterns (and probs).
[in]nbr_optionsA vector(items) with the number of option of each item in patterns (and probs).
[in]options_weightsA vector(options) of weights to compute the score.
[in]quad_pointsA vector(classes) with the middle points of each quadrature class.
[in]quad_weightsA vector(classes) with the prior weights of each quadrature class.
[out]probsA matrix(options x classes) with the estimated response functions.
[out]probs_stddevmatrix(options x classes) with the standard error.
Warning
Do not group the patterns before.
The memory for the response functions should be allocated before.

SourceForge.net Logo Generated on Sun Jan 26 2014 15:27:27 for libirt by Doxygen. Valid HTML 4.01 Transitional