multivariate logit regression
[res]=multilogit(namey,arg1,...,argn)
* namey = a time series, a real (nx1) vector or a string equal to the name of a time series or a (nx1) real vector between quotes
* argi = an argument which can be:
- a time series
- a real (nx1) vector
- a real (nxk) matrix
- a string equal to the name of a time series or a (nxk) real vector or matrix between quotes
- a list of such elements
- the string 'maxit=xx' if the user wants to set the maximum # of iterations to xx (default=100)
- the string 'tol=xx' if the user wants to set the convergence criterion to xx (default=1e-6)
- the string 'noprint' if the user doesn't want to display the results of the regression
- the string 'dropna' if the user wants to use in the regression all dates with no NA value in any variable (the main use of this option should be when dealing with daily ts)
* res = a results tlist with
- res('meth') = 'multilogit'
- res('beta') = (nvar x ncat) matrix of bet coefficients:
[bet_1 bet_2 ... bet_ncat] under the normalization bet_0 = 0
- res('coeff') = (nvar*ncat x 1) vector of beta coefficients:
[beta_1 ; beta_2 ; ... ; beta_ncat] under
normalization beta_0 = 0
- res('covb') = (nvar*ncat x nvar*ncat) covariance matrix of coefficients
- res('tstat') = (nvar*ncat x 1) vector of t-statistics
- res('pvalue') = (nvar*ncat x 1) vector of corresponding p-values
- res('y') = (nobs x ncat+1) matrix of data
- res('yhat') = (nobs x ncat+1) matrix of fitted probabilities:
[P_0 P_1 ... P_ncat]
where P_j = [P_1j ; P_2j ; ... ; P_nobsj]
- res('llike') = unrestricted log likelihood
- res('lratio') = LR test statistic against intercept-only model (all bets=0), distributed chi-squared with (nvar-1)*ncat degrees of freedom
- res('nobs') = number of observations
- res('nvar') = number of variables
- res('ncat') = number of categories of dependent variable (including the reference category j = 0)
- res('count') = vector of counts of each value taken by y, i.e., couunt = [#y=0 #y=1 ... #y=ncat]
- res('r2mf') = McFadden pseudo-R^2
- res('rsqr') = Estrella pseudo-R^2
- res('namey') = name of the y variable
- res('namex') = name of the x variables
- res('prests') = boolean indicating the presence or absence of a time series in the regression
- res('prescte') = %f (for printings)
- res('bounds') = if there is a timeseries in the regression, the bounds of the regression
- res('dropna') = boolean indicating if NAs have been dropped
- res('nonna') = vector indicating position of non-NAs