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

Home » Public Forums » archive » Re: CURVEFIT.PRO standard deviations?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CURVEFIT.PRO standard deviations? [message #30660 is a reply to message #30659] Sun, 12 May 2002 23:13 Go to previous message
Andrew Noymer is currently offline  Andrew Noymer
Messages: 3
Registered: May 2002
Junior Member
> You can see the discrepancy in the one-sigma lines: can someone tell
> me what's up with the sigma returned from CURVEFIT, and how I can
> make them conform?

I'm not sure exactly what's going on, but I take an interest in this because
I use these sorts of procedures.

I fed your code into IDL and modified it so the data were also written-out.
I then fed the points into Stata (www.stata.com).

Here is what I found:

LINFIT parameters, sigma, and chi-square :
-13.7844 2.91336
1.32243 0.0944590
266.783
CURVEFIT parameters, sigma, and chi-square :
-13.7839 2.91333
0.388221 0.0277362
11.5993

So I cfm. that the parameters are the same (for all intents and
purposes) between the two procedures, but the ch-sq and sigma
is different. Here's what Stata gives me:


Source | SS df MS Number of obs = 25
-------------+------------------------------ F( 1, 23) = 951.27
Model | 11034.0003 1 11034.0003 Prob > F = 0.0000
Residual | 266.782989 23 11.5992604 R-squared = 0.9764
-------------+------------------------------ Adj R-squared = 0.9754
Total | 11300.7833 24 470.86597 Root MSE = 3.4058

------------------------------------------------------------ ------------------
v1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+---------------------------------------------- ------------------
var2 | 2.913364 .094459 30.84 0.000 2.717961 3.108768
_cons | -13.78436 1.322426 -10.42 0.000 -16.52 -11.04871
------------------------------------------------------------ ------------------


Stata's coefficient's are (of course) the same. What CURVEFIT calls
chi-sq, Stata calls Residual MSE (mean sq. error). And it looks like
LINFIT gives the Std. Errors of the coefficients that I would use if
I were you. The LINFIT ch-sq is what Stata calls the Residual SSE (sum
sq. error).

I'm not sure how the CURVEFIT sigma values are calculated but I would not
use them if I were you, without knowing exactly where they come from.

HTH.

Andrew
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Object Graphics when using 'stop'
Next Topic: Re: Matlab emacs package similar to idlwave

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

Current Time: Fri Oct 10 02:38:09 PDT 2025

Total time taken to generate the page: 1.04080 seconds