[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Equivalent of EXCEL LINEST function?

Craig Markwardt wrote:
> However using REGRESS may be like killing a fly with a shotgun, a bit
> of overkill.
> Why not use LINFIT and CORRELATE, which standard IDL functions?
> p = linfit(x,y, sigma=dp)   ;; DP are parameter uncertainties
> r2 = correlate(x,y)

Jeopardy style answer...

what is "because the IDL documentation stinks?"

I wanted to regress 2 vectors so I go into the online help in 5.3 (which
is what I'm using) and type regress.  Up pops the REGRESS function.  No
where does the REGRESS help mention LINFIT or CORRELATE.

After "rolling my own", I find them and they do (almost) what I want. 
They don't (like LINEST in excel, or "my own") provide standard errors
of the coefficents, the constant and Y estimate and a few other little