- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Median for all columns
Hi All,
Is there an easier way to calculate median of all the columns, rather than getting the summary in different tables and then joining all the data tables together? I have like 200 columns that I need to calculate the median from. I appreciate all the comments and suggestions.
for(r=1,r<=N Items(List),r++,
Summary(
Group( :Mask, :Lot,:Workweek ),
Median( Column(dt,List[r]) ),
Freq( "None" ),
Weight( "None" )
);
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Median for all columns
Use the Tabulate platofrm (under the Analyze menu). You should be able to put your grouping variables in any order you want and just ask for the median for all the continuous columns (put in the body of the table). Then Make into a Data Table (found at the red arrow in the Tabulate platform).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Median for all columns
You can use the Table-Summary command. Choose all the columns (of course, nominal columns will not give you medians) and choose Median from the drop down. Do not put a grouping variable. You will get a new data table with all the median values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Median for all columns
Hi Dale,
Thank you for the suggestion. I need to put the grouping variable by workweek, lot and mask. Is there a way to open a new data table and populate it median values sorted by the grouping variable for different columns?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Median for all columns
Use the Tabulate platofrm (under the Analyze menu). You should be able to put your grouping variables in any order you want and just ask for the median for all the continuous columns (put in the body of the table). Then Make into a Data Table (found at the red arrow in the Tabulate platform).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Median for all columns
Thats a really nice idea. Thanks Dale. If I have changing column names, I need to see how to represent the list of column names in "Analysis column" if I use a loop function. any thoughts?
(dt <<Tabulate(
Show Control Panel( 0 ),
Add Table(
Column Table(
Statistics( Median ),
Analysis Columns(
:Name( "ColA" ),
:Name( "ColB" ),
:Name( "ColC" ),
:Name( "ColD" ),
:Name( "ColE" )
)
),
Row Table( Grouping Columns( :LOTID, :MASK, :WW ) )
)
) )<< Make Into Data Table;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Median for all columns
Actually that works. Thank you Dale.