Title
frm -- Estimation of one-part and two-part fractional regression models
Syntax
frm depvar indepvars [if] [in] [, options]
options Description ------------------------------------------------------------------------- model(mod_type) specify the fractional regression model to be estimated linkbin(binary_linkname) specify the link function for the binary component of a two-part regression model linkfrac(frac_linkname) specify the link function for a one-part fractional regression model or the fractional component of a two-part fractional regression model cluster(clustvar) specify that the standard errors allow for intragroup correlation inflation(2P_indicator) specify which of the extreme values of 0 or 1 is the relevant boundary value for defining two-part fractional regression models y2P(newvar) save the predicted values of the dependent variable of a two-part fractional regression model maximize_options control the maximization process -------------------------------------------------------------------------
Description
frm estimates one- and two-part fractional regression models; see Ramalho, Ramalho and Murteira (2011) for details on those models. The one-part models and the fractional component of two-part models are estimated by Bernoulli-based quasi-maximum likelihood (using by default a robust estimator of the covariance matrix), while the binary component of two-part models is estimated by maximum likelihood (using by default a standard - oim - estimator of the covariance matrix). frm uses standard Stata commands to perform the estimations (glm, logit, probit or cloglog). Therefore, frm is essentially a convenience command, allowing estimation of several alternative fractional regression models using the same command. In addition, frm provides an R-squared measure for all models (calculated as the square of the correlation coefficient between the actual and fitted values of the dependent variable), calculates the fitted values of the dependent variable in two-part models and stores the information needed to implement some very useful commands for fractional regression models: frm_reset (RESET test), frm_ptest (P test) and frm_pe (partial effects).
Options
model(mod_type) specifies which kind of fractional regression model is to be estimated; the following models are allowed:
model(1P) specifies to estimate a one-part fractional regression model.
model(2Pbin) specifies to estimate the binary component of a two-part fractional regression model.
model(2Pfrac) specifies to estimate the fractional component of a two-part fractional regression model.
model(2P) specifies to estimate both components of a two-part fractional regression model.
The default is model(1P).
linkbin(binary_linkname) specifies the link function to use in the binary component of the two-part fractional regression model; the following links are allowed:
linkbin(logit) specifies to use a logit link function.
linkbin(probit) specifies to use a probit link function.
linkbin(loglog) specifies to use a loglog link function.
linkbin(cloglog) specifies to use a cloglog link function.
The default is linkbin(logit).
linkfrac(frac_linkname) specifies the link function to use in a one-part fractional regression model or in the fractional component of the two-part fractional regression model; the following links are allowed:
linkfrac(logit) specifies to use a logit link function.
linkfrac(probit) specifies to use a probit link function.
linkfrac(loglog) specifies to use a loglog link function.
linkfrac(cloglog) specifies to use a cloglog link function.
The default is linkfrac(logit).
cluster(clustvar) specifies that that the standard errors allow for intragroup correlation, relaxing the usual requirement that the observations be independent. That is, the observations are independent across groups (clusters) but not necessarily within groups. clustvar specifies to which group each observation belongs. cluster(clustvar) affects the standard errors and variance-covariance matrix of the estimators but not the estimated coefficients.
inflation(2P_indicator) specifies which of the extreme values of 0 or 1 is the relevant boundary value for defining two-part fractional regression models; the following options are allowed:
inflation(0) specifies that the relevant boundary value is 0.
inflation(1) specifies that the relevant boundary value is 1.
The default is inflation(0).
y2P(newvar) specifies that the fitted values of the dependent variable in two-part fractional regression models is to be saved under the name newvar. This option can be used only with option model(2P).
maximize_options: technique(algorithm_spec), iterate(#), trace, difficult, gradient, showstep, hessian, showtolerance, tolerance(#), ltolerance(#), nrtolerance(#), from(init_specs); see [R] maximize for details.
Examples
Setup - data used in Ramalho, Ramalho and Henriques (2010) . use http://evunix.uevora.pt/~jsr/stata/JPA-2010.dta
frm estimation of a logit fractional regression model . frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRAL BAIXO
frm estimation of the binary logit component of the two-part fractional regression model with SCORE=1 as the relevant boundary value . frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRAL BAIXO, model(2Pbin) inf(1)
frm estimation of the fractional component of the two-part fractional regression model with SCORE=1 as the relevant boundary value and using a probit link function . frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRAL BAIXO, model(2Pfrac) linkf(probit) inf(1)
frm estimation of both components of a two-part fractional regression model with SCORE=1 as the relevant boundary value and using a cloglog binary link function and a logit fractional link function . frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRAL BAIXO, model(2P) linkb(cloglog) inf(1)
Saved results
The results saved by frm depends on model(mod_type), as follows:
model(2P): no results are saved.
model(1P): in addition to the usual results saved after glm, with e(cmd) and e(cmdline) changed as appropriate, frm also saves the following:
Scalars e(R2) R squared
Macros e(model) model type e(linkfrac) fractional link function
model(2Pbin): in addition to the usual results saved after logit, probit, cloglog or glm (loglog link), with e(cmd) and e(cmdline) changed as appropriate, frm also saves the following:
Scalars e(inflation) boundary value defining two-part models e(R2) R squared
Macros e(model) model type e(linkbin) binary link function
model(2Pfrac): in addition to the usual results saved after glm, with e(cmd) and e(cmdline) changed as appropriate, frm also saves the following:
Scalars e(inflation) boundary value defining two-part models e(R2) R squared
Macros e(model) model type e(linkfrac) fractional link function
Author
Joaquim J.S. Ramalho Department of Economics University of Evora Portugal jsr@uevora.pt
Remarks
frm is not an official Stata command. For further help and support, please contact the author. Please notice that this software is provided as is, without warranty of any kind, expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the author be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.
Reference
Ramalho, E.A., J.J.S. Ramalho and J.M.R. Murteira (2011), "Alternative estimating and testing empirical strategies for fractional regression models", Journal of Economic Surveys, 25(1), 19-68.
Ramalho, E.A., J.J.S. Ramalho and P.D. Henriques (2010), "Fractional regression models for second stage DEA efficiency analyses", Journal of Productivity Analysis, 34(3), 239-255.
Also see
Online: help for frm_reset, frm_ptest and frm_pe
Manual: [R] glm, [R] logit, [R] probit, [R] cloglog