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

st: New -factext-, -factmerg-, -factref- and -harmby- packages on SSC


From   Roger Newson <[email protected]>
To   [email protected]
Subject   st: New -factext-, -factmerg-, -factref- and -harmby- packages on SSC
Date   Fri, 19 Mar 2004 12:48:51 +0000

Dear All

Thanks to Kit Baum, there is a new version of the -factext- package, and new packages -factmerg-, -factref- and -harmby-, downloadable from SSC. In Stata, use the -ssc- command to find out more. The -factext-, -factmerg-, -factref- and -harmby- packages are described as below on my website.

The -factext-, -factmerg- and -factref- packages were previously components one package -factext-, as they tend to be used together, although they have always worked independently of each other and even had separate help files. They are used for generating and handling categorical variables (factors) in output data sets created by -parmest-, -parmby-, -xcontract- and -xcollapse- (also downloadable from SSC). The programs are as brefore, but the help files have been modified slightly. The old -factext- package was split into its components so that the components can evolve independently in future, with the option of making some components obsolete while others get updated to Stata 8, 9 etc.

The -harmby- package is a minor program, used mostly in the processing of outputs from -parmby- (part of the -parmest- package downloadable from SSC). It is sometimes useful if new observations are inserted into a dataset using the official Stata -merge- command and/or the -ingap- package (also downloadable from SSC).

More information about the various packages mentioned above, and how they can be used together to create plots and tables of results, can be found in Newson (2003), which can be downloaded as a pre-publication draft from my website at
http://www.kcl-phs.org.uk/rogernewson/
using either a browser or the Stata -net- command.

Best wishes

Roger

References

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

--------------------------------------------------------------------------------------------
package factext from http://www.kcl-phs.org.uk/rogernewson/stata7
--------------------------------------------------------------------------------------------

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

DESCRIPTION/AUTHOR(S)
factext is used to extract factors (categorical variables) from a
label variable in an output data set created by the parmest package.
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: 18march2004
Stata-Version: 7

INSTALLATION FILES (click here to install)
factext.ado
factext.hlp
--------------------------------------------------------------------------------------------
(click here to return to the previous screen)

--------------------------------------------------------------------------------------------
package factmerg from http://www.kcl-phs.org.uk/rogernewson/stata7
--------------------------------------------------------------------------------------------

TITLE
factmerg: Merge a list of factors to create string variables

DESCRIPTION/AUTHOR(S)
factmerg inputs a list of factors and outputs up to 3 string variables,
containing, in each observation, the name, variable label and value,
respectively, of the first factor in the list with a nonmissing value in
that observation. These string variables can be used in creating row labels
for output tables and/or plots, possibly using the sencode package. The input
factors are usually either created in a parmest or parmby output data set by
using the factext package, or are in a data set created by concatenating
multiple xcontract output data sets using dsconcat. The sencode, parmest,
factext, xcontract and dsconcat packages are downloadable from SSC or from
this website.

Author: Roger Newson
Distribution-Date: 18march2004
Stata-Version: 7

INSTALLATION FILES (click here to install)
factmerg.ado
factmerg.hlp
--------------------------------------------------------------------------------------------
(click here to return to the previous screen)


--------------------------------------------------------------------------------------------
package factref from http://www.kcl-phs.org.uk/rogernewson/stata7
--------------------------------------------------------------------------------------------

TITLE
factref: Insert new observations with reference values for factors

DESCRIPTION/AUTHOR(S)
factref is used with factext, descsave, parmby and parmest. It takes, as
input, a data set created by parmby or parmest, in which categorical
variables (factors) have been created by descsave and factext. These factors
are variables (numeric or string) representing categorical variables in the
fitted model, represented by dummy variables such as those created by xi.
factref adds to that data set a set of additional observations with reference
values for these factors, copied from the omit characteristic for each
factor. For each factor, factref creates one reference observation if there
are non-missing values for the factor and there is no by-variable list, or
one reference observation for each by-group where there are non-missing
values of the factor if there is a by-variable list. After the reference
observations have been added, the user may create a plot or table of
confidence intervals for factor effects.

Author: Roger Newson
Distribution-Date: 18march2004
Stata-Version: 7

INSTALLATION FILES (click here to install)
factref.ado
factref.hlp
--------------------------------------------------------------------------------------------
(click here to return to the previous screen)

--------------------------------------------------------------------------------------------
package harmby from http://www.kcl-phs.org.uk/rogernewson/stata7
--------------------------------------------------------------------------------------------

TITLE
harmby: Harmonize values of variables within by-groups

DESCRIPTION/AUTHOR(S)
harmby ("harmonize within by-groups") checks that each variable in a
varlist has no more than one value, other than the standard missing value,
in each of the by-groups specified by by(), or in the whole data set, if
by() is not specified. A standard missing value is . for a numeric
variable, or the empty string "" for a string variable. If this condition
is true, then harmby replaces all standard missing values in the by-group
(or data set) by the one value that is not standard missing, if such a
value exists, and takes no action if all values in a by-group (or data set)
are standard missing. harmby is useful if there are variables whose values
should be unique within each by-group (or within the data set), and new
observations with standard missing values for these variables have been
added to some or all of the by-groups by merge, or by ingap, which is
downloadable from SSC or from this website.

Author: Roger Newson
Distribution-Date: 03march2004
Stata-Version: 7

INSTALLATION FILES (click here to install)
harmby.ado
harmby.hlp
--------------------------------------------------------------------------------------------
(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]
Website: http://www.kcl-phs.org.uk/rogernewson

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

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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