Statalist The Stata Listserver

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

st: RE: error with -egen median if-

From   "Alex Ogan" <>
To   <>
Subject   st: RE: error with -egen median if-
Date   Mon, 22 May 2006 12:04:11 -0400

Here is a more simple example.  I also should have mentioned I am using
Stata/SE 8.2.

. input numvar str1 strvar

        numvar     strvar
  1. 5
  2. 6 "a"
  3. 7 "b"
  4. end

. egen testsum_1 = sum(numvar)

. egen testmedian_1 = sum(numvar)

. egen testsum_2 = sum(numvar) if strvar=="a"
(2 missing values generated)

. egen testmedian_2 = median(numvar) if strvar=="a"
a not found


-----Original Message-----
[] On Behalf Of Alex Ogan
Sent: Monday, May 22, 2006 11:59 AM
Subject: st: error with -egen median if-

Can anyone explain this weird error (the type mismatch failure on the
final -egen-)? 

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–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index