probit_likelihood_function is the user-defined function from the file /home/rafael/octave/probit/probit_likelihood_function.m - Function File: [L, P, Q, Y, THRESHOLD, SLOPE, CHISQ] = probit_likelihood_function (X, CONTROL_VAR, BATCH_SIZE, SUCCESS_COUNT) This function is primarily a helper function for the maximum likelihood optimization in the `probit_analysis' function, but it can also be used stand alone. The input argument X is a vector of length `n', whose first `n - 1' elements are the thresholds and the last one is the slope for the fitted normal cumulative functions. Input arguments CONTROL_VAR, BATCH_SIZE, and SUCCESS_COUNT have the same meaning as in `probit_analysis'. Output arguments: `L' Negated log likelihood computed using the fitted probabilities and the variables BATCH_SIZE, SUCCESS_COUNT, which determine binomial distributions. (The likelohood is negated such that this function can be used with `fmins'. `P' Cell vector containing the fitted probability values for each experimental condition. Varies between 0 and 1. `Q' Simply `Q{i} = 1 - P{i}'. `Y' Cell vector containing the values of `SLOPE(i) * (CONTROL_VAR{i} - THRESHOLD)'. `THRESHOLD' The first `n - 1' elements of X. `SLOPE' The last element of X. `CHISQ' The test statistic chi square for the fitted curves. This function may be useful to compute values of P for plotting the fitted curves. In this case, drop BATCH_SIZE and SUCCESS_COUNT from the input argument list, drop CHISQ from the output argument list, and use a fine-grained CONTROL_VAR. CAVEAT: Since this funcion is primarily intended for use through fmins from `probit_analysis', no input argument checks are realized, for the sake of efficiency. See also: probit_analysis.