BookmarkSubscribeRSS Feed
marianthi86
Calcite | Level 5

I have to columns. One is the Center and the other is diastolic blood pressure reading. How to i compute the average diastolic blood pressure for each center while retaining all other variables in the data set.

3 REPLIES 3
novinosrin
Tourmaline | Level 20

Can you please post a sample of what you HAVE and what you WANT?

marianthi86
Calcite | Level 5
I have 6 variables in my data set:
patient visit center treat dbp dbp1


Center is a group variable and dbp is a numeric variable.

I want to calculate the mean dbp for each center by creating a new column
that includes observations for the mean dbp of each center without having
to create a new data set. I want to retain all other observations for other
columns.

PaigeMiller
Diamond | Level 26

Really, you could show us some example of your data, and an example of the results you want, so we can truly understand what you are asking for. Without that, we are merely guessing, and possibly wasting evereyone's time.

 

Here's my guess:

Use PROC SUMMARY with center in the CLASS statement, then merge the results into the original data set.

 

If that's the answer, great.

 

If not, DO NOT REPLY that this doesn't work without showing us an exaample of your data and the desired result.

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 650 views
  • 1 like
  • 3 in conversation