[Thread Prev][Thread Next][Index]
Re: How to fit data with a straight line
Look at the .jnl files regress?.jnl that would be in $FER_DIR/go, since you are
trying to do this versus time, you would use regresst.jnl. A simple example for
your case:
yes? let p=temperature
yes? let q=t
yes? set grid q
yes? go regresst
Then:
yes? list slope, intercep, rsquare ! slope is b and intercep is a
You can also plot this with
yes? plot qhat
Mark
On Mar 22, 1:48pm, Yang Haijun wrote:
> Subject: How to fit data with a straight line
> Dear ferret users,
>
> I have a time-series data, say Temperature with 40 years, now I want to fit
this data with a
> straight line, that is, I want to get this line:
>
> Y = a + b*t
>
> based on Temperature observations. Here Y is temperature, t is time step.
How do I get 'a' and
> 'b'? Is there a function to do this in ferret?
>
> Thank you very much,
>
> Haijun Yang
>-- End of excerpt from Yang Haijun
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement