MATLAB哪个版本有mnrfit函数

找到最新的MATLAB了,不知道这个函数具体的用法?回归参数的估计值如何进行评价呢?

我看了下我的matlab 2009的 里面有这个函数
mnrfit

Multinomial logistic regression
Syntax

B = mnrfit(X,Y)
B = mnrfit(X,Y,param1,val1,param2,val2,...)
[B,dev] = mnrfit(...)
[B,dev,stats] = mnrfit(...)
Description

B = mnrfit(X,Y) returns a matrix B of coefficient estimates for a multinomial logistic regression of the responses in Y on the predictors in X. X is an n-by-p matrix of p predictors at each of n observations. Y is an n-by-k matrix, where Y(i,j) is the number of outcomes of the multinomial category j for the predictor combinations given by X(i,:). The sample sizes for each observation are given by the row sums sum(Y,2).

Alternatively, Y can be an n-by-1 column vector of scalar integers from 1 to k indicating the value of the response for each observation, and all sample sizes are taken to be 1.

The result B is a (p+1)-by-(k–1) matrix of estimates, where each column corresponds to the estimated intercept term and predictor coefficients, one for each of the first k–1 multinomial categories. The estimates for the kth category are taken to be zero.

Note mnrfit automatically includes a constant term in all models. Do not enter a column of 1s directly into X.

mnrfit treats NaNs in either X or Y as missing values, and ignores them.

B = mnrfit(X,Y,param1,val1,param2,val2,...) allows you to specify optional parameter name/value pairs to control the model fit. Parameters are:

*

'model' — The type of model to fit; one of the text strings 'nominal' (the default), 'ordinal', or 'hierarchical'
*

'interactions' — Determines whether the model includes an interaction between the multinomial categories and the coefficients. Specify as 'off' to fit a model with a common set of coefficients for the predictor variables, across all multinomial categories. This is often described as parallel regression. Specify as 'on' to fit a model with different coefficients across categories. In all cases, the model has different intercepts across categories. Thus, B is a vector containing k–1+p coefficient estimates when 'interaction' is 'off', and a (p+1)-by-(k–1) matrix when it is 'on'. The default is 'off' for ordinal models, and 'on' for nominal and hierarchical models.
*

'link' — The link function to use for ordinal and hierarchical models. The link function defines the relationship g(μij) = xibj between the mean response for the ith observation in the jth category, μij , and the linear combination of predictors xibj. Specify the link parameter value as one of the text strings 'logit'(the default), 'probit', 'comploglog', or 'loglog'. You may not specify the 'link' parameter for nominal models; these always use a multivariate logistic link.
*

'estdisp' — Specify as 'on' to estimate a dispersion parameter for the multinomial distribution in computing standard errors, or 'off' (the default) to use the theoretical dispersion value of 1.

[B,dev] = mnrfit(...) returns the deviance of the fit dev.

[B,dev,stats] = mnrfit(...) returns a structure stats that contains the following fields:

*

dfe — Degrees of freedom for error
*

s — Theoretical or estimated dispersion parameter
*

sfit — Estimated dispersion parameter
*

se — Standard errors of coefficient estimates B
*

coeffcorr — Estimated correlation matrix for B
*

covb — Estimated covariance matrix for B
*

t — t statistics for B
*

p — p-values for B
*

resid — Residuals
*

residp — Pearson residuals
*

residd — Deviance residuals

References

[1] McCullagh, P., and J. A. Nelder. Generalized Linear Models. New York: Chapman & Hall, 1990.
温馨提示:答案为网友推荐,仅供参考