Thanks as always to Kit Baum, a new version of the xcontract package is now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have an old version of xcontract.
The xcontract package is described as below on my website. The new version now allows aweights, pweights and iweights, as well as fweights. All kinds of weights are treated in the same way. This allows users to weight the frequencies and percentages by enormous weights which have to be of type double because they are too large to be of type long. I would like to thank Kit Baum for alerting me to this problem.
Best wishes
Roger
--------------------------------------------------------------------------------------
package xcontract from http://www.rogernewsonresources.org.uk/stata16
--------------------------------------------------------------------------------------
TITLE
xcontract: Create dataset of variable combinations with frequencies and percents
DESCRIPTION/AUTHOR(S)
xcontract is an extended version of contract. It creates an output
data set with 1 observation per combination of values of the
variables in varlist and data on the frequencies and percents of
those combinations of values in the existing data set, and,
optionally, the cumulative frequencies and percents of those
combinations. If the by() option is used, then the output data set
has one observation per combination of values of the varlist
variables per by-group, and percents are calculated within each
by-group. The output data set created by xcontract may be listed to
the Stata log, or saved to a data frame, or saved to a disk file, or
written to the memory (overwriting any pre-existing data set).
Author: Roger Newson
Distribution-Date: 28december2020
Stata-Version: 16
INSTALLATION FILES (click here to install)
xcontract.ado
xcontract.sthlp
--------------------------------------------------------------------------------------
(click here to return to the previous screen)
Related Posts with New version of xcontract on SSC
Simulation with xtmixed – Stops runningHello everyone, Someone might be able to help me. The issue has not been addressed in prior posts. …
Very different p-values using testnl vs test after marginsI'm working with survey data on medication use among people with a disease. The question is whether …
How to create a date variable from month? String VariableHi I have a query my variable is in the following format: 1901m12, 1902m1 and so on. I want to separ…
reshaping missing variablesHello, I'm trying to create a dataset with years ranging from 1975 to 2018. However one of the vari…
Short Panel data + fixed effect model, questions about time dummy and unit rootHi dear Statalist, I’m exploring how the bank specific characteristics and macro variables (liquidit…
Subscribe to:
Post Comments (Atom)
0 Response to New version of xcontract on SSC
Post a Comment