BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
robertrao
Quartz | Level 8

Hi,

I have the following code and I am getting  the value of MXCNT=1

Could you tell me where I am going wrong???

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

How many values of VPFX do you have for each value of MRN1? If there is only one then that's what's going on. Code without data is a tad hard to diagnosis for specific values.

If you are only looking at the value of the Put statement when LAST then the above is critical for the last combination of MRN1 and VPFX.

If you have more than one value of MRN1 you probably aren't getting what you want uness you only want the count for the last value of MRN1.

View solution in original post

3 REPLIES 3
ballardw
Super User

How many values of VPFX do you have for each value of MRN1? If there is only one then that's what's going on. Code without data is a tad hard to diagnosis for specific values.

If you are only looking at the value of the Put statement when LAST then the above is critical for the last combination of MRN1 and VPFX.

If you have more than one value of MRN1 you probably aren't getting what you want uness you only want the count for the last value of MRN1.

robertrao
Quartz | Level 8

Hi Thanks for the reply.

There are multiple VPFX for each value of MRN1

Tom
Super User Tom
Super User

You are counting how many copies of a particular VPFX there are.  So if the MAX is 1 then the combination of MRN1 and VPFX uniquely identifies the observation.

Perhaps you wanted FIRST.MRN1 instead of FIRST.VPFX so that you could count the max number of VPFX per MRN1?

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 738 views
  • 3 likes
  • 3 in conversation