<?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 Help with Instrumental Variable approach with proc syslin in SAS Forecasting and Econometrics</title>
    <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Help-with-Instrumental-Variable-approach-with-proc-syslin/m-p/804646#M4405</link>
    <description>&lt;P&gt;I am attempting to perform an IV analysis to help account for unmeasured confounding in an observational study. Here is the summary of my dataset:&lt;/P&gt;&lt;P&gt;Outcome: &lt;EM&gt;wage&lt;/EM&gt; (continuous value - log transformed)&lt;/P&gt;&lt;P&gt;Primary exposure/dependent variable: &lt;EM&gt;education&lt;/EM&gt; - binary 1/0&lt;/P&gt;&lt;P&gt;IV: &lt;EM&gt;near&lt;/EM&gt;: binary 1/0 (meets all criteria for a reasonable IV&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var1-var8&lt;/EM&gt; - covariates/measured confounders all of which are 1/0 indicator variables, not associated with the IV.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to estimate the association of &lt;EM&gt;education&lt;/EM&gt; and &lt;EM&gt;wage&lt;/EM&gt; accounting for measured confounders and also unmeasured confounding via an IV analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use a 2 SLS approach. I can do a 2 step proc reg approach with the first model regressing&amp;nbsp;&lt;EM&gt;education&amp;nbsp;&lt;/EM&gt;on&amp;nbsp;&lt;EM&gt;near.&amp;nbsp;&lt;/EM&gt;I can output the predicted values and then use those values in the 2nd step in which i regress&amp;nbsp;&lt;EM&gt;wage&amp;nbsp;&lt;/EM&gt;on&amp;nbsp;&lt;EM&gt;pred_education&lt;/EM&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running in some peculiar results when I try this in proc syslin. I want to do it in proc syslin to account for possible correlated error terms across the 2 models and to carry the SE of the estimates for&amp;nbsp;&lt;EM&gt;pred_education&lt;/EM&gt; forward into step 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In using proc syslin I use the following syntax with double adjustments for the covariates &lt;EM&gt;var1-var8&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc syslin data 2sls;&lt;/P&gt;&lt;P&gt;endogenous education;&lt;/P&gt;&lt;P&gt;instruments near;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stepone: model education = near var1-var8;&lt;/P&gt;&lt;P&gt;steptwo: model wage = education var1-var8; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The model works fine and I get estimates for each model. in the first model, the parameter estimate for&amp;nbsp;&lt;EM&gt;near=&lt;/EM&gt;0.067, SE=0.219, p=0.0021&lt;EM&gt;.&amp;nbsp;&lt;/EM&gt;In the second model, the parameter estimate for &lt;EM&gt;education&lt;/EM&gt; = 0.62, SE=0.2324, p=0.0077.&amp;nbsp;I also get estimates for var1-var8 but i am leaving those out from this post. This is different than if i do a 2 step proc reg although that is not surprising.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is surprising is what happened when I tried to adjust for measured confounders in only 1 step with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc syslin data 2sls;&lt;/P&gt;&lt;P&gt;endogenous education;&lt;/P&gt;&lt;P&gt;instruments near;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stepone: model education = near;&lt;/P&gt;&lt;P&gt;steptwo: model wage = education var1-var8; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the stepone model, var1-var8 have been eliminated and we only adjust for them in steptwo. When i run this code i get the following estimates:&lt;/P&gt;&lt;P&gt;stepone: parameter estimate for&amp;nbsp;&lt;EM&gt;near&amp;nbsp;&lt;/EM&gt;= 0.1030, SE=0.0226, p&amp;lt;0.0001 [no estimates for var1-var8 as they were not included]&lt;/P&gt;&lt;P&gt;steptwo: parameter estimate for &lt;EM&gt;education&lt;/EM&gt; = 0.62, SE=0.2324, p=0.0077, the same as the first approach with covariate adjustment in both steps. Moreover, the parameter estimates for var1-var8 are the same between approach 1 and 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue is that if I don't include var1-var8 in stepone I would expect the predictions for&amp;nbsp;&lt;EM&gt;education&amp;nbsp;&lt;/EM&gt;to change which should affect the 2nd model in steptwo. My question to the community is why are the results of steptwo in Approach 1 and Approach 2 the same even if stepone is different between the 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 01:46:50 GMT</pubDate>
    <dc:creator>anujmehta</dc:creator>
    <dc:date>2022-03-29T01:46:50Z</dc:date>
    <item>
      <title>Help with Instrumental Variable approach with proc syslin</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Help-with-Instrumental-Variable-approach-with-proc-syslin/m-p/804646#M4405</link>
      <description>&lt;P&gt;I am attempting to perform an IV analysis to help account for unmeasured confounding in an observational study. Here is the summary of my dataset:&lt;/P&gt;&lt;P&gt;Outcome: &lt;EM&gt;wage&lt;/EM&gt; (continuous value - log transformed)&lt;/P&gt;&lt;P&gt;Primary exposure/dependent variable: &lt;EM&gt;education&lt;/EM&gt; - binary 1/0&lt;/P&gt;&lt;P&gt;IV: &lt;EM&gt;near&lt;/EM&gt;: binary 1/0 (meets all criteria for a reasonable IV&lt;/P&gt;&lt;P&gt;&lt;EM&gt;var1-var8&lt;/EM&gt; - covariates/measured confounders all of which are 1/0 indicator variables, not associated with the IV.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to estimate the association of &lt;EM&gt;education&lt;/EM&gt; and &lt;EM&gt;wage&lt;/EM&gt; accounting for measured confounders and also unmeasured confounding via an IV analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use a 2 SLS approach. I can do a 2 step proc reg approach with the first model regressing&amp;nbsp;&lt;EM&gt;education&amp;nbsp;&lt;/EM&gt;on&amp;nbsp;&lt;EM&gt;near.&amp;nbsp;&lt;/EM&gt;I can output the predicted values and then use those values in the 2nd step in which i regress&amp;nbsp;&lt;EM&gt;wage&amp;nbsp;&lt;/EM&gt;on&amp;nbsp;&lt;EM&gt;pred_education&lt;/EM&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running in some peculiar results when I try this in proc syslin. I want to do it in proc syslin to account for possible correlated error terms across the 2 models and to carry the SE of the estimates for&amp;nbsp;&lt;EM&gt;pred_education&lt;/EM&gt; forward into step 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In using proc syslin I use the following syntax with double adjustments for the covariates &lt;EM&gt;var1-var8&lt;/EM&gt;:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc syslin data 2sls;&lt;/P&gt;&lt;P&gt;endogenous education;&lt;/P&gt;&lt;P&gt;instruments near;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stepone: model education = near var1-var8;&lt;/P&gt;&lt;P&gt;steptwo: model wage = education var1-var8; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The model works fine and I get estimates for each model. in the first model, the parameter estimate for&amp;nbsp;&lt;EM&gt;near=&lt;/EM&gt;0.067, SE=0.219, p=0.0021&lt;EM&gt;.&amp;nbsp;&lt;/EM&gt;In the second model, the parameter estimate for &lt;EM&gt;education&lt;/EM&gt; = 0.62, SE=0.2324, p=0.0077.&amp;nbsp;I also get estimates for var1-var8 but i am leaving those out from this post. This is different than if i do a 2 step proc reg although that is not surprising.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is surprising is what happened when I tried to adjust for measured confounders in only 1 step with the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Approach 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;proc syslin data 2sls;&lt;/P&gt;&lt;P&gt;endogenous education;&lt;/P&gt;&lt;P&gt;instruments near;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stepone: model education = near;&lt;/P&gt;&lt;P&gt;steptwo: model wage = education var1-var8; run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the stepone model, var1-var8 have been eliminated and we only adjust for them in steptwo. When i run this code i get the following estimates:&lt;/P&gt;&lt;P&gt;stepone: parameter estimate for&amp;nbsp;&lt;EM&gt;near&amp;nbsp;&lt;/EM&gt;= 0.1030, SE=0.0226, p&amp;lt;0.0001 [no estimates for var1-var8 as they were not included]&lt;/P&gt;&lt;P&gt;steptwo: parameter estimate for &lt;EM&gt;education&lt;/EM&gt; = 0.62, SE=0.2324, p=0.0077, the same as the first approach with covariate adjustment in both steps. Moreover, the parameter estimates for var1-var8 are the same between approach 1 and 2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My issue is that if I don't include var1-var8 in stepone I would expect the predictions for&amp;nbsp;&lt;EM&gt;education&amp;nbsp;&lt;/EM&gt;to change which should affect the 2nd model in steptwo. My question to the community is why are the results of steptwo in Approach 1 and Approach 2 the same even if stepone is different between the 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 01:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Help-with-Instrumental-Variable-approach-with-proc-syslin/m-p/804646#M4405</guid>
      <dc:creator>anujmehta</dc:creator>
      <dc:date>2022-03-29T01:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Instrumental Variable approach with proc syslin</title>
      <link>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Help-with-Instrumental-Variable-approach-with-proc-syslin/m-p/804778#M4406</link>
      <description>&lt;P&gt;This is an econometrics question, so I have moved the topic to&lt;/P&gt;
&lt;P&gt;"SAS Forecasting and Econometrics" board.&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 14:21:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Help-with-Instrumental-Variable-approach-with-proc-syslin/m-p/804778#M4406</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2022-03-29T14:21:07Z</dc:date>
    </item>
  </channel>
</rss>

