<?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 How proc QLIM estimate Probit with endogenous variables in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719724#M34830</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to proc QLIM and recently use it to estimate the structural equations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the model, I have three endogenous variables and two of them are discrete.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QLIM reported the following model fit summary,&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Optimization method": "Quasi-Newton"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Seed for Monte Carlo Integration": 1514161564&lt;/P&gt;&lt;P&gt;"Number of Draws": 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering how QLIM estimate the model and what's the assumption behind.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume it's using MLE estimation (multivariate normal distribution in my case) but wondering what's the assumption behind regarding the correlations between the three random variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help provide the MLE equation and estimation steps for this model?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;========================================================&lt;/P&gt;&lt;P&gt;proc qlim data=review;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y1 = y2 y3 z1/ discrete;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y2 = z2 / discrete;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y3 = z3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2021 21:03:02 GMT</pubDate>
    <dc:creator>zongxi</dc:creator>
    <dc:date>2021-02-16T21:03:02Z</dc:date>
    <item>
      <title>How proc QLIM estimate Probit with endogenous variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719724#M34830</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am new to proc QLIM and recently use it to estimate the structural equations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the model, I have three endogenous variables and two of them are discrete.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;QLIM reported the following model fit summary,&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Optimization method": "Quasi-Newton"&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Seed for Monte Carlo Integration": 1514161564&lt;/P&gt;&lt;P&gt;"Number of Draws": 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering how QLIM estimate the model and what's the assumption behind.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume it's using MLE estimation (multivariate normal distribution in my case) but wondering what's the assumption behind regarding the correlations between the three random variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help provide the MLE equation and estimation steps for this model?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;========================================================&lt;/P&gt;&lt;P&gt;proc qlim data=review;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y1 = y2 y3 z1/ discrete;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y2 = z2 / discrete;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; model y3 = z3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 21:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719724#M34830</guid>
      <dc:creator>zongxi</dc:creator>
      <dc:date>2021-02-16T21:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: How proc QLIM estimate Probit with endogenous variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719881#M34834</link>
      <description>&lt;P&gt;It is always dangerous to use a technique without at least some background on the details of what the procedure is doing.&amp;nbsp; This is a good time to read the Details part of the documentation for PROC QLIM, located here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=etsug&amp;amp;docsetTarget=etsug_qlim_details.htm&amp;amp;locale=en" target="_self"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=etsug&amp;amp;docsetTarget=etsug_qlim_details.htm&amp;amp;locale=en&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is long, and many parts have nothing to do with your questions - but all of them are answered at some point in here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 12:53:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719881#M34834</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-02-17T12:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: How proc QLIM estimate Probit with endogenous variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720364#M34876</link>
      <description>&lt;P&gt;Thank you Dr Denham.&amp;nbsp;Thanks for your suggestions. My question is specific on how to derive the MLE in the case of Probit regression with binary and continuous endogenous variables. I read the SAS link you provide and Econometric Analysis of Cross Section and Panel Data (Wooldridge 2011).&amp;nbsp;I derive the MLE myself,It's long and tedious and I am not sure it's correct or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;suppose I want to estimate the list of equations, 1[.] is the indicator function, I ignore intercept and coefficients for simplicity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; y1=1[x+y2+y3+y4+e1&amp;gt;0] (1)&lt;BR /&gt;&amp;nbsp; y2=1[z2+e2&amp;gt;0] (2)&lt;BR /&gt;&amp;nbsp; y3=z3+e3 (3)&lt;BR /&gt;&amp;nbsp; y4=z4+e4 (4)&lt;/P&gt;&lt;P&gt;a couple assumptions, e1 e2 are standard normal, a variance/covariance structure of e1-e4 is assumed to imply the assumption of endogeneity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal here is to show the joint MLE function condition on exogenous and instrumental variables. Specifically,&amp;nbsp;&lt;BR /&gt;f(y1, y2, y3, y4|x, z) = f(y1|y2,y3,y4,x,z)*f(y2,y3,y4|x,z).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second term on the right hand side, f(y2,y3,y4|x,z) = f(y2|y3,y4,x,z)*f(y3,y4|x,z)&lt;/P&gt;&lt;P&gt;It's straightforward to derive with the properties of joint and conditional distribution of normal variables. (Wooldridge 2011)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first term&amp;nbsp;f(y1|y2,y3,y4,x,z) is somehow tricky. it requires to derive 4 combinations of y1 and y2 separately,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;1.&amp;nbsp;f(y1=1|y2=1,y3,y4,x,z)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;2.&amp;nbsp;f(y1=1|y2=0,y3,y4,x,z)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;3. f(y1=0|y2=1,y3,y4,x,z)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;4.&amp;nbsp;f(y1=0|y2=0,y3,y4,x,z)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Take #1 for example,&amp;nbsp;&lt;/P&gt;&lt;P&gt;p(y1=1│y2=1,y3,y4,x,z)&lt;BR /&gt;= E[p(e1&amp;gt;-x-y2-y3-y4|e2,e3,e4,x,z)|y2=1,y3,y4,x,z]&lt;/P&gt;&lt;P&gt;p(e1&amp;gt;-x-y2-y3-y4|e2,e3,e4,x,z) is a function of random variable e2,e3, and e4&lt;/P&gt;&lt;P&gt;let g(e2,e3,e4) =&amp;nbsp;p(e1&amp;gt;-x-y2-y3-y4|e2,e3,e4,x,z), then&amp;nbsp;&lt;/P&gt;&lt;P&gt;p(y1=1│y2=1,y3,y4,x,z) = Integal[g(e2,e3,e4)*f(e2,e3,e4|y2=1,y3,y4,x,z)] d(e2)*d(e3)*(de4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Integal[.] is operating on the high dimensional space of e2, e3, and e4, however on e3 and e4 the Integal&amp;nbsp; a single point of value and on e2 is a range to allow y2=1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think this is on the right direction?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help anyway.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 00:00:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720364#M34876</guid>
      <dc:creator>zongxi</dc:creator>
      <dc:date>2021-02-19T00:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: How proc QLIM estimate Probit with endogenous variables</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720401#M34879</link>
      <description>&lt;P&gt;Further reading the proc QLIM documentation. I assume SAS is using simulated MLE for my case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;y1=1[x+y2+y3+y4+e1&amp;gt;0] (1)&lt;BR /&gt;&amp;nbsp; y2=1[z2+e2&amp;gt;0] (2)&lt;BR /&gt;&amp;nbsp; y3=z3+e3 (3)&lt;BR /&gt;&amp;nbsp; y4=z4+e4 (4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the simplified MLE derivation goes as:&lt;/P&gt;&lt;P&gt;f(y1,y2,y3,y4|x, z) = f(y1, y2|y3, y4, x, z) * f(y3, y4|x, z)&lt;/P&gt;&lt;P&gt;1. Derive the joint density of (y3,y4) in second term of RHS is trival.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Derive first term require separate discussion of 4 combinations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; e.g, f(y1=1,y2=1|y3,y4,x,z) = f(e1 &amp;gt; -x-y2-y3-y4, e2 &amp;gt; -z2|y3,y4,x,z)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;the joint density of e1, e2 condition on e3 and e4 can be derived as bivariate normal by the conditional distribution property of multivariate normal distribution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;(e1, e2|e3=y3-z3, e4=y4-z4) ~ MVN(mu, sigma)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the MLE formula has more integrals compare to using WooldRidge's method (2011).&lt;/P&gt;&lt;P&gt;I assume SAS is using the simplified version and let computer do solve the multiple integrals in the MLE function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am seeing the output from QLIM,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seed for Monte Carlo IntegrationNumber of Draws&lt;/P&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1923567609&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming the "Monte Carlo" method is applied for simulated MLE, but I am not sure my above understanding is correct.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope someone can answer it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 06:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720401#M34879</guid>
      <dc:creator>zongxi</dc:creator>
      <dc:date>2021-02-19T06:29:57Z</dc:date>
    </item>
  </channel>
</rss>

