[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Omitting values for Leasqr
From: |
Francesco Potortì |
Subject: |
Re: Omitting values for Leasqr |
Date: |
Wed, 09 Mar 2011 12:16:39 +0100 |
>I am trying to fit an exponential curve to data using the leasqr() function.
>I can fit the data no problem. However my data has a lot of noise and our
>policy is to remove data points that are outside of 2 standard deviations of
>the mean of the residuals from an exponential curve that is initially fit to
>the data. I have tried replacing the values with NA or NaN and it exits with
>an error of "CONVERGENCE NOT ACHIEVED!" my temporary solution is to replace
>the value with a local mean, however ideally I would like to omit the value
>without changing the data.
The leasqr function has the possibility of specifying weights for each
data point. You just set weight 1 to everything but the data you want to
ignore, whose weight you set to a low value.
Or you just create a new vector without the offending data points and do
the fitting on that one.
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/