Top |
MODEL | binary_logit () |
MODEL | binary_probit () |
MODEL | ordered_logit () |
MODEL | ordered_probit () |
MODEL | multinomial_logit () |
MODEL | biprobit_model () |
MODEL | reprobit_model () |
MODEL | logistic_model () |
MODEL | interval_model () |
MODEL | tobit_model () |
MODEL | duration_model () |
MODEL | count_model () |
MODEL | heckit_model () |
int | fishers_exact_test () |
double | ordered_model_prediction () |
int | logistic_ymax_lmax () |
gretl_matrix * | mn_logit_probabilities () |
gretl_matrix * | ordered_probabilities () |
double | mn_logit_prediction () |
void | binary_model_hatvars () |
Covers logit (binary, ordered or multinomial), probit (binary or ordered), logistic, tobit, interval regression, models for count data and for duration data, and the heckit sample-selection model. Plus a few utility functions.
MODEL binary_logit (const int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Computes estimates of the logit model specified by list
,
using Newton-Raphson.
list |
binary dependent variable plus list of regressors. |
|
dset |
dataset struct. |
|
opt |
if includes OPT_R form robust (QML) estimates of standard errors and covariance matrix; if OPT_P arrange for printing of p-values, not slopes at mean; if OPT_A treat as an auxiliary regression. |
|
prn |
printing struct in case additional information is
wanted (in which case add OPT_V to |
MODEL binary_probit (const int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Computes estimates of the probit model specified by list
,
using Newton-Raphson.
list |
binary dependent variable plus list of regressors. |
|
dset |
dataset struct. |
|
opt |
if includes OPT_R form robust (QML) estimates of standard errors and covariance matrix; if OPT_P arrange for printing of p-values, not slopes at mean; if OPT_A treat as an auxiliary regression. |
|
prn |
printing struct in case additional information is
wanted (in which case add OPT_V to |
MODEL ordered_logit (int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Computes ML estimates of the ordered logit model specified by list
.
MODEL ordered_probit (int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Computes ML estimates of the ordered probit model specified by list
.
MODEL multinomial_logit (int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Computes ML estimates of the multinomial model specified by list
.
MODEL biprobit_model (int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Computes estimates of the bivariate probit model specified by list
,
using maximum likelihood via Newton-Raphson.
list |
binary dependent variable 1, binary dependent variable 2,
list of regressors for y1. If |
|
dset |
dataset struct. |
|
opt |
can contain OPT_Q for quiet operation, OPT_V for verbose operation, OPT_R for robust covariance matrix, OPT_G for covariance matrix based on Outer Product of Gradient. |
|
prn |
printing struct. |
MODEL reprobit_model (const int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Produce random-effects probit estimates of the model given in list
.
MODEL logistic_model (const int *list
,double lmax
,DATASET *dset
,gretlopt opt
);
Estimate the model given in list
using the logistic transformation
of the dependent variable.
list |
dependent variable plus list of regressors. |
|
lmax |
value for the asymptote of the logistic curve, or
|
|
dset |
pointer to dataset. |
|
opt |
option flags. |
MODEL interval_model (int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
MODEL tobit_model (const int *list
,double llim
,double rlim
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Produce Tobit estimates of the model given in list
.
list |
dependent variable plus list of regressors. |
|
llim |
left bound on dependent variable; use NADBL for no left-censoring. |
|
rlim |
right bound on dependent variable; use NADBL for no right-censoring. |
|
dset |
dataset struct. |
|
opt |
may include OPT_V for verbose operation, OPT_R for robust (QML) standard errors. |
|
prn |
printing struct for iteration info (or NULL if this is not wanted). |
MODEL duration_model (const int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Estimate the duration model given in list
using ML.
MODEL count_model (const int *list
,int ci
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Estimate the count data model given in list
using ML.
MODEL heckit_model (const int *list
,DATASET *dset
,gretlopt opt
,PRN *prn
);
Produce Heckit estimates of the model given in list
. The list must
include a separator to divide the main equation from the selection
equation.
int fishers_exact_test (const Xtab *tab
,PRN *prn
);
Computes and prints to prn
the p-value for Fisher's Exact Test for
association between the two variables represented in tab
.
double ordered_model_prediction (const MODEL *pmod
,double Xb
,int ymin
);
int logistic_ymax_lmax (const double *y
,const DATASET *dset
,double *ymax
,double *lmax
);
Checks that the non-missing values of y
are all positive,
and if so writes the maximum value of y
to ymax
. The
value written to lmax
is 1 if max(y) < 1, else 100
if max(y) < 100, else 1.1 * max(y).
gretl_matrix * mn_logit_probabilities (const MODEL *pmod
,int t1
,int t2
,const DATASET *dset
,int *err
);
Computes the estimated probabilities of the outcomes for a multinomial logit model. The returned matrix is n x m, where n is the number of observations in the sample range over which the model was estimated and m is the number of distinct outcomes. Each element represents the conditional probability of outcome j given the values of the regressors at observation i.
If any of the regressor values are missing at a given observation the probability is set to NaN; provided the regressor information is complete we compute the outcome probabilities even if the actual outcome is missing.
gretl_matrix * ordered_probabilities (const MODEL *pmod
,const double *zhat
,int t1
,int t2
,const DATASET *dset
,int *err
);
double mn_logit_prediction (const gretl_matrix *Xt
,const double *b
,const gretl_matrix *yvals
);
void binary_model_hatvars (MODEL *pmod
,const gretl_matrix *ndx
,const int *y
,gretlopt opt
);