help forfrm-------------------------------------------------------------------------------

Title

frm-- Estimation of one-part and two-part fractional regression models

Syntax

frmdepvarindepvars[if] [in] [,options]

optionsDescription -------------------------------------------------------------------------model(mod_type)specify the fractional regression model to be estimatedlinkbin(binary_linkname)specify the link function for the binary component of a two-part regression modellinkfrac(frac_linkname)specify the link function for a one-part fractional regression model or the fractional component of a two-part fractional regression modelcluster(clustvar)specify that the standard errors allow for intragroup correlationinflation(2P_indicator)specify which of the extreme values of 0 or 1 is the relevant boundary value for defining two-part fractional regression modelsy2P(newvar)save the predicted values of the dependent variable of a two-part fractional regression modelmaximize_optionscontrol the maximization process -------------------------------------------------------------------------

Description

frmestimates 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).frmuses standard Stata commands to perform the estimations (glm,logit,probitorcloglog). Therefore,frmis essentially a convenience command, allowing estimation of several alternative fractional regression models using the same command. In addition,frmprovides 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.clustvarspecifies 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 namenewvar. This option can be used only with optionmodel(2P).

maximize_options:technique(algorithm_spec),iterate(#),trace,difficult,gradient,showstep,hessian,showtolerance,tolerance(#),ltolerance(#),nrtolerance(#),from(init_specs); see[R] maximizefor details.

ExamplesSetup - data used in Ramalho, Ramalho and Henriques (2010)

. use http://evunix.uevora.pt/~jsr/stata/JPA-2010.dta

frmestimation of a logit fractional regression model. frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRAL BAIXO

frmestimation of the binary logit component of the two-part fractional regression model withSCORE=1 as the relevant boundary value. frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRALBAIXO, model(2Pbin) inf(1)

frmestimation of the fractional component of the two-part fractional regression model withSCORE=1 as the relevant boundary value and using a probit link function. frm SCORE LANDLORD LIVESTOCK CROP SIZE SUBSIDIES ALTO CENTRALBAIXO, model(2Pfrac) linkf(probit) inf(1)

frmestimation of both components of a two-part fractional regression model withSCORE=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 CENTRALBAIXO, model(2P) linkb(cloglog) inf(1)

Saved resultsThe results saved by

frmdepends onmodel(mod_type), as follows:

model(2P): no results are saved.

model(1P): in addition to the usual results saved afterglm, withe(cmd)ande(cmdline)changed as appropriate,frmalso saves the following:Scalars

e(R2)R squaredMacros

e(model)model typee(linkfrac)fractional link function

model(2Pbin): in addition to the usual results saved afterlogit,probit,cloglogorglm(loglog link), withe(cmd)ande(cmdline)changed as appropriate,frmalso saves the following:Scalars

e(inflation)boundary value defining two-part modelse(R2)R squaredMacros

e(model)model typee(linkbin)binary link function

model(2Pfrac): in addition to the usual results saved afterglm, withe(cmd)ande(cmdline)changed as appropriate,frmalso saves the following:Scalars

e(inflation)boundary value defining two-part modelse(R2)R squaredMacros

e(model)model typee(linkfrac)fractional link function

AuthorJoaquim J.S. Ramalho Department of Economics University of Evora Portugal jsr@uevora.pt

Remarks

frmis 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.

ReferenceRamalho, 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 seeOnline: help for frm_reset, frm_ptest and frm_pe

Manual:

[R] glm,[R] logit,[R] probit,[R] cloglog