Date: Fri, 9 Oct 2009 10:56:57 -0700
Reply-To: Dale McLerran <stringplayer_2@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Dale McLerran <stringplayer_2@YAHOO.COM>
Subject: Re: Proc Loess
In-Reply-To: <1ca751e30910090910s70f24c5fq5d2d3a9a18818d33@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Sudip,
If the response should range from 0 to 100 (is this a
percentage?), then you might employ a logit transformation
of the response before you pass it through the Loess
smoother. Reconstruct the response as
Y_loess = ln( y / (100-y) );
If you have some observations with values of 0 or 100,
then you might have to modify the transformation slightly
to be something like:
Y_loess = ln( y+0.5 / (100.5-y) );
Now, the response can range over (-inf,inf). Instead of
using Y as the response variable in PROC LOESS, use
Y_loess as the response. You could then backtransform
your smoother to return values on the range from 0 to 100.
This would be
Y_hat = 100 * exp(Y_sm) / (1 + exp(Y_sm))
or, if you have 0 or 100 values,
Y_hat = (100.5*exp(Y_sm) - 0.5) / (1 + exp(Y_sm))
where Y_sm is the smoothed value of the response returned
by PROC LOESS.
Dale
---------------------------------------
Dale McLerran
Fred Hutchinson Cancer Research Center
mailto: dmclerra@NO_SPAMfhcrc.org
Ph: (206) 667-2926
Fax: (206) 667-5977
---------------------------------------
--- On Fri, 10/9/09, sudip chatterjee <sudip.memphis@GMAIL.COM> wrote:
> From: sudip chatterjee <sudip.memphis@GMAIL.COM>
> Subject: Proc Loess
> To: SAS-L@LISTSERV.UGA.EDU
> Date: Friday, October 9, 2009, 9:10 AM
> Dear Users,
>
> When I do smoothing in my dataset through proc loess I see
> there are
> some negative numbers which make no sense in the data. This
> happens
> whenever the original data is near zero, so I was wondering
> if there
> is any option where I can set up the scale such that after
> smoothing I
> dont get a value of less than 0 & more than 100 ?
>
> Thank you all for your time.
>
> regards
>