comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to calculate 3SIGMA in Linfit!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to calculate 3SIGMA in Linfit! [message #80359] Tue, 12 June 2012 12:35
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, June 12, 2012 2:10:16 PM UTC-4, dave poreh wrote:
> On Tuesday, June 12, 2012 10:54:26 AM UTC-7, Craig Markwardt wrote:
>> On Tuesday, June 12, 2012 10:53:03 AM UTC-4, Craig Markwardt wrote:
>>> On Tuesday, June 12, 2012 3:07:40 AM UTC-4, dave poreh wrote:
>>>> On Monday, June 11, 2012 6:25:35 PM UTC+2, Craig Markwardt wrote:
>>>> > On Monday, June 11, 2012 3:51:50 AM UTC-4, dave poreh wrote:
>>>> > > Dear folks
>>>> > > hi,
>>>> > > i want to calculate 3sigma in linfit function. sigma function just give me the SD and i could not do 3*sigma to get 3sigma. As far as i understood first i need to transfer data to normal function and then i find SD and 3SD=3sigma.
>>>> >
>>>> > I'm assuming you want to calculate a 3 sigma confidence limit. But of what? The slope coefficient? Offset coefficient?
>>>> >
>>>> > As far as I understand, 3 sigma is indeed usually 3 times the 1 sigma error estimate. When your fitting function is non-linear it gets more complicated, but yours is not-nonlinear.
>>>> >
>>>> > Craig
>>>> I want to measure velocity of the time series that means i would have a velocity and +- 3sigma error.
>>
>> As a practical matter, I recommend that you subtract the average time value (or center-time value) from the time column of your samples.
>>
>> The result returned from LINFIT() will then be mean position at the center time, and the mean velocity at the center time.
>>
>> If you don't subtract the mean time value, then that can introduce some nasty correlations between the slope and offset coefficients.
>>
>> Craig
> Thanks
> I have noticed that, and i thought it is a statistical matter. Why it is like that. Is this thing (subtracting mean()) some kind of normalization or what?


It's a correlation between parameters.

A linear fit has a slope term and an offset term, which is measured at the origin of the X axis. If the origin of the X axis is very far from the measured data positions, then a very small error in the slope will trigger a large error in the offset, and vice versa.
Re: How to calculate 3SIGMA in Linfit! [message #80361 is a reply to message #80359] Tue, 12 June 2012 11:10 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Tuesday, June 12, 2012 10:54:26 AM UTC-7, Craig Markwardt wrote:
> On Tuesday, June 12, 2012 10:53:03 AM UTC-4, Craig Markwardt wrote:
>> On Tuesday, June 12, 2012 3:07:40 AM UTC-4, dave poreh wrote:
>>> On Monday, June 11, 2012 6:25:35 PM UTC+2, Craig Markwardt wrote:
>>>> On Monday, June 11, 2012 3:51:50 AM UTC-4, dave poreh wrote:
>>>> > Dear folks
>>>> > hi,
>>>> > i want to calculate 3sigma in linfit function. sigma function just give me the SD and i could not do 3*sigma to get 3sigma. As far as i understood first i need to transfer data to normal function and then i find SD and 3SD=3sigma.
>>>>
>>>> I'm assuming you want to calculate a 3 sigma confidence limit. But of what? The slope coefficient? Offset coefficient?
>>>>
>>>> As far as I understand, 3 sigma is indeed usually 3 times the 1 sigma error estimate. When your fitting function is non-linear it gets more complicated, but yours is not-nonlinear.
>>>>
>>>> Craig
>>> I want to measure velocity of the time series that means i would have a velocity and +- 3sigma error.
>
> As a practical matter, I recommend that you subtract the average time value (or center-time value) from the time column of your samples.
>
> The result returned from LINFIT() will then be mean position at the center time, and the mean velocity at the center time.
>
> If you don't subtract the mean time value, then that can introduce some nasty correlations between the slope and offset coefficients.
>
> Craig
Thanks
I have noticed that, and i thought it is a statistical matter. Why it is like that. Is this thing (subtracting mean()) some kind of normalization or what?
Cheers,
Dave
Re: How to calculate 3SIGMA in Linfit! [message #80362 is a reply to message #80361] Tue, 12 June 2012 10:54 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, June 12, 2012 10:53:03 AM UTC-4, Craig Markwardt wrote:
> On Tuesday, June 12, 2012 3:07:40 AM UTC-4, dave poreh wrote:
>> On Monday, June 11, 2012 6:25:35 PM UTC+2, Craig Markwardt wrote:
>>> On Monday, June 11, 2012 3:51:50 AM UTC-4, dave poreh wrote:
>>>> Dear folks
>>>> hi,
>>>> i want to calculate 3sigma in linfit function. sigma function just give me the SD and i could not do 3*sigma to get 3sigma. As far as i understood first i need to transfer data to normal function and then i find SD and 3SD=3sigma.
>>>
>>> I'm assuming you want to calculate a 3 sigma confidence limit. But of what? The slope coefficient? Offset coefficient?
>>>
>>> As far as I understand, 3 sigma is indeed usually 3 times the 1 sigma error estimate. When your fitting function is non-linear it gets more complicated, but yours is not-nonlinear.
>>>
>>> Craig
>> I want to measure velocity of the time series that means i would have a velocity and +- 3sigma error.

As a practical matter, I recommend that you subtract the average time value (or center-time value) from the time column of your samples.

The result returned from LINFIT() will then be mean position at the center time, and the mean velocity at the center time.

If you don't subtract the mean time value, then that can introduce some nasty correlations between the slope and offset coefficients.

Craig
Re: How to calculate 3SIGMA in Linfit! [message #80363 is a reply to message #80362] Tue, 12 June 2012 07:53 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Tuesday, June 12, 2012 3:07:40 AM UTC-4, dave poreh wrote:
> On Monday, June 11, 2012 6:25:35 PM UTC+2, Craig Markwardt wrote:
>> On Monday, June 11, 2012 3:51:50 AM UTC-4, dave poreh wrote:
>>> Dear folks
>>> hi,
>>> i want to calculate 3sigma in linfit function. sigma function just give me the SD and i could not do 3*sigma to get 3sigma. As far as i understood first i need to transfer data to normal function and then i find SD and 3SD=3sigma.
>>
>> I'm assuming you want to calculate a 3 sigma confidence limit. But of what? The slope coefficient? Offset coefficient?
>>
>> As far as I understand, 3 sigma is indeed usually 3 times the 1 sigma error estimate. When your fitting function is non-linear it gets more complicated, but yours is not-nonlinear.
>>
>> Craig
> I want to measure velocity of the time series that means i would have a velocity and +- 3sigma error.

Assuming:
* the errors are gaussian; (and uncorrelated)
* the data error bars are the correct size; and
* the linear function is a good model for the data;

then the formal parameter errors reported by LINFIT() will be an unbiased estimate of the true parameter errors. And the 3 sigma confidence limits will be the same as the 3 x (1 sigma) confidence limits.

If that is not occurring, then one of the assumptions above is not applicable.

Craig
Re: How to calculate 3SIGMA in Linfit! [message #80365 is a reply to message #80363] Tue, 12 June 2012 00:07 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Monday, June 11, 2012 6:25:35 PM UTC+2, Craig Markwardt wrote:
> On Monday, June 11, 2012 3:51:50 AM UTC-4, dave poreh wrote:
>> Dear folks
>> hi,
>> i want to calculate 3sigma in linfit function. sigma function just give me the SD and i could not do 3*sigma to get 3sigma. As far as i understood first i need to transfer data to normal function and then i find SD and 3SD=3sigma.
>
> I'm assuming you want to calculate a 3 sigma confidence limit. But of what? The slope coefficient? Offset coefficient?
>
> As far as I understand, 3 sigma is indeed usually 3 times the 1 sigma error estimate. When your fitting function is non-linear it gets more complicated, but yours is not-nonlinear.
>
> Craig
I want to measure velocity of the time series that means i would have a velocity and +- 3sigma error.
Cheers,
Dave
Re: How to calculate 3SIGMA in Linfit! [message #80373 is a reply to message #80365] Mon, 11 June 2012 09:25 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Monday, June 11, 2012 3:51:50 AM UTC-4, dave poreh wrote:
> Dear folks
> hi,
> i want to calculate 3sigma in linfit function. sigma function just give me the SD and i could not do 3*sigma to get 3sigma. As far as i understood first i need to transfer data to normal function and then i find SD and 3SD=3sigma.

I'm assuming you want to calculate a 3 sigma confidence limit. But of what? The slope coefficient? Offset coefficient?

As far as I understand, 3 sigma is indeed usually 3 times the 1 sigma error estimate. When your fitting function is non-linear it gets more complicated, but yours is not-nonlinear.

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: plot problem
Next Topic: Temporal Mean

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:46:32 PDT 2025

Total time taken to generate the page: 0.00660 seconds