<?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: Calculating weight for site effect based on standard error in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902848#M44766</link>
    <description>&lt;P&gt;You can use a WEIGHT in PROC MIXED, but I think it is computed the same as for linear regression or ANOVA. The weight is not based on the LSMEANs but on the actual data.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Nov 2023 20:01:46 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-11-13T20:01:46Z</dc:date>
    <item>
      <title>Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902835#M44761</link>
      <description>&lt;P&gt;Hello, I am trying to explore the site effect in a clinical study where the site effect is significant. I have to find the weighted estimate using the proc mixed model "where the weight of each site is the inverse of the variance of each site estimate (which equals the inverse of the square of the standard error of each site estimate)."&lt;/P&gt;&lt;P&gt;Am I able to use the standard errors produced by the ls means statement to produce the&amp;nbsp; “standard error of each site estimate”?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 18:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902835#M44761</guid>
      <dc:creator>ashmork</dc:creator>
      <dc:date>2023-11-13T18:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902838#M44762</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/460020"&gt;@ashmork&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, I am trying to explore the site effect in a clinical study where the site effect is significant. I have to find the weighted estimate using the proc mixed model "where the weight of each site is the inverse of the variance of each site estimate (which equals the inverse of the square of the standard error of each site estimate)."&lt;/P&gt;
&lt;P&gt;Am I able to use the standard errors produced by the ls means statement to produce the&amp;nbsp; “standard error of each site estimate”?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Is the reason you ask because you want to create a weighted regression? In that case, you can see a solution here:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Weighted-Least-Square-for-Simple-Linear-Regression/m-p/529913#M144867" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Weighted-Least-Square-for-Simple-Linear-Regression/m-p/529913#M144867&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or do you have some other reason for wanting this?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 19:12:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902838#M44762</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-13T19:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902839#M44763</link>
      <description>Hello,&lt;BR /&gt;Thanks for your apply. Is this able to be done with a linear mixed model?&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Nov 2023 19:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902839#M44763</guid>
      <dc:creator>ashmork</dc:creator>
      <dc:date>2023-11-13T19:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902841#M44764</link>
      <description>&lt;P&gt;I don't understand. I don't see where you have answered my question.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 19:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902841#M44764</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-13T19:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902843#M44765</link>
      <description>I might be able to do a regression model but my statistical plan specifically references a linear mixed model. So I wanted to know if this estimate, p-value, and CI can be done by a linear mixed model through proc mixed instead of proc reg?&lt;BR /&gt;</description>
      <pubDate>Mon, 13 Nov 2023 19:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902843#M44765</guid>
      <dc:creator>ashmork</dc:creator>
      <dc:date>2023-11-13T19:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902848#M44766</link>
      <description>&lt;P&gt;You can use a WEIGHT in PROC MIXED, but I think it is computed the same as for linear regression or ANOVA. The weight is not based on the LSMEANs but on the actual data.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 20:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902848#M44766</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-11-13T20:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902922#M44776</link>
      <description>&lt;P&gt;Are you doing META analysis ?&lt;BR /&gt;And trying to get stderr of effect size estimation for each siteid&amp;nbsp; ?&lt;BR /&gt;By my side, I think your are right, you could use stderr generated by LSMEANS .&lt;BR /&gt;&lt;BR /&gt;But &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt; , &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13758"&gt;@lvm&lt;/a&gt; &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt; know more things.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 06:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902922#M44776</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-11-14T06:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902924#M44777</link>
      <description>&lt;P&gt;If you are doing META Analysis ,you could try this formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1699943360908.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/89725i981E9E9D39BDA436/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1699943360908.png" alt="Ksharp_0-1699943360908.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 06:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/902924#M44777</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-11-14T06:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/903042#M44788</link>
      <description>&lt;P&gt;It is not clear what you are trying to do here. It appears to me that you want to do a meta-analysis. That is, you have results from each site (means, SEs, ...), and now you want to combine to determine an overall mean and SE (effect size mean for the population of sites). If that is what you are doing, MIXED or GLIMMIX can certainly be used, where one overrides the residual with a weight term. There are tricks to the coding that are not obvious. But I don't know if that is what you are trying to do. It is possible that you simply want a hierarchical linear mixed model, but with separate residual for each site, all in one analysis (no meta-analysis). That also can be done, where you get a different residual for each site (sort of like using weights).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't give you code until you more fully describe what you are trying to do. Maybe with a toy example.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 19:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/903042#M44788</guid>
      <dc:creator>lvm</dc:creator>
      <dc:date>2023-11-14T19:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating weight for site effect based on standard error</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/903652#M44826</link>
      <description>&lt;P&gt;Hmm, that does depend on what your objective is, but I will take a swing at it without knowing what your data is (site means, SDs and Ns, or raw data).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The point I want to address is whether to treat site as a fixed effect (inference is only to the sites included) or a random effect (inference is to all possible sites). All of this assumes using PROC GLIMMIX, as I am fairly certain you are not looking at data with normally distributed residuals if it is primary endpoint clinical data. So, considering SITE as a fixed effect, here is code that will yield a variance estimate for each site:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=your_data;
class site treatment;
model response = treatment/dist= &amp;lt;insert appropriate distribution here&amp;gt;;
random _residual_/group=site;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For SITE as a random effect, you could try:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=your_data;
class site treatment;
model response = treatment/dist= &amp;lt;insert appropriate distribution here&amp;gt;;
random intercept/subject=site solution;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Using ODS output statements, you can get the variance estimates for each site from code like this. Weights can then be calculated as 1/variance, merged back against the original dataset, and the data refit using a WEIGHT statement. The Type 3 F test for this analysis reflects any differences in treatment effect after weighting by site.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not a clinical biostatistician, but the meta-analyses I have seen generally treat site as a fixed effect. You might want to talk with others about the choice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 14:08:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-weight-for-site-effect-based-on-standard-error/m-p/903652#M44826</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-11-17T14:08:13Z</dc:date>
    </item>
  </channel>
</rss>

