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

RE: st: Winsor by group - still can't get it

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: Winsor by group - still can't get it
Date   Mon, 2 Aug 2004 18:08:40 +0100

This code is legal and works: 

. gen winsor = . 
(1031 missing values generated)

. forval y = 1976/1984 { 
  2. winsor emp if year == `y', h(1) gen(temp) 
  3. replace winsor = temp if year == `y' 
  4. drop temp
  5. }

I can't comment usefully on what you're doing 
wrong without seeing what you typed. 

FAQ: "Say exactly what you typed and exactly what 
Stata typed (or did) in response. N.B. exactly!"  

[email protected] 

Kiousis, P. Konstantina
> Sorry but I still can't get this to work.  I tried using a 
> stata dataset as a test.  I used 
> use
> After the forval, I get an error message 0 values to be 
> winsorized.  I tried creating a local variable for max and 
> min year and a few other things but for some reason, it still 
> isn't working.  What would the syntax be for this dataset?  

*   For searches and help try:

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