<?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: Adjust=simulate, how does it adjust? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301442#M60604</link>
    <description>&lt;P&gt;Thank you so much for your reply. &amp;nbsp;Can I ask you please to clarify a few things for me please? &amp;nbsp;I really want to understand this.&lt;/P&gt;&lt;P&gt;* When you say "&lt;SPAN&gt;simulate a bunch of values from the appropriate MVN distribution (actually multivariate&amp;nbsp;t)". &amp;nbsp;Do you mean, generate a lot of datasets, say 100 to keep things simple, from a mvt which has means which match the means of your k contrasts/estimates and covariance that matches the covariance of your k contrasts/means?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* Then you say "use quantiles of the&amp;nbsp;simulated distribution of estimates to find the critical value (delta) that works simultaneously for all the estimates.". &amp;nbsp;My guess at what this means is, for the each&amp;nbsp;datasets you have simulated, calculate the value of each of the k contrasts, so if k=2, and 100 datasets, you have 100 values for each contrast. &amp;nbsp;Then I'm not sure how you find the critical value. &amp;nbsp;You mention later to use (1-alpha)th quantile. &amp;nbsp;So if alpha is 5%, is the 95th ordered value from the 100 values I have for each k my critical value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*Then "Make a bunch of draws of the form (t1, t2, ..., tk) and for each draw compute the statistic max(|t1|, ..., |tk|).". &amp;nbsp;I'm lost here, am I randomly selecting a value from the 100 values I have for each k, so in my case I would have two values, then select the max of these and build up a distribution of these I guess. &amp;nbsp;Sorry, I'm not sure what happens now.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Sep 2016 06:44:44 GMT</pubDate>
    <dc:creator>Jthomas2</dc:creator>
    <dc:date>2016-09-29T06:44:44Z</dc:date>
    <item>
      <title>Adjust=simulate, how does it adjust?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301201#M60583</link>
      <description>&lt;P&gt;Hi, I am trying to understand what adjust=simulate does (within the lsmestimate option in proc mixed and other procs, SAS 9.4). &amp;nbsp;I am comfortable with what it is doing at a high level, but I can not get my head around how it does it. &amp;nbsp;I have read the reference below and the on line help in SAS (also below) but I am finding it hard to grasp the principle of how the the adjustment is done. &amp;nbsp;I believe simulations are done and the contrasts are calculated for the specified contrasts for each simulation and a p-value is obtained from a mutivariate t but I'm unclear on how the simulations are generated and how the adjusted p-value is obtained. &amp;nbsp;A simple explanation or even examples would be great. &amp;nbsp;I have emailed SAS but they have no further info they can provide to me. &amp;nbsp;thank you.&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;&lt;A href="https://www.jstor.org/stable/2531545?seq=1#page_scan_tab_contents" target="_blank"&gt;Edwards, D. and Berry, J. J. (1987), "The Efficiency of Simulation-Based Multiple Comparisons," Biometrics, 43, 913 - 928&lt;/A&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_details29.htm#statug.glm.glmmcapprox" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_details29.htm#statug.glm.glmmcapprox&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 10:30:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301201#M60583</guid>
      <dc:creator>Jthomas2</dc:creator>
      <dc:date>2016-09-28T10:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust=simulate, how does it adjust?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301306#M60594</link>
      <description>&lt;P&gt;It's basically a multivariate generalization of &lt;A href="http://blogs.sas.com/content/iml/2016/09/08/coverage-probability-confidence-intervals.html" target="_self"&gt;using simulation to estimate the coverage probability of a 1-D confidence interval.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suppose you want to estimate ONE linear combination of the betas: c`*beta. You also want a CI. The statistic c`*beta is normally distributed, so&amp;nbsp;the CI will be of the form&lt;/P&gt;
&lt;P&gt;c`*beta +/- delta * stderr(c`*beta).&lt;/P&gt;
&lt;P&gt;The challenge is to choose delta. For simple estimates (like c=(1 0 0 .. 0)), you can choose delta to be a critical value of the&amp;nbsp;t distribution: delta=t(1-alpha/2, df). &amp;nbsp; The t distribution is used instead of the normal distribution to adjust for the finite sample size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now suppose that you have k&amp;nbsp;linear combinations and you want SIMULTANEOUS CIs. &lt;SPAN&gt;The k estimates are jointly MVN with mean and covariance that can be computed because you are assuming a GLM. So simulate a bunch of values from the appropriate MVN distribution (actually multivariate&amp;nbsp;t) and then use quantiles of the&amp;nbsp;simulated distribution of estimates to find the critical value (delta) that works simultaneously for all the estimates. &amp;nbsp;Make a bunch of draws of the form (t1, t2, ..., tk) and for each draw compute the statistic max(|t1|, ..., |tk|). &amp;nbsp;The union of those max statistics has an empirical distribution. The Edwards/Berrry paper says that you can choose delta to be the &amp;nbsp;(1-alpha)th quantile of the empirical distribution. &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 14:46:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301306#M60594</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-09-28T14:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust=simulate, how does it adjust?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301442#M60604</link>
      <description>&lt;P&gt;Thank you so much for your reply. &amp;nbsp;Can I ask you please to clarify a few things for me please? &amp;nbsp;I really want to understand this.&lt;/P&gt;&lt;P&gt;* When you say "&lt;SPAN&gt;simulate a bunch of values from the appropriate MVN distribution (actually multivariate&amp;nbsp;t)". &amp;nbsp;Do you mean, generate a lot of datasets, say 100 to keep things simple, from a mvt which has means which match the means of your k contrasts/estimates and covariance that matches the covariance of your k contrasts/means?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* Then you say "use quantiles of the&amp;nbsp;simulated distribution of estimates to find the critical value (delta) that works simultaneously for all the estimates.". &amp;nbsp;My guess at what this means is, for the each&amp;nbsp;datasets you have simulated, calculate the value of each of the k contrasts, so if k=2, and 100 datasets, you have 100 values for each contrast. &amp;nbsp;Then I'm not sure how you find the critical value. &amp;nbsp;You mention later to use (1-alpha)th quantile. &amp;nbsp;So if alpha is 5%, is the 95th ordered value from the 100 values I have for each k my critical value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*Then "Make a bunch of draws of the form (t1, t2, ..., tk) and for each draw compute the statistic max(|t1|, ..., |tk|).". &amp;nbsp;I'm lost here, am I randomly selecting a value from the 100 values I have for each k, so in my case I would have two values, then select the max of these and build up a distribution of these I guess. &amp;nbsp;Sorry, I'm not sure what happens now.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 06:44:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301442#M60604</guid>
      <dc:creator>Jthomas2</dc:creator>
      <dc:date>2016-09-29T06:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adjust=simulate, how does it adjust?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301478#M60606</link>
      <description>&lt;P&gt;What is your statistical background and previous experience with simulation methods in statistics? &amp;nbsp;From your questions, it sounds like you need to start with simpler situations to better unerstand the main ideas.&amp;nbsp;Try reading about&amp;nbsp;&lt;A href="http://blogs.sas.com/content/iml/2013/05/30/simulation-power.html" target="_self"&gt;using simulation to estimate the power of a statistical test&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="http://blogs.sas.com/content/iml/2015/10/28/simulation-exact-tables.html" target="_self"&gt;Monte Carlo methods for contingency tables in SAS&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also what is the application here? Are you merely intellectually curious about the details of the algorithm? Or do you need to implement a similar algoithm in a different situation?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2016 09:46:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adjust-simulate-how-does-it-adjust/m-p/301478#M60606</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-09-29T09:46:30Z</dc:date>
    </item>
  </channel>
</rss>

