Treatment_No | Time | Subject | Subject_Group | Day | Period | Conc | Dose |
B | 0 | 1 | 1 | 1 | 2 | 0 | 125 |
B | 0.5 | 1 | 1 | 1 | 2 | 95.9 | 125 |
B | 1 | 1 | 1 | 1 | 2 | 381 | 125 |
B | 2 | 1 | 1 | 1 | 2 | 646 | 125 |
B | 3 | 1 | 1 | 1 | 2 | 751 | 125 |
B | 4 | 1 | 1 | 1 | 2 | 1130 | 125 |
B | 6 | 1 | 1 | 1 | 2 | 1070 | 125 |
B | 8 | 1 | 1 | 1 | 2 | 965 | 125 |
B | 12 | 1 | 1 | 1 | 2 | 919 | 125 |
B | 24 | 1 | 1 | 1 | 2 | 729 | 125 |
B | 48 | 1 | 1 | 1 | 2 | 234 | 125 |
B | 72 | 1 | 1 | 1 | 2 | 67.3 | 125 |
B | 96 | 1 | 1 | 1 | 2 | 18.4 | 125 |
B | 120 | 1 | 3 | 2 | 80 | ||
B | 0 | 1 | 1 | 5 | 2 | 0 | 60 |
B | 0.5 | 1 | 1 | 5 | 2 | 111 | 60 |
B | 1 | 1 | 1 | 5 | 2 | 1020 | 60 |
B | 2 | 1 | 1 | 5 | 2 | 1210 | 60 |
B | 3 | 1 | 1 | 5 | 2 | 1130 | 60 |
B | 4 | 1 | 1 | 5 | 2 | 1260 | 60 |
B | 6 | 1 | 1 | 5 | 2 | 855 | 60 |
B | 8 | 1 | 1 | 5 | 2 | 778 | 60 |
B | 12 | 1 | 1 | 5 | 2 | 757 | 60 |
B | 24 | 1 | 1 | 5 | 2 | 780 | 60 |
B | 48 | 1 | 1 | 5 | 2 | 177 | 60 |
B | 72 | 1 | 1 | 5 | 2 | 49.6 | 60 |
B | 96 | 1 | 1 | 5 | 2 | 16 | 60 |
I have this hypothetical datasets and i am trying to generate the conc*time. I need day 1 time start from the 0-96 hr (x-axis), then need a gap on x-axis for Day 2 and then start day 3 time 0 to 96 hr on x-axis.
Here is what i did, i converted the day 2 and day 5 time by multiplying time by 24 hr. This gave me continuous time from 0 to let say 234 (dont quote on this) hr and plot the data using the below code.The problem is plot gave me x-axis tick 0-234, as expected. However, I need x-axis tick 0-96 (day1), day2, 0-96 (day5).
goption reset=global;
axis1 value=(font=swissb h=0.2800 cm)
label=(font=swissb h=0.2800 cm "Time (hr)")
offset=(2 pct,)
minor=none
order=(0 to 240 by 12);
axis2 value=( font=swissb justify=right h=0.3000 cm)
offset=(2 pct,)
minor=none
logbase= 10
/*order=(0 to 1200 by 100)*/
label=(font=swissb angle=90 h=0.4800 cm " Concentration (ng/mL)");
proc gplot data=B;
PLOT conc*time / HAXIS=AXIS1 VAXIS=AXIS2 nolegend noframe des="" skipmiss;
symbol1 c=black interpol=joine l=1 w=1 r=1;
run;
Thanks
What version of SAS are you using?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.