[Thread Prev][Thread Next][Index]

Re: [ferret_users] y=a+b*x fit in Ferret



Hi Changshui -

Just use the standard statistics formulas.

I guess you know that Ferret cannot use variable names x and y. So let's say the variables are xx and yy and that each is a time series.

let xbar = xx[l=@ave]
let ybar = yy[l=@ave]
let xy = xx*yy
let xybar = xy[l=@ave]
let xsq = xx^2
let xsqbar = xsq[l=@ave]

let b = (xybar-(xbar*ybar))/(xsqbar-xbar^2)
let a = ybar - b*xbar

Also see the documentation for the included script variance.jnl. (From the command line, Fgo -more variance)

Billy K

On 23/09/2007, at 6:36 PM, Xia Changshui wrote:

Hello!
I have two variable in one dataset, y is model result while x is observation. How to apply a y=a+b*x fit? I saw "LINFIT,n,XIMIN,XIMAX,XOMIN,XOMAX" in the manual.
Can anyone give some clue or examples?
Thank you in advance.

Xia




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement