BookmarkSubscribeRSS Feed
Yanoothan
Calcite | Level 5

Hi,

I have a column named 'He_abs' with different datasets. I want to calculate the average of all dataset values of the column and then substract the average from all the dataset values in SAS VA.

Therefor I tried to create a calculated item with the expression 'He_abs' - Avg [_ForAll_] ('He_abs').

That does not work and i get the warnings 'element can't be aggregated' and 'operator does not support aggregation'.

 

How can I perform the calculation in SAS VA?

 

Thanks

 

2022-07-23 16_51_43-Greenshot.png

3 REPLIES 3
acordes
Rhodochrosite | Level 12

If you have licenced Visual Statistics then use a GLM to have a dummy model for predicting the mean. 

Probabably you have to create a dummy character variable to use an overall effect. 

Then use the variable of interest as target and the dummy variable as classifiaction effect.

Once the model has finished, derive predicted, that's your grand mean you can use in a calculated item 'x-y'. 

 

Yanoothan
Calcite | Level 5

Hi,

thanks for your answer. But does that mean that the calculation is not possible only using SAS VA?

acordes
Rhodochrosite | Level 12

You can do it in Visual Analytics. 

What I recommend goes for Visual Analytics. 

 

You can achieve this as well by creating an aggregated data source. You first create an aggregated item like mean by total. 

Then aggregate the data source. This way it's easier to deal with it because now the grand total mean becomes a scalar value. 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 378 views
  • 0 likes
  • 2 in conversation