*! N.Orsini, M. Bottai v1.0.0 23jun2016
help lqreg (SJ12-3: st0231_1)

Title

lqreg -- Logistic quantile regression for bounded outcomes

Syntax

lqreg depvar [indepvars] [if] [in] [weight] [, options]

options

quantiles(numlist) specify quantiles to be estimated; default is quantiles(0.5)

reps(#) perform # bootstrap replications

seed(#) set random-number seed to #

vce([vcetype]) technique used to estimate standard errors

cluster(varlist) specify variables identifying resampling clusters

ymin(#) specify minimum value of depvar

ymax(#) specify maximum value of depvar

generate(varname) save the logistic transformation of depvar

level(#) set confidence level; default is level(95)

nodots suppress display of replication dots

coef report estimated coefficients

by is allowed with lqreg, see prefix.

lqreg allows fweights, iweights, and
pweights; see weight.

weight not allowed together with bootstrap.

After lqreg estimation, you can use
[R] qreg postestimation. For additional features
available after estimation, see
lqreg postestimation.

Description

lqreg estimates logistic quantile regression for bounded outcomes.
It produces the same coefficients as sqreg or qreg for each
quantile of a logistic transformation of depvar.

lqreg estimates the variance-covariance matrix of the coefficients
by using either closed formulas (default, see
[R] qreg) or bootstrap.

Options

quantiles(numlist) specifies the quantiles
to be estimated and should contain numbers between 0 and 1, exclusive.
Numbers greater than 1 are interpreted as percentages. The default,
quantiles(0.5), corresponds to the median.

vce([vcetype], [vceopts])
specifies the type of VCE to compute and the density estimation method to use
in computing the VCE. The default is vce(iid) and computes the VCE under the assumption that the
residuals are independent and identically distributed (i.i.d.).

reps(#) specifies the number of bootstrap
replications to be used to obtain an estimate of the
variance-covariance matrix of the estimators (standard errors).
For example, the default, reps(100), would perform 100 bootstrap
replications.

seed(#) sets the random-number seed. Because bootstrapping is a
random process, this option is important to reproduce the results (see
set seed).

cluster(varlist) specifies the variables identifying
resampling clusters. If cluster() is specified, the sample drawn
during each replication is a bootstrap sample of clusters. cluster()
works only if reps() is also specified.

ymin(#) sets the lower bound of depvar to be used in
the logistic transformation. The default is the minimum value of depvar
minus half of the minimal increment of depvar.

ymax(#) sets the upper bound of depvar to be used in
the logistic transformation. The default is the maximum value of
depvar plus half of the minimal increment of depvar.

generate(varname) creates a new variable containing
the logistic transformation of depvar.

level(#); see
[R] estimation options.

nodots suppresses display of the replication dots when
using bootstrap.

coef causes lqreg to report the estimated coefficients
rather than the odds ratios (exponentiated coefficients). coef may be
specified when the model is fit or may be used later to redisplay results.
coef affects only how results are displayed and not how they are
estimated.

Example

use http://www.imm.ki.se/biostatistics/data/pa_luts, clear

quietly summarize age

generate agec = age - r(mean)

lqreg ipss i.tpac c.agec, q(25 50 75) cformat(%9.2f)

testparm i.tpac , eq(q50)

Saved results

lqreg saves the following in e():

Scalars

e(N) number of observations

e(df_r) residual degrees of freedom

e(ymin) lower bound for depvar

e(ymax) upper bound for depvar

e(n_q) number of quantiles requested

e(q#) the quantiles requested

e(rank) rank of e(V)

e(convcode) 0 if converged; otherwise, return code for why nonconvergence

Macros

e(cmd) lqreg

e(cmdline) command as typed

e(vce) vcetype specified in vce()

e(depvar) name of dependent variable

e(eqnames) names of equations

e(properties) b V

e(predict) program used to implement predict

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

Functions

e(sample) marks estimation sample

Authors

Nicola Orsini

Department of Public Health Sciences, Karolinska Institutet

Stockholm, Sweden

nicola.orsini@ki.se

Matteo Bottai

Unit of Biostatistics

Institute of Environmental Medicine, Karolinska Institutet

Stockholm, Sweden

matteo.bottai@ki.se

Also see

Article: Stata Journal, volume 12, number 3: st0231_1,

Stata Journal, volume 11, number 3: st0231

Manual: [R] qreg

Help: [R] qreg,
[R] qreg postestimation,
lqreg postestimation (if installed),
[R] bootstrap