[Thread Prev][Thread Next][Index]

Re: [ferret_users] ferret question (plot/vs)



Hi,
I am not sure I understand what you are asking, but here are some ideas for looking at the relation between two parameters. You have found the PLOT/VS command. There are a couple of scripts which will let you compute statistics. To see what the scripts do, use GO/HELP to view the script.

yes? go/help regresst yes? go/help variance

For both of these, you define variables p and q to equal your variables of interest, and the script defines variables such as CORREL and COVAR from the variance script for the correlation and covariance; or the SLOPE, INTERCEP and RSQUARE of a regression. (There are more scripts regressx.jnl, regressy.jnl, regressz.jnl if you data lie on a line in X, Y, or Z).

If you want to know the mean of one variable when the other is in a particular range, the thing to do is called "masking". You create a mask which is 1 in your desired range and missing elsewhere, and multiply the other variable by that mask.

If your temperature variable is called temp, and the concentration is called concen, and assuming that they are time series data, then this might look like this:

yes? LIST concen[L=@AVE] ! the average of all the concentration values

yes? LET mask1 = IF temp GT 12 THEN 1 ! there is an implied ELSE missing
yes? LET mask2 = IF temp LT 23 THEN 1
yes? LET mask = mask1 * mask2 ! this variable is 1 where 12 < temp < 23

yes? LET masked_concen = mask * concen

! Then here is the average of concen at the times when 12 < temp < 23
yes? LIST masked_concen[L=@AVE]

Ansley


igaratza@palmod.uni-bremen.de wrote:
Hi,

I have a question about function PLOT/VS to plot the relation of two parameters.
I have a global dataset of temperature and concentration of some organismo and I
want to know the relation between. If I plot them I have a scatter plot. But I
want to know this relation not visually, but numerically. I want to know which
is the "mean" concentration and the "standar desviation" for each temperature
(or for each range of temeparture). Does anyone know how can I do that?
Thanks a lot



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement