I am trying to find the geometric mean of fecal bacteria for about 15 years of data over roughly 30 to 40 monitoring stations. The goal of my script is to conduct two filters (one on the Project ID column and another on the Characteristic Name column), then group the geo means by station then by year, and in the final table show the Station ID, Year, Characteristic Name, N, geo mean, and the Median.
I know now that I can't include the script for finding the geo mean in the Summary part of the script but I haven't been able to figure how where in this script I should place it. I'm not sure if I need to completely restructure the script or need to go about this in a totally different way.
Any advice or suggestions would be greatly appreciated!
Here is one way: once you have your data ready to summarize, create a log column for the desired variable. Then use Summary to find the group means of this log data. Then exponentiate the results and place them in a new column.
Here is an example:
dt = open("$Sample_Data/Car Physical Data.jmp");
dt << new column("log_weight", formula(log(:weight)));