Hello,
I am trying to create a graph that has multiple plots. The data should all have the same general behavior, but over different timeframes. I have uploaded an example similar to what I will be plotting.
My data currently has time on the x-axis rather than the synchrony level shown above. I want all plots to be anchored or joined at the data point indicated by the number 3 in the image above (once the Y-values begin rising significantly). The reason for this is because the data has different timeframes for the overall experiment (the rise in values does not always occur at the same time), but I need to analyze outliers based on differences between the plots and linking them when the y-value increases will be instrumental in doing this.
DATA WORK.VALUE;
FORMAT
EXPERIMENTKEY
Description
TIMESTAMP
Translated;
SET WORK.TRANSLATED;
ResponseTimeMS = dif(TIMESTAMP);
ValueDifference = dif(Translated);
ResponseTime=ifn(first.EXPERIMENTKEY, ., dif(TIMESTAMP));
difValue=ifn(first.EXPERIMENTKEY, ., dif(Translated));
IF (difValue < 100) THEN DO;
TransitionLowToHigh = 'N';
END;
ELSE TransitionLowToHigh = 'Y';
BY EXPERIMENTKEY TIMESTAMP;
RUN;
My idea was to use the first TransitionLowToHigh with a Y value as a way to join the plots at that time. Unfortunately I don't know that it is possible. Is there a way to do this in SAS?
Hi Reeza,
Thank you for the reply. I have attached a picture of the plots with circles indicating the points that I am trying to anchor/join. I would like to shift the data to the data plotted on the far right, but am open to any method that allows me to anchor/join the data at the requested points.
My data follows:
EXPERIMENTKEY | Translated | TIMESTAMP | TransitionLowToHigh |
72040654 | 788 | 330 | N |
72040654 | 793 | 677 | N |
72040654 | 795 | 1015 | N |
72040654 | 796 | 1380 | N |
72040654 | 795 | 1765 | N |
72040654 | 808 | 8168 | N |
72040654 | 802 | 14608 | N |
72040654 | 801 | 21049 | N |
72040654 | 802 | 21408 | N |
72040654 | 803 | 21763 | N |
72040654 | 809 | 22115 | N |
72040654 | 804 | 22468 | N |
72040654 | 805 | 22822 | N |
72040654 | 804 | 23181 | N |
72040654 | 826 | 23536 | N |
72040654 | 989 | 23886 | Y |
72040654 | 1212 | 24238 | Y |
72040654 | 1372 | 24588 | Y |
72040654 | 1457 | 24943 | N |
72040654 | 1498 | 25318 | N |
72040654 | 1516 | 25715 | N |
72040654 | 1523 | 26079 | N |
72040654 | 1709 | 32480 | Y |
72040654 | 1682 | 38861 | N |
72040802 | 669 | 338 | N |
72040802 | 670 | 696 | N |
72040802 | 675 | 1073 | N |
72040802 | 674 | 1433 | N |
72040802 | 664 | 1788 | N |
72040802 | 692 | 49776 | N |
72040802 | 689 | 50135 | N |
72040802 | 700 | 50500 | N |
72040802 | 698 | 50850 | N |
72040802 | 692 | 51215 | N |
72040802 | 691 | 51573 | N |
72040802 | 688 | 51930 | N |
72040802 | 693 | 52292 | N |
72040802 | 686 | 52655 | N |
72040802 | 688 | 53013 | N |
72040802 | 679 | 53386 | N |
72040802 | 676 | 53748 | N |
72040802 | 668 | 54094 | N |
72040802 | 686 | 54469 | N |
72040802 | 684 | 54826 | N |
72040802 | 678 | 55202 | N |
72040802 | 683 | 55552 | N |
72040802 | 686 | 55904 | N |
72040802 | 694 | 56257 | N |
72040802 | 684 | 56609 | N |
72040802 | 687 | 56955 | N |
72040802 | 708 | 57342 | N |
72040802 | 1292 | 57707 | Y |
72040802 | 2600 | 58082 | Y |
72040802 | 3292 | 58453 | Y |
72040802 | 2830 | 58833 | N |
72040802 | 2220 | 59209 | N |
72040802 | 1644 | 59588 | N |
72040802 | 1833 | 59949 | Y |
72040802 | 2010 | 60323 | Y |
72040802 | 2151 | 60673 | Y |
72040802 | 2193 | 67135 | N |
72040802 | 2272 | 73605 | N |
72041266 | 697 | 338 | N |
72041266 | 706 | 702 | N |
72041266 | 704 | 1100 | N |
72041266 | 701 | 1506 | N |
72041266 | 696 | 1875 | N |
72041266 | 701 | 8320 | N |
72041266 | 703 | 14740 | N |
72041266 | 2039 | 21201 | Y |
72041266 | 2044 | 21602 | N |
72041266 | 2046 | 21961 | N |
72041266 | 2066 | 22325 | N |
72041266 | 2088 | 22693 | N |
72041266 | 2129 | 29113 | N |
72041266 | 2119 | 35532 | N |
72041296 | 809 | 805 | N |
72041296 | 807 | 1719 | N |
72041296 | 815 | 2613 | N |
72041296 | 826 | 3468 | N |
72041296 | 828 | 4347 | N |
72041296 | 805 | 5971 | N |
72041296 | 831 | 7608 | N |
72041296 | 823 | 9259 | N |
72041296 | 821 | 10954 | N |
72041296 | 823 | 12587 | N |
72041296 | 806 | 14268 | N |
72041296 | 847 | 15922 | N |
72041296 | 800 | 17572 | N |
72041296 | 817 | 19207 | N |
72041296 | 838 | 20852 | N |
72041296 | 796 | 21710 | N |
72041296 | 808 | 22550 | N |
72041296 | 831 | 23393 | N |
72041296 | 813 | 24356 | N |
72041296 | 833 | 25257 | N |
72041296 | 836 | 26071 | N |
72041296 | 829 | 26910 | N |
72041296 | 826 | 27769 | N |
72041296 | 813 | 28644 | N |
72041296 | 839 | 29464 | N |
72041296 | 834 | 30306 | N |
72041296 | 825 | 31155 | N |
72041296 | 820 | 31996 | N |
72041296 | 844 | 32840 | N |
72041296 | 840 | 33684 | N |
72041296 | 815 | 34560 | N |
72041296 | 811 | 35378 | N |
72041296 | 811 | 36219 | N |
72041296 | 821 | 37077 | N |
72041296 | 810 | 37948 | N |
72041296 | 835 | 38764 | N |
72041296 | 831 | 39604 | N |
72041296 | 811 | 40450 | N |
72041296 | 842 | 41296 | N |
72041296 | 830 | 42140 | N |
72041296 | 825 | 42985 | N |
72041296 | 847 | 43844 | N |
72041296 | 816 | 44667 | N |
72041296 | 807 | 45505 | N |
72041296 | 835 | 46342 | N |
72041296 | 809 | 47162 | N |
72041296 | 831 | 48000 | N |
72041296 | 827 | 48842 | N |
72041296 | 836 | 49685 | N |
72041296 | 822 | 50556 | N |
72041296 | 817 | 51457 | N |
72041296 | 821 | 52332 | N |
72041296 | 847 | 53175 | N |
72041296 | 813 | 54021 | N |
72041296 | 829 | 54899 | N |
72041296 | 807 | 55768 | N |
72041296 | 837 | 56582 | N |
72041296 | 809 | 57424 | N |
72041296 | 848 | 58281 | N |
72041296 | 828 | 59157 | N |
72041296 | 818 | 59987 | N |
72041296 | 841 | 60851 | N |
72041296 | 821 | 61706 | N |
72041296 | 819 | 62565 | N |
72041296 | 784 | 63429 | N |
72041296 | 837 | 64289 | N |
72041296 | 840 | 65107 | N |
72041296 | 789 | 65942 | N |
72041296 | 803 | 66804 | N |
72041296 | 814 | 67641 | N |
72041296 | 853 | 68487 | N |
72041296 | 833 | 69336 | N |
72041296 | 814 | 70162 | N |
72041296 | 806 | 70989 | N |
72041296 | 838 | 71859 | N |
72041296 | 817 | 72723 | N |
72041296 | 830 | 73537 | N |
72041296 | 827 | 74378 | N |
72041296 | 844 | 75252 | N |
72041296 | 838 | 76127 | N |
72041296 | 821 | 76940 | N |
72041296 | 800 | 77779 | N |
72041296 | 822 | 78637 | N |
72041296 | 836 | 79557 | N |
72041296 | 807 | 80377 | N |
72041296 | 854 | 81214 | N |
72041296 | 788 | 82055 | N |
72041296 | 812 | 82864 | N |
72041296 | 827 | 83701 | N |
72041296 | 815 | 84567 | N |
72041296 | 838 | 85404 | N |
72041296 | 821 | 86249 | N |
72041296 | 824 | 87092 | N |
72041296 | 828 | 87966 | N |
72041296 | 821 | 88783 | N |
72041296 | 830 | 89627 | N |
72041296 | 852 | 90455 | N |
72041296 | 827 | 91280 | N |
72041296 | 796 | 92145 | N |
72041296 | 828 | 93003 | N |
72041296 | 810 | 93862 | N |
72041296 | 817 | 94739 | N |
72041296 | 829 | 95556 | N |
72041296 | 819 | 96412 | N |
72041296 | 803 | 97249 | N |
72041296 | 812 | 98093 | N |
72041296 | 821 | 98904 | N |
72041296 | 810 | 99749 | N |
72041296 | 796 | 100616 | N |
72041296 | 831 | 101437 | N |
72041296 | 810 | 102274 | N |
72041296 | 818 | 103121 | N |
72041296 | 837 | 103978 | N |
72041296 | 823 | 104802 | N |
72041296 | 848 | 105646 | N |
72041296 | 827 | 106539 | N |
72041296 | 1597 | 107432 | Y |
72041296 | 2145 | 108274 | Y |
72041296 | 1426 | 109117 | N |
72041296 | 2140 | 109934 | Y |
72041296 | 2523 | 110780 | Y |
72041296 | 2313 | 112418 | N |
72041296 | 2367 | 114055 | N |
72041296 | 2385 | 115717 | N |
72041296 | 2406 | 117369 | N |
72041296 | 2427 | 119005 | N |
72041296 | 2367 | 120654 | N |
72041296 | 2310 | 122354 | N |
72041296 | 2291 | 124047 | N |
72041296 | 2310 | 125666 | N |
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.