<?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: Question about means ins SAS 9.4 in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675745#M23651</link>
    <description>&lt;P&gt;Until I see your data as SAS data step code, I can't respond to your specific question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does seem to me that PROC SORT and PROC TRANSPOSE are&amp;nbsp;&lt;EM&gt;not&lt;/EM&gt; needed, and you didn't even try the MEAN() function in a data step.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 20:22:24 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-08-10T20:22:24Z</dc:date>
    <item>
      <title>Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675713#M23647</link>
      <description>&lt;P&gt;Hi! I'm tryin to calculate a mean LS for a lac (see the print screen) Not every cow have the same number of test in their lactation.&amp;nbsp; How can I code SAS for this: Sum all the LS ne . then divide it by the number of LS ne . And put the result in a new variable called LSmean.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annie_Fréchette_0-1597083852648.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48107i1C77A41F8760CCB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Annie_Fréchette_0-1597083852648.png" alt="Annie_Fréchette_0-1597083852648.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks you very much!!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 18:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675713#M23647</guid>
      <dc:creator>Annie_Fréchette</dc:creator>
      <dc:date>2020-08-10T18:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675717#M23648</link>
      <description>&lt;P&gt;You can use the &lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0vl2htnkjkvejn1lsx2004n6dqp.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;MEAN() function&lt;/A&gt; in a data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Normally, and in the future, we ask you to provide data as &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;SAS data step code&lt;/A&gt; and not as screen captures. If you want us to write code to help you, please provide data in the desired form.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 18:42:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675717#M23648</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-10T18:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675718#M23649</link>
      <description>&lt;P&gt;Hi! Thank you, will try it! I wasn't sure what part of code I should write because I have just transposed a table...&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*1, tranposer pour avoir une seule ligne par lactation*/
proc sort data=qulac;
by no_ferme cow lac;
run;
proc transpose data=qulac out=qulact prefix=LS_;
var SCC_linear_score;
by no_ferme cow lac;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Should I create a small subsample of data (cards) at first?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, I'm tryin to follow the requests, but strugglin a little bit!;)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 18:55:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675718#M23649</guid>
      <dc:creator>Annie_Fréchette</dc:creator>
      <dc:date>2020-08-10T18:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675745#M23651</link>
      <description>&lt;P&gt;Until I see your data as SAS data step code, I can't respond to your specific question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does seem to me that PROC SORT and PROC TRANSPOSE are&amp;nbsp;&lt;EM&gt;not&lt;/EM&gt; needed, and you didn't even try the MEAN() function in a data step.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 20:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675745#M23651</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-10T20:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675754#M23653</link>
      <description>&lt;P&gt;hi Paige!&lt;/P&gt;&lt;P&gt;Sorry for everyhting, I accepted your first post cause I did add a mean function and it worked.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*1, tranposer pour avoir une seule ligne par lactation*/
proc sort data=qulac;
by no_ferme cow lac;
run;
proc transpose data=qulac out=qulact prefix=LS_;
var SCC_linear_score;
by no_ferme cow lac;
run;
/*2 calculer une moyenne par lactation*/
data qulact;
set qulact;
lsmean=mean(ls_1, ls_2, ls_3, ls_4, ls_5, ls_6, ls_7, ls_8, ls_9, ls_10, ls_11, ls_12, ls_13);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So you have answered my question, thanks again. I was writing a part of my "first" code because I tought that is what you have asked, but obviously it is not... I'm not really familiar with the use of macros and my data are sensitive, but in the future i will try my best to meet your demands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Annie&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 20:52:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675754#M23653</guid>
      <dc:creator>Annie_Fréchette</dc:creator>
      <dc:date>2020-08-10T20:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675761#M23654</link>
      <description>&lt;P&gt;Data on cows is "sensitive"? It's not like you are publishing a person's medical history. And in any event, if it is "sensitive", then you can make up fake data with fake cow ID to match your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 21:20:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675761#M23654</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-08-10T21:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Question about means ins SAS 9.4</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675784#M23656</link>
      <description>&lt;P&gt;Yep! These data are medical histories of these ladies... So it is treated just as humans data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I'll make up fake data next time!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again Paige!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 23:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Question-about-means-ins-SAS-9-4/m-p/675784#M23656</guid>
      <dc:creator>Annie_Fréchette</dc:creator>
      <dc:date>2020-08-10T23:18:39Z</dc:date>
    </item>
  </channel>
</rss>

