*! version 1.1.1 24feb2012
help repshow

Title

repshow - Replace observations and show what has been changed

Syntax

repshow
oldvar
=exp
[if] [in]
[, nopromote id(varname) listvars(varlist) verbose *]

Main
nopromote prevent promotion of a variable type

id(varname) variable to identify listed observations

listvars(varlist) additional variable(s) listed for changed observations

verbose provide additional details on the operation

* options passed through to the list command

by is not allowed; see [D] by.

weights are not allowed; see weight.

Description

repshow shows the changes made by the replace command.
Basic syntax is exactly like replace. Options id(varname)
and listvars(varlist) display the values of other variables for
the same observations that are changed by the replace command.
These options are for information only. repshow makes use of the
mean and N options of the list command to display these
summary statistics for the changed observations. In addition any options
which typically apply to the list commmand can be added.

Options

nopromote prevents replace from promoting the
variable type to accommodate the change.
See help for replace for details.

id selects a variable for the first column of the output so the user
can identify the changed observations.

listvars selects additional variables to be displayed to give the user
further information about the changed observations.

verbose adds some explanatory text to the output, but does not change
the results.

Remarks

The repshow command does NOT work on string variables. If oldvar
is a string variable, repshow produces the error message "type mismatch"
even when this is not correct.

The repshow command lists the old and new versions of the replaced
variable for every replaced observation. Thus if the user intends
to change the values of hundreds of observations the replaced command
may be more convenient.

Example

. repshow rxc1 = 1000 if code==15, id(nation) listvars(rxc2 art year) verbose
(17 real changes made)

Comparison of -rxc1- before and after execution of -replace-
The column -nation- identifies the observations
The column -Old vrsn- gives the values of -rxc1- before the replace.
The column -New vrsn- gives the values of -rxc1- after the replace.
The column(s) rxc2 art year are for information only.

+
-
-
---------------------+
| nation Old vrsn New vrsn rxc2 art year |
+
-
-
---------------------+
205. | Bolivia . 1,000 . . 2004 |
206. | Bolivia . 1,000 . . 2005 |
207. | Bolivia 222 1,000 2,123 299 2006 |
208. | Bolivia 222 1,000 2,123 288 2007 |
209. | Bolivia 222 1,000 2,123 290 2008 |
+
-
-
---------------------+
210. | Bolivia 222 1,000 2,123 298 2009 |
211. | Bolivia 222 1,000 2,123 307 2010 |
212. | Bolivia 222 1,000 2,123 318 2011 |
213. | Bolivia 222 1,000 2,123 331 2012 |
214. | Bolivia 222 1,000 2,123 346 2013 |
+
-
-
---------------------+
215. | Bolivia 222 1,000 2,123 363 2014 |
216. | Bolivia 222 1,000 2,123 379 2015 |
217. | Bolivia 222 1,000 2,123 397 2016 |
218. | Bolivia 222 1,000 2,123 414 2017 |
219. | Bolivia 222 1,000 2,123 430 2018 |
+
-
-
---------------------+
220. | Bolivia 222 1,000 2,123 447 2019 |
221. | Bolivia 222 1,000 2,123 462 2020 |
+
-
-
---------------------+
Mean | 222 1,000 2,123 358 2012 |
N | 15 17 15 15 17 |
+
-
-
---------------------+

Author

Mead Over,
Center for Global Development, Washington, DC 20036 USA. Email:
MOver@CGDev.Org if you observe any
problems.