Function that calculates an object with the fitted multinomial logistic regression for a nominal variable. It compares with the null model, so that we will be able to compare which model fits better the variable.
RidgeMultinomialLogisticRegression(formula, data, penalization = 0.2,
cte = TRUE, tol = 1e-04, maxiter = 200, showIter = FALSE)
An object that has the following components:
Matrix with the fitted probabilities
Covariance matrix among the estimates
Indicator matrix for the dependent variable
Estimated coefficients for the multinomial logistic regression
Standard error of the estimates
Logarithm of the likelihood
Deviance of the model
Akaike information criterion indicator
Bayesian information criterion indicator
Deviance of the null model
Difference between the two deviance values
Degrees of freedom
p-value asociated to the chi-squared estimate
Cox and Snell pseudo R squared
Nagelkerke pseudo R squared
MacFaden pseudo R squared
Cross classification of observed and predicted responses
Percentage of correct classifications
The usual formula notation (or the dependent variable)
The dataframe used by the formula. (or a matrix with the independent variables).
Penalization used in the diagonal matrix to avoid singularities.
Should the model have a constant?
Value to stop the process of iterations.
Maximum number of iterations.
Should the iteration history be printed?.
Jose Luis Vicente-Villardon
Albert,A. & Anderson,J.A. (1984),On the existence of maximum likelihood estimates in logistic regression models, Biometrika 71(1), 1--10.
Bull, S.B., Mak, C. & Greenwood, C.M. (2002), A modified score function for multinomial logistic regression, Computational Statistics and dada Analysis 39, 57--74.
Firth, D.(1993), Bias reduction of maximum likelihood estimates, Biometrika 80(1), 27--38
Heinze, G. & Schemper, M. (2002), A solution to the problem of separation in logistic regression, Statistics in Medicine 21, 2109--2419
Le Cessie, S. & Van Houwelingen, J. (1992), Ridge estimators in logistic regression, Applied Statistics 41(1), 191--201.
RidgeMultinomialLogisticFit
data(Protein)
y=Protein[[2]]
X=Protein[,c(3,11)]
rmlr = RidgeMultinomialLogisticRegression(y,X,penalization=0.0)
summary(rmlr)
Run the code above in your browser using DataLab