<?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 LSmeans for all treatments vs LSmeans for single treatment in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/LSmeans-for-all-treatments-vs-LSmeans-for-single-treatment/m-p/919821#M45682</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to look at the LSmeans and SE for all of my data (not separated by treatment). I tried using a simple code to look at it, but it gives an estimate for each experimental unit (same as observation value), standard error and of 0 and no other values. Here is that code:&lt;/P&gt;&lt;PRE&gt;/* LS means calc */
proc mixed data=fetus_truie;
class truie;
model nbr_pig=truie;
lsmeans truie;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I used to do LSmeans (&amp;amp;other stats) separated by treatment (trait):&lt;/P&gt;&lt;PRE&gt;proc mixed data=fetus_truie;
  class TRAIT truie;
  model NBR_PIG=TRAIT/alpha=0.05 noint;
  repeated / group=TRAIT;
  ods output tests3=tests;
  lsmeans TRAIT / cl;
  ods output lsmeans=lsm;
run;&lt;/PRE&gt;&lt;P&gt;Is the average LSmeans and SE for each treatment equal to the LSmeans and SE for all the data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2024 18:28:38 GMT</pubDate>
    <dc:creator>caroline_rg</dc:creator>
    <dc:date>2024-03-11T18:28:38Z</dc:date>
    <item>
      <title>LSmeans for all treatments vs LSmeans for single treatment</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSmeans-for-all-treatments-vs-LSmeans-for-single-treatment/m-p/919821#M45682</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to look at the LSmeans and SE for all of my data (not separated by treatment). I tried using a simple code to look at it, but it gives an estimate for each experimental unit (same as observation value), standard error and of 0 and no other values. Here is that code:&lt;/P&gt;&lt;PRE&gt;/* LS means calc */
proc mixed data=fetus_truie;
class truie;
model nbr_pig=truie;
lsmeans truie;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code I used to do LSmeans (&amp;amp;other stats) separated by treatment (trait):&lt;/P&gt;&lt;PRE&gt;proc mixed data=fetus_truie;
  class TRAIT truie;
  model NBR_PIG=TRAIT/alpha=0.05 noint;
  repeated / group=TRAIT;
  ods output tests3=tests;
  lsmeans TRAIT / cl;
  ods output lsmeans=lsm;
run;&lt;/PRE&gt;&lt;P&gt;Is the average LSmeans and SE for each treatment equal to the LSmeans and SE for all the data?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 18:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSmeans-for-all-treatments-vs-LSmeans-for-single-treatment/m-p/919821#M45682</guid>
      <dc:creator>caroline_rg</dc:creator>
      <dc:date>2024-03-11T18:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: LSmeans for all treatments vs LSmeans for single treatment</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSmeans-for-all-treatments-vs-LSmeans-for-single-treatment/m-p/919857#M45683</link>
      <description>&lt;P&gt;It sounds like your TRUIE variable uniquely identifies each experimental unit. If that is correct and you just want an overall mean estimate (which assumes all units come from the same population), then the intercept in an intercept-only model estimates it.&amp;nbsp; Of course, in that case you don't really need to fit a model and can just use PROC MEANS.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=fetus_truie;
model nbr_pig= / s;
run;
proc means data=fetus_truie mean stderr; 
var nbr_pig; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Mar 2024 20:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSmeans-for-all-treatments-vs-LSmeans-for-single-treatment/m-p/919857#M45683</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2024-03-11T20:59:28Z</dc:date>
    </item>
  </channel>
</rss>

