cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
paulp
Level III

average by month

I have ratings data for different locations across 2009-2011.  The data formatted in two columns => rating | date   e.g. 0.85 | 06/29/2010.  How can I average the ratings by month?  thanks, Paul

2 REPLIES 2

average by month

Hi Paul,

There are many ways you could do this. You could create a variable that is by month and year and use SQL to do the aggregation or you could do this in a data step with by group processing (assuming you had your month & year variables) or you could simply use proc means.

Syntax will be something like...

proc means data=mydata mean; *if you want the default statistics then remove mean here otherwise it will give you the average ratings by month;

     var rating;

     class date;

     format date monyy7.; *This is to get the 12 month categories for each year;

run;

Doing the above avoids having to spend time creating new variables etc and you take advantage of the benefits of using a SAS format for group processing.

I hope this helps.

Cheers,

Michelle

MTOF
Level III

average by month

Hi Paul

Assuming your columns are called Rating and Date


You could add two columns Month and Year with the formulas month(Date) and year(Date) (they are both in the Date Time group) respectively.

Then do Tables/Summary, Statistics:Mean of Rating and Group:Year and Month.

BR, Marianne

Recommended Articles