Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: New versions of -factext- and -ingap- on SSC

From   Roger Newson <[email protected]>
To   [email protected]
Subject   st: New versions of -factext- and -ingap- on SSC
Date   Wed, 25 Feb 2004 16:27:44 +0000

Dear All

Thanks to Kit Baum, there are now new versions of the -factext- and -ingap- packages vailable for download on SSC. In Stata, type -ssc desc factext- or -ssc desc ingap- to find out more. The -factext- and -ingap- packages are described as below on my website, and are discussed in Newson (2003).

The -factext- package re-creates and processes categorical factors (predictor variables as used by -xi-) in -parmest- output data sets. The new version fixes a bug in the -factmerg- program, which caused it to output missing values to the generated -fvalue()- variable if a categorical input factor had value labels for some values but not for others. -factmerg- now outputs labels if a label exists for the value and formatted values otherwise (like -sdecode-). Also, the -mname()- -mlabel()- and -mvalue()- options can now be string expressions, and do not have to be string variable names. In addition, I have updated the -help- files for -factext-, -factmerg- and -factref-.

The -ingap- package inserts gap observations at defined positions in a data set, containing missing values for existing variables unless the user specifies otherwise. The new version contains a new -grexpression()- option, specifying a string expression to evaluate the -rowlabel()- variable in the gap observations, and a new -neworder()- option, allowing the user to create a new variable containing, in each observation, the order of that observation in the data set (or by-group), once gap observations have been inserted. After execution of -ingap-, the data set in memory is sorted primarily by the by-variables (if specified), and secondarily by the -neworder()- variable (if specified).

Best wishes



Newson R. Confidence intervals and p-values for delivery to the end user. The Stata Journal 2003; 3(3): 245-269.

package factext from

factext: Extract factor values from a label variable created by parmest

The factext package contains three programs, factext, factmerg and factref.
factext is used to extract factors (categorical variables) from a
label variable in an output data set created by the parmest package.
factmerg inputs a list of factors and outputs up to 3 string variables,
containing, in each observation, the name, variable label and value of the
first factor in the list with a nonmissing value in that observation.
factref is used to add observations with reference levels for these
factors, so that the user can include these in plots and/or tables.
The parmest package creates a data set with 1 obs per estimated parameter
and data on the parameter estimates, confidence limits, P-values, and
(optionally) also a variable named label, containing the variable label for
the X-variable corresponding to the parameter. If the X-variable is a dummy
variable created by xi, tabulate or John Hendrickx's desmat package, then the
value of label will be of the form "varname==value", where varname is a
variable name and value is a numeric or string value. factext uses this
information to create new factors (categorical variables) with the specified
varnames and values. These new variables can then be used to produce tables
and/or plots. factext can be used together with the descsave package, also
downloadable from SSC or from this website.

Author: Roger Newson
Distribution-Date: 24february2004
Stata-Version: 7

INSTALLATION FILES (click here to install)
(click here to return to the previous screen)

package ingap from

ingap: Insert gap observations in a data set

ingap inserts gap observations into a list of positions in an existing data
set. All existing variables in the data set will have missing values in the
gap observations, unless the user specifies otherwise. Often, the user
specifies non-missing values in the gap observations for one particular
existing string variable, known as the row label variable. This row label
variable may then be output with a list of other variables to form a
publication-ready table with labelled gap rows, using the listtex package.
Alternatively, the row label variable may be encoded, using the sencode
package, to form a numeric variable with value labels. This numeric variable
can then be plotted on one axis of a graph to define axis labels, including
gap axis labels. The sencode and listtex packages are downloadable from SSC
or from this website.

Author: Roger Newson
Distribution-Date: 24february2004
Stata-Version: 7

INSTALLATION FILES (click here to install)
(click here to return to the previous screen)

Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index