*! version 1.0.0 12jun15
help grreg

Title

grreg -- Geometric rate regression

Syntax

grreg depvar [indepvars] [if] [in] [weight]
[, grreg_options]

grreg_options

Model
proportion(#) specifies the proportion; default is 0.5

failure(varname) specifies the failure variable

sigma(varlist) specifies the variables to be included in the scale parameter model; default is constant only

Estimation
reps(#) perform # bootstrap replications; default is reps(20)

link(identity|log) specifies the link function; default is log (rate ratio)

seed(#) set random-number seed to #

tolerance(#) tolerance for the log-likelihood; default is tolerance(1e-10)

maxiter(#) perform maximum of # iterations; default is maxiter(2000)

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

by, statsby, and xi are allowed with
grreg; see prefix.

grreg allow fweights and pweights; see weight.

Description

grreg estimates geometric rate regression models to make inference on conditional geometric rate differences or ratios.
Typical applications are in time-to-event or survival analysis.

Options for grreg

Model

proportion(#) specifies the proportion as number between 0 and 1; numbers larger than 1 are interpreted as percentages. The default value is proportion(.5)

failure(varname) specifies the failure event;
the value 0 indicates censored observations. If failure() is not specified, all observations are assumed to be uncensored.

sigma(varlist) specifies the variables to be included in the scale parameter model. Default is constant only.

Estimation

link(identity|log) specifies the link function. The identity link provides geometric rate differences.
The log link provides geometric rate ratios. The default is log.

reps(#) specifies the number of bootstrap replications for estimating
variance-covariance matrix and standard errors of the regression coefficients.

seed(#) sets the initial value of the random-number seed used by the bootstrap. If seed(#) is specified the bootstrapped estimates are reproducible (see set seed).

tolerance(#) specifies the tolerance for the coefficient vector. When the absolute change in the log-likelihood from
one iteration to the next is less than or equal to tolerance(), the tolerance() convergence criterion is satisfied.
tolerance(1e-10) is the default.

maxiter(#) specifies the maximum number of iterations. When the number of iterations equals maxiter(), the optimizer stops,
displays an "x" and presents the current results. maxiter(2000) is the default.

Reporting

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

Examples

Use the cancer trial dataset

sysuse cancer, clear

Estimate geometric rate ratios for the first 50% of events by drug assuming no censored observations

xi: grreg studytime i.drug

Estimate geometric rate ratios for the first 50% of events by drug with censored observations

xi: grreg studytime i.drug, fail(died)

Estimate geometric rate differences for the first 50% of events by drug with censored observations

xi: grreg studytime i.drug, fail(died) link(identity)

Estimate geometric rate in drug groups 2 and 3

lincom _cons + _Idrug_2

lincom _cons + _Idrug_3

Age-adjusted geometric rates

xi: grreg studytime i.drug age, p(.5) fail(died)

Authors

Matteo Bottai

Unit of Biostatistics

Institute of Environmental Medicine, Karolinska Institutet

Stockholm, Sweden

Nicola Orsini

Unit of Nutritional Epidemiology

Unit of Biostatistics

Institute of Environmental Medicine, Karolinska Institutet

Stockholm, Sweden

Saved results

grreg saves the following in e():

Scalars

e(N) number of observations

e(N_fail) number of failures

e(n_q) number of estimated quantiles

e(reps) number of bootstrap replications

Macros

e(cmd) grreg

e(cmdline) command as typed

e(depvar) name of dependent variable

e(eqnames) names of equations

e(qlist) requested quantiles

e(vcetype) title used to label Std. Err.

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

Also see

Manual: [R] qreg

Online: [R] qreg postestimation;

[R] bootstrap