<?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: Logistic Regression with Instrumental Variable in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144076#M7544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steven;&lt;/P&gt;&lt;P&gt;Y represents the number of successes divided by the total number of trials in a sample. I tried the QLIM with bounded dependent variable (0&amp;lt;Y&amp;lt;1) but I am not sure why the estimation results are different from Proc Logistic results. (before adjusting for the endogenous variable, that is modeling Y as a function of only X and ignoring endogeneity).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2014 21:46:34 GMT</pubDate>
    <dc:creator>niam</dc:creator>
    <dc:date>2014-06-17T21:46:34Z</dc:date>
    <item>
      <title>Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144073#M7541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello;&lt;/P&gt;&lt;P&gt;I am trying to regress a &lt;EM&gt;Ratio&lt;/EM&gt; variable,Y,&amp;nbsp; on an independent variable,X; &lt;/P&gt;&lt;P&gt;Variable X is endogenous, so I have to use an Instrumental Variable, Z; &lt;/P&gt;&lt;P&gt;both X and Z are &lt;EM&gt;continues&lt;/EM&gt; variables. &lt;/P&gt;&lt;P&gt;How can I run this model in SAS. I know SYSLIN easily does iIMt if the depandant variable is continues, but what if the dependent variable is a ratio or dichotomous? &lt;/P&gt;&lt;P&gt;PROC QLIM only allows the left hand variable to be a binary outcome and endogenous! again, when the right hand side variable is endogenous, QLIM is not useful. &lt;/P&gt;&lt;P&gt;If there is no built in procedure, is there any alternative way to run this model in SAS?&lt;/P&gt;&lt;P&gt;Thanks for your help in advance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 03:51:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144073#M7541</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-17T03:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144074#M7542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you be a bit more explicit in describing the ratio variable Y?&amp;nbsp; Is it bounded (either above or below or both)?&amp;nbsp; Is it a proportion or pseudo-proportion(bounded below by 0 and above by 1)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the best you might do with PROC QLIM is to just treat Y as a continuous variable, with censoring/cutoff (I could be wrong about this).&amp;nbsp; If that is unsatisfactory, you may wish to consider a generalized linear (mixed) modeling procedure, such as GENMOD or GLIMMIX, with an appropriate distributional assumption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 11:36:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144074#M7542</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-06-17T11:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144075#M7543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niam, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually this was true prior to the latest release of ETS.&amp;nbsp; As of the 13.1 release QLIM supports a number of models with RHS endogenous regressors, including logit and probit models. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see this documentation and let me know you would like any help using it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_qlim_details24.htm" title="http://support.sas.com/documentation/cdl/en/etsug/66840/HTML/default/viewer.htm#etsug_qlim_details24.htm"&gt;SAS/ETS(R) 13.1 User's Guide&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ken &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 21:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144075#M7543</guid>
      <dc:creator>ets_kps</dc:creator>
      <dc:date>2014-06-17T21:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144076#M7544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steven;&lt;/P&gt;&lt;P&gt;Y represents the number of successes divided by the total number of trials in a sample. I tried the QLIM with bounded dependent variable (0&amp;lt;Y&amp;lt;1) but I am not sure why the estimation results are different from Proc Logistic results. (before adjusting for the endogenous variable, that is modeling Y as a function of only X and ignoring endogeneity).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 21:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144076#M7544</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-17T21:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144077#M7545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear ets_kps;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your helpful answer. &lt;/P&gt;&lt;P&gt;I tried to use the QLIM procedure. Since Y is a proportion variable (Ratio of number of success to the total number of trials), I first tried to use the following code: &lt;/P&gt;&lt;P&gt;Proc Qlim;&lt;/P&gt;&lt;P&gt;model Y=X /discrete(d=logit);&lt;/P&gt;&lt;P&gt;model X=Z;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;but I get the following error message:&lt;/P&gt;&lt;P&gt;"There are only 51 non missing observation in the input data set. It is too small to &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;estimate parameters."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;Then I tried to define Y as a &lt;/SPAN&gt;&lt;SPAN style="line-height: 19.5px;"&gt;censored&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;dependent&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="line-height: 19.5px;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; and used the following code: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;Proc Qlim;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;model Y=X/censored(lb=0 ub=1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;model X=Z;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;This model runs and gives me some results, however, the results are not consistent with another alternative way that I &lt;/SPAN&gt;implemented&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;. As I told Steve, even the simple regression (by ignoring the second model for endogenous variable) produces different results in proc Logistic. This is the alternative method:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;Proc reg;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;model X=Z;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;output out=temp pred=Xhat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;proc logistic data=temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;model Y=Xhat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;This is &lt;/SPAN&gt;basically&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt; some variation of 2SLS method. I get the estimates of the endogenous variables from the first OLS regression and then use it in the second logistic regression. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="line-height: 1.5em;"&gt;Why do you this the two methods produce different results? Am I using proc QLIM correctly? Is using &lt;/SPAN&gt;&lt;SPAN style="line-height: 19.5px;"&gt;censored&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em;"&gt; option the best way to handle proportion variables in QLIM? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: small;"&gt;or Is there any problem with the second alternative method?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;Thank you very much for your help;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;Best&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 22:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144077#M7545</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-17T22:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144078#M7546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Steve and ets_kps;&lt;/P&gt;&lt;P&gt;If I use a binary dependent variable instead of a proportion variable, then proc&amp;nbsp; QLIM (with &lt;STRONG&gt;/discrete (d=logit)&lt;/STRONG&gt; option )and proc LOGISTIC produce identical results. So the problem is how to model proportion variables with QLIM, since the option of &lt;STRONG style="background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;/censored(lb=0 ub=1) &lt;/STRONG&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;in proc QLIM&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;does not produce similar results to the proc LOGISTIC results. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 22:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144078#M7546</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-17T22:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144079#M7547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While you can do the manual two-stage regression, doesn't it run into the problem that the amount of data (or complete cases, not sure which) that PROC QLIM complains about will result in unstable estimates with unacceptably large standard errors?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think the censored option is a good way to proceed at this point.&amp;nbsp; That leaves the manual 2SLS, or maybe a Bayesian approach in QLIM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 15:09:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144079#M7547</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-06-18T15:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144080#M7548</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, with Proc Logistic everything runs beautifully, how ever I am a little bit concerned with the validity of its results. &lt;/P&gt;&lt;P&gt;This is why I am concerned: &lt;A __default_attr="58776" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 18:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144080#M7548</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-18T18:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144081#M7549</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think, when the dependent variable is a fractional response variable, it should be modeled as truncated rather than censored. Because, with censoring with lower bound 0 and upper bound 1, you are saying that observations that are negative or bigger than 1 actually exist but you are not able to observe them in your sample. With truncation with lower bound 0 and upper bound 1, you are saying that the support of the distribution is [0, 1] and observations can't exist beyond these boundries. Hence,&lt;/P&gt;&lt;P&gt;Proc Qlim;&lt;/P&gt;&lt;P&gt;model Y=X / truncated(lb=0 ub=1);&lt;/P&gt;&lt;P&gt;model X=Z;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;may fit your data better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When it comes to estimating this model with endogeneity using a two-step method, a control function method (which is also a two-step procedure) works BUT the procedure that you described earlier won't work. When you plug in the estimates of the endogenous variables obtained in the first step and estimate the nonlinear model in the second step will produce an inconsistent estimator. Instead of estimating for the endogenous variables you should estimate the error term of the reduced form model x=z; Here is what I mean:&lt;/P&gt;&lt;P&gt;X is endogenous if the error term of the structural model, say u, is correlated with that of the reduced form model, say e. We can model this as&lt;/P&gt;&lt;P&gt;u = theta v + e, where e is independent of v and theta is the correlation coefficient.&lt;/P&gt;&lt;P&gt;Therefore, you can write the model of interest (the structural model) as&lt;/P&gt;&lt;P&gt;Y = beta X + theta v + e&lt;/P&gt;&lt;P&gt;Y is fractional so it's a nonlinear model.&lt;/P&gt;&lt;P&gt;Now, v is unobserved, so it should&amp;nbsp; be replaced with its estimate. This, you should obtain in the first step and then plug it in in the above model and estimate&amp;nbsp; it appropriately. As far as I know, PROC LOGISTIC doesn't estimate fractional response variables, but I am not so sure, you may want to check on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 18:54:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144081#M7549</guid>
      <dc:creator>gunce_sas</dc:creator>
      <dc:date>2014-06-18T18:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144082#M7550</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Dear Gunce@sas&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Thanks for the detailed explanation. &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;To make sure I have &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;understood&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt; correctly, this is the way you think the control function be implemented? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;(&lt;/SPAN&gt;Basically&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;, instead of having the estimated endogenous variable, I should save the residuals and then use it along with the original endogenous variable in the final model)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Is this the case for every other type of the endogenous variables, or you are proposing this only for the logistic &lt;/SPAN&gt;regression&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt; &lt;/SPAN&gt;because&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt; of its non-linear format?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Proc reg;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;model X=Z;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;output out=temp pred=Xhat residual=vhat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;proc logistic data=temp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;model Y=X vhat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;By the way, in proc logistics, if you have the number of tirals and events, say N and S then you can write:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;proc logistic;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;model S/N=X;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff;"&gt;&lt;SPAN style="font-size: 10pt; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;Actually, I have the trials and events and use the method above, but for the sake of brevity, I just said lets suppose that we have proportional &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;dependent&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt; &lt;/SPAN&gt;variable&lt;SPAN style="font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 19:58:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144082#M7550</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-18T19:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144083#M7551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks @gunce@sas!&amp;nbsp; That was an excellent explanation and I can now say my knowledge of 2SLS is much improved.&amp;nbsp; Well presented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 13:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144083#M7551</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2014-06-19T13:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144084#M7552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Niam,&lt;/P&gt;&lt;P&gt;Your understanding is correct, you should obtain the residuals for each reduced form model (as many as the number of endogenous explanatory variables) -- this makes up your first step-- and then insert them for the error term of the structural model and estimate -- this is the second step. A simple test on the coefficients of these residuals will give you a test of endogeneity.&lt;/P&gt;&lt;P&gt;You also asked a very good question that I should have explained before. The control function approach is used and valid when the model of interest (the structural model) is nonlinear and the endogenous explanatory variables are all continuous. Let me emphasize this one more time: When you estimate a nonlinear model with endogenous explanatory variables, the nature of the endogenous explanatory variables matters. For control function method to produce a consistent estimator, the corresponding reduced form equations must be linear. In your example this is the case, so you can use either a joint likelihood method, like in the QLIM example I wrote earlier, or a control function method.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;&lt;BR /&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 14:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144084#M7552</guid>
      <dc:creator>gunce_sas</dc:creator>
      <dc:date>2014-06-19T14:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Logistic Regression with Instrumental Variable</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144085#M7553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 16:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Logistic-Regression-with-Instrumental-Variable/m-p/144085#M7553</guid>
      <dc:creator>niam</dc:creator>
      <dc:date>2014-06-19T16:12:39Z</dc:date>
    </item>
  </channel>
</rss>

