Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: How to find the minimum and maximum values of a column?

From   "Alex Ogan" <>
To   <>
Subject   st: RE: How to find the minimum and maximum values of a column?
Date   Tue, 20 Jun 2006 13:12:01 -0400

There are several ways to do this.  -search min- and -search max- would
point you to them, although it wouldn't be immediately obvious which
links to click on.  Anyway, here are two:

-summarize varname- will create scalars r(min) and r(max).

-egen min_varname = min(varname)- will create a new variable containing
the minimum across all observations.

Hope this helps,

-----Original Message-----
[] On Behalf Of Laura Flamand
Sent: Tuesday, June 20, 2006 1:02 PM
Subject: st: How to find the minimum and maximum values of a column?

Dear STATA list members,

I am working in a program to estimate an index similar to the Index of
Human Development (PNUD, various  years), and I need to find the
maximum and minimum value of several variables across 2500
observations, I will then use these values to normalize the variables.
I know how to find min and max values across rows, but I cannot find a
command to find these min and max values across columns, other than to
transpose the data set with xpose, or to transform my data set into a
matrix (but then I can only have a 800x800 matrix, right?)

I may be overlooking something very obvious, and I apologize in
advance, but any help would be greatly appreciated.

Thank you in advance,

*   For searches and help try:

This message is intended solely for the designated recipient(s). It may contain confidential or proprietary information and may be subject to confidentiality protections. If you are not a designated recipient, you may not review, copy, or distribute this message. If you receive this in error, please notify the sender by reply e-mail and delete this message. 

Arrowstreet Capital, L.P. is an Equal Opportunity Employer. 

*   For searches and help try:

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