<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create three visits, once every 30 days starting at the baseline visit date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817598#M322720</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;BLOCKQUOTE&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN&gt;create another dataset that schedules subjects for their next three visits, once every 30 days starting at the baseline visit date, for a total of four visits per subjects. Each of the visits should appear as a new observation with the original subject information, the median grouping, the corresponding visit date, and a visit number (0, 1, 2, or 3).&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    do visit_number=0 to 3;
        visit_date=baseline_date+30*visit_number;
        output;
    end;
    format visit_date date9.;
run;
    &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know what "median grouping" means, so I didn't address that part of the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jun 2022 15:34:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-06-11T15:34:15Z</dc:date>
    <item>
      <title>How to create three visits, once every 30 days starting at the baseline visit date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817593#M322716</link>
      <description>&lt;P&gt;Please, anyone, help me with the question!&lt;BR /&gt;I spent days but I could not do it!&lt;BR /&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;create another dataset that schedules subjects for their next three visits, once every 30 days starting at the baseline visit date, for a total of four visits per subjects. Each of the visits should appear as a new observation with the original subject information, the median grouping, the corresponding visit date, and a visit number (0, 1, 2, or 3).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What I did was created variables with visit1, visit2 and visit 3. I do not think it's correct at all because she wants 30 days between each visit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* MEDIAN;&lt;BR /&gt;PROC MEANS DATA = INFO MEAN MEDIAN Q3 Q1;&lt;BR /&gt;VAR B_Cholesterol; RUN;&lt;BR /&gt;PROC UNIVARIATE DATA = INFO;&lt;BR /&gt;VAR B_Cholesterol; RUN;&lt;BR /&gt;proc sql;&lt;BR /&gt;create table want as&lt;BR /&gt;select Median(B_Cholesterol) as med&lt;BR /&gt;from info;&lt;BR /&gt;quit;&lt;BR /&gt;*to create a variable that groups subjects as less than or equal to&lt;BR /&gt;the median, or more than the median;&lt;BR /&gt;PROC SQL;&lt;BR /&gt;create table want as&lt;BR /&gt;select B_Cholesterol as median&lt;BR /&gt;from info&lt;BR /&gt;where B_Cholesterol &amp;gt;= 220;&lt;BR /&gt;quit;&lt;BR /&gt;*Creating visit number for longitudinal data;&lt;BR /&gt;DATA vis;&lt;BR /&gt;set info;&lt;BR /&gt;Visit1=1;&lt;BR /&gt;Visit2=2;&lt;BR /&gt;Visit3=3;&lt;BR /&gt;RUN; PROC PRINT DATA = vis; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 11 Jun 2022 13:08:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817593#M322716</guid>
      <dc:creator>Malk020</dc:creator>
      <dc:date>2022-06-11T13:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create three visits, once every 30 days starting at the baseline visit date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817595#M322717</link>
      <description>&lt;P&gt;no, that does not look correct. can you post your sample data? you might want to look up intnx function.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 13:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817595#M322717</guid>
      <dc:creator>tarheel13</dc:creator>
      <dc:date>2022-06-11T13:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create three visits, once every 30 days starting at the baseline visit date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817598#M322720</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;BLOCKQUOTE&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;&lt;SPAN&gt;create another dataset that schedules subjects for their next three visits, once every 30 days starting at the baseline visit date, for a total of four visits per subjects. Each of the visits should appear as a new observation with the original subject information, the median grouping, the corresponding visit date, and a visit number (0, 1, 2, or 3).&lt;/SPAN&gt;&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/BLOCKQUOTE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    do visit_number=0 to 3;
        visit_date=baseline_date+30*visit_number;
        output;
    end;
    format visit_date date9.;
run;
    &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know what "median grouping" means, so I didn't address that part of the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 15:34:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-three-visits-once-every-30-days-starting-at-the/m-p/817598#M322720</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-06-11T15:34:15Z</dc:date>
    </item>
  </channel>
</rss>

