BookmarkSubscribeRSS Feed
jomag
Obsidian | Level 7

Hello All,

 

I have two large datasets(a baseline file (approx 64,000 observations) and an endpoint file (approx 33,000 observations)) of repeated observations that I would like to merge based on a few conditions:

 

1. They should be of the same study id

2. They should have the same start year

3. The day when endpoint occurred must be the same as study start day or end day or within that period (for a row)

 

I am attaching an example of how these two files look like and how I would like them to look after merging.

 

Definitions of the variables are:

 

Begin day= Number of days from start year

End day = Number of days from start year

1 REPLY 1
LinusH
Tourmaline | Level 20
1. Supply sample data in dorm of a data step w DATALINES.
2. Describe what you have tried so far.
Data never sleeps

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!

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
  • 1 reply
  • 589 views
  • 0 likes
  • 2 in conversation