<?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 Instrumental variable analysis in SAS in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Instrumental-variable-analysis-in-SAS/m-p/658267#M31533</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use SAS to fit an instrumental variable analysis on a binary outcome. From what I could find online, this can be done using the 2SLS estimator in proc syslin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data are as follows: death (outcome, yes/no), gene (exposure, class variable), which regulates "normalized" (mediator, continuous variable). The value of "normalized" is also affected by cohort, female, trg_i, and crp_log. What I want to know is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. If "normalized" (as an instrumental variable) is a causal risk factor for death.&lt;/P&gt;&lt;P&gt;2. If there is evidence for bias when using "normalized" as an observational variable vs. as an instrumental variable (using the&amp;nbsp;Durbin-Wu-Hausman test) on risk of death.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc syslin data=causalmed 2sls;&lt;BR /&gt;endogenous normalized;&lt;BR /&gt;instruments gene cohort female trg_i crp_log;&lt;BR /&gt;model normalized = gene cohort female trg_i crp_log;&lt;BR /&gt;model death = normalized cohort female trg_i crp_log;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc model data=causalmed;&lt;BR /&gt;endogenous normalized;&lt;BR /&gt;instruments gene;&lt;BR /&gt;death = pnormalized*normalized + interc;&lt;BR /&gt;fit death / ols 2sls hausman;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is my code correct? Any help would be much appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Sat, 13 Jun 2020 12:43:32 GMT</pubDate>
    <dc:creator>greveam</dc:creator>
    <dc:date>2020-06-13T12:43:32Z</dc:date>
    <item>
      <title>Instrumental variable analysis in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Instrumental-variable-analysis-in-SAS/m-p/658267#M31533</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use SAS to fit an instrumental variable analysis on a binary outcome. From what I could find online, this can be done using the 2SLS estimator in proc syslin?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data are as follows: death (outcome, yes/no), gene (exposure, class variable), which regulates "normalized" (mediator, continuous variable). The value of "normalized" is also affected by cohort, female, trg_i, and crp_log. What I want to know is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. If "normalized" (as an instrumental variable) is a causal risk factor for death.&lt;/P&gt;&lt;P&gt;2. If there is evidence for bias when using "normalized" as an observational variable vs. as an instrumental variable (using the&amp;nbsp;Durbin-Wu-Hausman test) on risk of death.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc syslin data=causalmed 2sls;&lt;BR /&gt;endogenous normalized;&lt;BR /&gt;instruments gene cohort female trg_i crp_log;&lt;BR /&gt;model normalized = gene cohort female trg_i crp_log;&lt;BR /&gt;model death = normalized cohort female trg_i crp_log;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc model data=causalmed;&lt;BR /&gt;endogenous normalized;&lt;BR /&gt;instruments gene;&lt;BR /&gt;death = pnormalized*normalized + interc;&lt;BR /&gt;fit death / ols 2sls hausman;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is my code correct? Any help would be much appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2020 12:43:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Instrumental-variable-analysis-in-SAS/m-p/658267#M31533</guid>
      <dc:creator>greveam</dc:creator>
      <dc:date>2020-06-13T12:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Instrumental variable analysis in SAS</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Instrumental-variable-analysis-in-SAS/m-p/658343#M31538</link>
      <description>If I was right. PROC SYSLIN is under SAS/ETS , so post it at Forecasting Forum .</description>
      <pubDate>Sun, 14 Jun 2020 11:12:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Instrumental-variable-analysis-in-SAS/m-p/658343#M31538</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-14T11:12:22Z</dc:date>
    </item>
  </channel>
</rss>

