Re: [R] local regression using loess

2009-07-28 Thread cindy Guo
Bert, Ryan, Alain, You suggestions are very helpful. Thank you. I learned a lot from the discussion. Cindy On Tue, Jul 28, 2009 at 8:53 AM, Ryan wrote: > Bert Gunter gene.com> writes: > > > > > > > Actually, loess is much more than an "interpolant". I wouldn't > > even call it that. It is a

Re: [R] local regression using loess

2009-07-28 Thread Ryan
Bert Gunter gene.com> writes: > > > Actually, loess is much more than an "interpolant". I wouldn't > even call it that. It is a local regression technique that comes > with all the equipment you get in classical regression. But it > is meant for normal-like errors, which is not what you

Re: [R] local regression using loess

2009-07-28 Thread Ryan Hafen
Are X1 and X2 both numeric? You might want to get them on equivalent scales, and also play around with the smoothing parameter. Try something like: fit <- locfit(Y ~ lp(X1, X2, nn=___, scale=TRUE), family="binomial") and see what happens for different values of nn (try values between 0 and

Re: [R] local regression using loess

2009-07-28 Thread Bert Gunter
Actually, loess is much more than an "interpolant". I wouldn't even call it that. It is a local regression technique that comes with all the equipment you get in classical regression. But it is meant for normal-like errors, which is not what you have. -- This is misleading. The local smoot

Re: [R] local regression using loess

2009-07-28 Thread Alain Zuur
cindy Guo wrote: > > Hi, All, > > I have a dataset with binary response ( 0 and 1) and some numerical > covariates. I know I can use logistic regression to fit the data. But I > want > to consider more locally. So I am wondering how can I fit the data with > 'loess' function in R? And what will

Re: [R] local regression using loess

2009-07-27 Thread cindy Guo
Hi, Ryan, Thank you for the information. I tried it. But there are some error messages. When I use fit <- locfit(Y~X1*X2,family='binomial'), the error message is error lfproc(x, y, weights = weights, cens = cens, base = base, geth = geth, : compparcomp: parameters out of bounds And when I use

Re: [R] local regression using loess

2009-07-27 Thread Ryan
> > > > Hi, All, > > > > I have a dataset with binary response ( 0 and 1) and some numerical > > covariates. I know I can use logistic regression to fit the data. But I > > want > > to consider more locally. So I am wondering how can I fit the data with > > 'loess' function in R? And what will be t

Re: [R] local regression using loess

2009-07-27 Thread cindy Guo
n...@r-project.org] > On > Behalf Of cindy Guo > Sent: Monday, July 27, 2009 4:06 PM > To: r-help@r-project.org > Subject: [R] local regression using loess > > Hi, All, > > I have a dataset with binary response ( 0 and 1) and some numerical > covariates. I know I can use logist

Re: [R] local regression using loess

2009-07-27 Thread Bert Gunter
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of cindy Guo Sent: Monday, July 27, 2009 4:06 PM To: r-help@r-project.org Subject: [R] local regression using loess Hi, All, I have a dataset with binary response ( 0 and 1) and some

[R] local regression using loess

2009-07-27 Thread cindy Guo
Hi, All, I have a dataset with binary response ( 0 and 1) and some numerical covariates. I know I can use logistic regression to fit the data. But I want to consider more locally. So I am wondering how can I fit the data with 'loess' function in R? And what will be the response: 0/1 or the probabi