logit regression
[rlogit]=logit(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 'noprint' if the user doesn't want to display the results of the regression
- 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)
* rlogit = a results tlist with
- rlogit('meth') = 'logit'
- rlogit('y') = y data vector
- rlogit('x') = x data matrix
- rlogit('nobs') = # observations
- rlogit('nvar') = # variables
- rlogit('beta') = bhat
- rlogit('yhat') = yhat
- rlogit('resid') = residuals
- rlogit('vcovar') = estimated variance-covariance matrix of beta
- rlogit('tstat') = t-stats
- rlogit('pvalue') = pvalue of the betas
- rlogit('r2mf') = = McFadden pseudo-R²
- rlogit('rsqr') = = Estrella R²
- rlogit('lratio') = LR-ratio test against intercept model
- rlogit('lik') = unrestricted Likelihood
- rlogit('zip') = # of 0's
- rlogit('one) = # of 1's
- rlogit('iter') = # of iterations
- rlogit('crit') = convergence criterion
- rlogit('namey') = name of the y variable
- rlogit('namex') = name of the x variables
- rlogit('prests') = boolean indicating the presence or absence of a time series in the regression
- rlogit('prescte') = %f (for printings)
- rlogit('bounds') = if there is a timeseries in the regression, the bounds of the regression
grade = zeros(32,1); grade([5 10 14 20 22 25:27 29 30 32],1) = 1; gra=reshape(grade,'1a') // psi variable psi = reshape([zeros(18,1) ; ones(14,1)],'1a') tuce = reshape([20 22 24 12 21 17 17 21 25 29 20 23 23 25 26 19 ... 25 19 23 25 22 28 14 26 24 27 17 24 21 23 21 19]','1a') gpa = reshape([2.66 2.89 3.28 2.92 4.00 2.86 2.76 2.87 3.03 3.92 ... 2.63 3.32 3.57 3.26 3.53 2.74 2.75 2.83 3.12 3.16 ... 2.06 3.62 2.89 3.51 3.54 2.83 3.39 2.67 3.65 4.00 ... 3.10 2.39]','1a') bounds() logit('grade','cte','psi','tuce','gpa'); // Example, taken from logit_d, provides the logit regression of vector grade on a constant and the vectors psi, tuce, gpa. logit('grade','cte','psi','tuce','gpa','maxit=200','crit=sqrt(%eps)','noprint'); // Does the same, except that the maximum number of iterations is set to 200 (instead of 100), // the convergence criterion to sqrt(%eps) (instead of 0.000001) // and the results are not displayed on screen. | ![]() | ![]() |