{smcl} {* 2009-01-09}{...} {cmd: help dfbr} {hline} {title:Title} {phang} {cmd:dfbr} {hline 2} Distribution free estimation of heteroskedastic binary response models {p_end} {title:Syntax} {pstd}Sieve nonlinear least squares estimation{p_end} {p 8 17 2} {cmd: dfbr} {depvar} {indepvars} {ifin} [{cmd:,} {opt s:ieve} {opt bas:is(basis_vars)}] {p_end} {pstd}Local nonlinear least squares estimation{p_end} {p 8 17 2} {cmd: dfbr} {depvar} {indepvars} {ifin}{cmd:,} {opt l:ocal} [{opt band:width(#)}] {p_end} {title:Description} {pstd} {cmd:dfbr} implements two semiparametric distribution-free estimators for binary response models with heteroskedasticity: a sieve nonlinear least squares estimator and a local nonlinear least squares estimator. Both estimators and their large sample properties are discussed Khan (2006). {cmd:dfbr} constructs the appropriate nonlinear least squares objective functions and calls Stata's built-in {cmd:nl} command to perform the optimization and report the results. For sieve estimation the user may supply a set of basis variables such as polynomial terms of the independent variables. If no basis elements are provided the dependent variables are used. For the local nonlinear least squares estimator the user may supply a bandwidth or allow {cmd:dfbr} to select it automatically. {p_end} {title:Options} {dlgtab:Sieve nonlinear least squares} {phang} {opt s:ieve} specifies the sieve nonlinear least squares estimator (default).{p_end} {phang}{opt bas:is(basis_vars)} provides a list of basis variables to use in the linear in parameters sieve approximation of the scaling function. If this option is omitted, a linear combination of the regressors is used.{p_end} {dlgtab:Local nonlinear least squares} {phang} {opt l:ocal} specifies the local nonlinear least squares estimator.{p_end} {phang}{opt band:width(#)} specifies the bandwidth. If this option is omitted the default bandwidth {cmd:n^(-1/3)} is used (where {cmd:n} is the sample size). {p_end} {title:Example} {pstd} First we generate a random sample from a simple binary response model with normally distributed regressors and a uniformly distributed error term normalized to have mean 0 and variance 1:{p_end} {p 8 14 2}{cmd:. set obs 1000}{p_end} {p 8 14 2}{cmd:. generate x1 = invnorm(uniform())}{p_end} {p 8 14 2}{cmd:. generate x2 = 1 + invnorm(uniform())}{p_end} {p 8 14 2}{cmd:. generate u = sqrt(12)*uniform() - sqrt(12)/2}{p_end} {p 8 14 2}{cmd:. generate y = 0.5 * x1 + x2 - u > 0}{p_end} {pstd} To estimate the model using sieve nonlinear least squares with second-degree polynomial terms:{p_end} {p 8 14 2}{cmd:. generate x1x2 = x1 * x2}{p_end} {p 8 14 2}{cmd:. generate x1_2 = x1^2}{p_end} {p 8 14 2}{cmd:. generate x2_2 = x2^2}{p_end} {p 8 14 2}{cmd:. dfbr y x1 x2, sieve basis(x1 x2 x1x2 x1_2 x2_2)}{p_end} {pstd} To estimate the model using the local nonlinear least squares estimator with the default bandwidth:{p_end} {p 8 14 2}{cmd:. dfbr y x1 x2, local}{p_end} {pstd} A custom bandwidth such as 0.1 can be chosen using the {opt band:width} option:{p_end} {p 8 14 2}{cmd:. dfbr y x1 x2, local bandwidth(0.1)}{p_end} {title:Notes} {pstd} The estimates reported by {cmd:dfbr} are those obtained by calling {cmd:nl} to optimize the NLLS Probit criterion function corresponding to each estimator. These estimates include both the parameters of interest as well as any nuisance parameters such as coefficients on basis functions for the {bf:sieve} estimator. It is important to note that the standard errors produced by {cmd:dfbr} or direct calls to {cmd:nl} are not valid since the shape of the true objective function differs from that of the Probit criterion function. Approximating the true asymptotic covariance matrices for these estimators is difficult, however, because the estimator is computationally light bootstrap methods are a practical alternative. This is easily done in Stata by calling, for example: {p 8 14 2}{cmd:. bootstrap, reps(100) : dfbr y x1 x2, basis(x1 x2 x1x2 x1_2 x2_2)}{p_end} {title:References} {phang} Blevins, J. and S. Khan. 2008. Distribution Free Estimation of Heteroskedastic Binary Response Models in Stata. Working Paper, Duke University. {phang} Khan, S. 2006. Distribution Free Estimation of Heteroskedastic Binary Response Models Using Probit Criterion Functions. Working Paper, Duke University. {title:Also see} {psee} Manual: {bf:[R] nl} {p_end} {psee} Online: {manhelp nl R} {p_end} {title:Author} Jason Blevins email: {browse "mailto:jrblevin@sdf.lonestar.org":jrblevin@sdf.lonestar.org} web: {browse "http://jblevins.org/":http://jblevins.org/}