/* NPEST.G: procedure to estimate choice probabilities via non-parametric methods Specialized for use in estimating conditional choice probabilities to implement the semiparametric two step estimator in the Prisoner's Dilemma example (each choice probability, the probability of confessing or not confessing) is a function of two variables (x_a,x_b) each restricted to the [0,1] interval). y: n x 1 vector of 0's and 1's representing the dependent variable in the choice problem, viewed as a nonparametric regression where the conditional choice probability, P(y|x_a,x_b), is treated as the unknown regression function x_a,x_b nx1 vectors containing the observed characteristics of players A and B in the prisoners dilemma game. npemeth a string specifying the type of nonparametric estimation method to use (see setup.gpr for the options). John Rust, University of Maryland, October, 2006 */ proc (1)=npest(y,x_a,x_b,npemeth); if (npemeth $== "kernel"); retp(mvks(x_a~x_b,y,x_a~x_b)); elseif (npemeth $== "llr"); retp(llr(x_a~x_b,y,x_a~x_b)); elseif (npemeth $== "series"); retp(series(x_a~x_b,y,x_a~x_b)); endif; endp;