Y is a vector of response (dependent variable) values. Typically, X is a
design matrix of predictor (independent variable) values, with one row
for each value in Y and one column for each coefficient. However, X
may be any array that MODELFUN is prepared to accept. MODELFUN is a
function, specified using @, that accepts two arguments, a coefficient
vector and the array X, and returns a vector of fitted Y values. BETA0
is a vector containing initial values for the coefficients.