[theta beta, dev, dl, d2l, p] = logistic_regression (y, x, print, theta, beta) | Functio File |
Perform ordinal logistic regression.
Suppose y takes values in k ordered categories and let
[theta beta] = logistic_regression (y, x) fits the model logit (gamma_i (x)) = theta_i - beta' * x i = 1, ..., k-1 The number of ordinal categories k, is taken to be the number
of distinct values of Given y only The full form is [theta beta, dev, dl, d2l, gamma] = logistic_regression (y x, print, theta, beta) in which all output arguments and all input arguments except y are optional. Stting print to 1 requests summary information about the fitted model to be displayed. Setting print to 2 requests information about convergence at each iteration. Other values request no information to be displayed. The input arguments theta and beta give initial estimates for theta and beta. The returned value dev holds minus twice the log-likelihood. The returned values dl and d2l are the vector of first and the matrix of second derivatives of the log-likelihood with respect to theta and beta. p holds estimates for the conditional distribution of y given x. |