i hava v_have data set
i want data as v_want data set wise how to do VISITNUM VISIT AVISIT AVISITN using data set v_have
Why should
Visit="UNSCHEDULED VISIT 1.1" map to AVISIT='' and AVISITN=. ?
When
Visit="UNSCHEDULED VISIT 3.1" maps to AVISIT='Visit 3/Day 29` and AVISITN=3
In all other cases AVISITN is equal to AVISITNUM, so nothing to do there really.
A report of the WANT transformation from VISIT to AVISIT
proc freq noprint data=dl.v_want; tables visit * avisit / out=mapfreq; proc print data=mapfreq; run;
Shows
| VISIT | AVISIT | COUNT | PERCENT |
|---|---|---|---|
| UNSCHEDULED VISIT 1.1 | 9 | . | |
| UNSCHEDULED VISIT 2.1 | Visit 2/Day 15 | 3 | 0.0693 |
| UNSCHEDULED VISIT 3.1 | Visit 3/Day 29 | 3 | 0.0693 |
| VISIT 1 / BASELINE / DAY 1 | Visit 1/Baseline | 1467 | 33.8643 |
| VISIT 2 / INTERIM / DAY 15 (+/- 3 DAYS) | Visit 2/Day 15 | 1428 | 32.9640 |
| VISIT 3 / END OF STUDY / EARLY TERMINATION / DAY 29 (+/- 4 DAYS) | Visit 3/Day 29 | 1431 | 33.0332 |
So is the real question how to compute AVISIT given VISIT ?
v_have is raw data, by using this data create AVISIT AVISITN VISIT VISITNUM
for exp:could you please look at subject 13-0036 LBORRES is Quantity not sufficient after that LBORRES is still having values so we skip the visitnum =1 and take visitnum =1.1
look at subject : 16-0066 visitnum have 1 and 1.1 so we skip the 1.1 but we want only visitnum 1
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.