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

RE: st: Winsor by group


From   "Kiousis, P. Konstantina" <[email protected]>
To   <[email protected]>
Subject   RE: st: Winsor by group
Date   Mon, 2 Aug 2004 11:36:47 -0400

Yes, I looked at this.  What I am wondering is how do I loop winsor so that I can winsorize year by year?  I tried creating groups and use forvalues i = 1/(#of years), etc. but am not getting the syntax correct.  All the examples I found were of the form generate = ...  and winsor creates the new variable using gen(varname).
Thanks, KK
 

	-----Original Message----- 
	From: Neil Shephard [mailto:[email protected]] 
	Sent: Mon 08/02/2004 11:29 
	To: [email protected] 
	Cc: 
	Subject: Re: st: Winsor by group
	
	

	> I am working with a time series and interested in winsorizing a
	> variable by year.  What is the easiest way to do this?  Thanks, KK
	>
	
	.findit winsor
	
	suggests that you might want to try installing and using the -winsor- command.
	
	DESCRIPTION/AUTHOR(S)
	     
	      winsor takes the non-missing values of a variable and generates a
	      new variable  identical except that the h highest and h lowest
	      values are replaced by the  next value counting inwards from the
	      extremes. h can be specified directly or  indirectly by
	      specifying a fraction p of the number of observations: h =  [p
	      n]. This transformation is named after the biostatistician C.P.
	      Winsor. This is version 1.3.0 of  the software.
	     
	      Author: Nicholas J. Cox, University of Durham
	      Support: email  [email protected]
	
	And in response to your searching of the archives, it depends on which mirror your
	searching.  I think that of the three only the Yahoo mirror will allow you to sort by date
	(which appears to be the default).  The archives at Harvard can be listed by date, but
	there doesn't seem to a search function.
	
	HTH's
	
	Neil
	
	Neil Shephard
	Genetics Statistician
	ARC Epidemiology Unit, University of Manchester
	[email protected]
	[email protected]
	
	"If your result needs a statistician then you should design a better experiment" -
	Ernest Rutherford
	
	*
	*   For searches and help try:
	*   http://www.stata.com/support/faqs/res/findit.html
	*   http://www.stata.com/support/statalist/faq
	*   http://www.ats.ucla.edu/stat/stata/
	


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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