Skip to content

Robust nonlinear regression - sin(x)/x?

2 messages · Ravi Varadhan, cstrato

#
A small correction to my previous email:
You actually specify the following call to lm:

y <- sin(x)/x
lm(z ~ y - 1)

to make sure that the intercept is not estimated.

Ravi.

----- Original Message -----
From: Ravi Varadhan <rvaradha at jhsph.edu>
Date: Monday, February 2, 2004 2:46 pm
Subject: Re: [R] Robust nonlinear regression - sin(x)/x?
#
Dear Ravi

Sorry, I forgot to mention that you have also  indicated
that I have only one parameter. Fitting using lm gives:
c=1.023 w/o and c=1.146 with outliers.

Maybe sin(x)/x was a bad example, how about trying to
fit a polynomial of degree n?

Best regards
Christian
Ravi Varadhan wrote: