zongxi Tracker
https://communities.sas.com/kntur85557/tracker
zongxi TrackerSun, 03 Nov 2024 09:20:57 GMT2024-11-03T09:20:57ZRe: How proc QLIM estimate Probit with endogenous variables
https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720401#M34879
<P>Further reading the proc QLIM documentation. I assume SAS is using simulated MLE for my case. </P><P> </P><P>y1=1[x+y2+y3+y4+e1>0] (1)<BR /> y2=1[z2+e2>0] (2)<BR /> y3=z3+e3 (3)<BR /> y4=z4+e4 (4)</P><P> </P><P>So, the simplified MLE derivation goes as:</P><P>f(y1,y2,y3,y4|x, z) = f(y1, y2|y3, y4, x, z) * f(y3, y4|x, z)</P><P>1. Derive the joint density of (y3,y4) in second term of RHS is trival. </P><P>2. Derive first term require separate discussion of 4 combinations. </P><P> e.g, f(y1=1,y2=1|y3,y4,x,z) = f(e1 > -x-y2-y3-y4, e2 > -z2|y3,y4,x,z)</P><P> 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. </P><P> (e1, e2|e3=y3-z3, e4=y4-z4) ~ MVN(mu, sigma)</P><P> </P><P>So the MLE formula has more integrals compare to using WooldRidge's method (2011).</P><P>I assume SAS is using the simplified version and let computer do solve the multiple integrals in the MLE function. </P><P> </P><P>I am seeing the output from QLIM, </P><P>Seed for Monte Carlo IntegrationNumber of Draws</P><TABLE cellspacing="0" cellpadding="5"><TBODY><TR><TD>1923567609</TD></TR><TR><TD>20</TD></TR></TBODY></TABLE><P> </P><P>Assuming the "Monte Carlo" method is applied for simulated MLE, but I am not sure my above understanding is correct. </P><P> </P><P>I hope someone can answer it. </P><P>Thank you in advance.</P>Fri, 19 Feb 2021 06:29:57 GMThttps://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720401#M34879zongxi2021-02-19T06:29:57ZRe: How proc QLIM estimate Probit with endogenous variables
https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720364#M34876
<P>Thank you Dr Denham. 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). I derive the MLE myself,It's long and tedious and I am not sure it's correct or not. </P><P> </P><P>suppose I want to estimate the list of equations, 1[.] is the indicator function, I ignore intercept and coefficients for simplicity. </P><P> y1=1[x+y2+y3+y4+e1>0] (1)<BR /> y2=1[z2+e2>0] (2)<BR /> y3=z3+e3 (3)<BR /> y4=z4+e4 (4)</P><P>a couple assumptions, e1 e2 are standard normal, a variance/covariance structure of e1-e4 is assumed to imply the assumption of endogeneity.</P><P> </P><P>The goal here is to show the joint MLE function condition on exogenous and instrumental variables. Specifically, <BR />f(y1, y2, y3, y4|x, z) = f(y1|y2,y3,y4,x,z)*f(y2,y3,y4|x,z).</P><P> </P><P>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)</P><P>It's straightforward to derive with the properties of joint and conditional distribution of normal variables. (Wooldridge 2011)</P><P> </P><P>The first term f(y1|y2,y3,y4,x,z) is somehow tricky. it requires to derive 4 combinations of y1 and y2 separately, </P><P> 1. f(y1=1|y2=1,y3,y4,x,z) </P><P> 2. f(y1=1|y2=0,y3,y4,x,z)</P><P> 3. f(y1=0|y2=1,y3,y4,x,z) </P><P> 4. f(y1=0|y2=0,y3,y4,x,z)</P><P> </P><P>Take #1 for example, </P><P>p(y1=1│y2=1,y3,y4,x,z)<BR />= E[p(e1>-x-y2-y3-y4|e2,e3,e4,x,z)|y2=1,y3,y4,x,z]</P><P>p(e1>-x-y2-y3-y4|e2,e3,e4,x,z) is a function of random variable e2,e3, and e4</P><P>let g(e2,e3,e4) = p(e1>-x-y2-y3-y4|e2,e3,e4,x,z), then </P><P>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)</P><P> </P><P>The Integal[.] is operating on the high dimensional space of e2, e3, and e4, however on e3 and e4 the Integal a single point of value and on e2 is a range to allow y2=1. </P><P> </P><P>Do you think this is on the right direction?</P><P> </P><P>Thanks for your help anyway. </P><P> </P><P> </P><P> </P>Fri, 19 Feb 2021 00:00:49 GMThttps://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/720364#M34876zongxi2021-02-19T00:00:49ZHow proc QLIM estimate Probit with endogenous variables
https://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719724#M34830
<P>Hi,</P><P>I am new to proc QLIM and recently use it to estimate the structural equations. </P><P>In the model, I have three endogenous variables and two of them are discrete. </P><P> </P><P>QLIM reported the following model fit summary, </P><P>"Optimization method": "Quasi-Newton" </P><P>"Seed for Monte Carlo Integration": 1514161564</P><P>"Number of Draws": 20</P><P> </P><P>I was wondering how QLIM estimate the model and what's the assumption behind. </P><P>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. </P><P> </P><P>Can anyone help provide the MLE equation and estimation steps for this model? </P><P> </P><P>thanks in advance</P><P> </P><P>========================================================</P><P>proc qlim data=review;</P><P> model y1 = y2 y3 z1/ discrete;</P><P> model y2 = z2 / discrete;</P><P> model y3 = z3;</P><P> run;</P>Tue, 16 Feb 2021 21:03:02 GMThttps://communities.sas.com/t5/Statistical-Procedures/How-proc-QLIM-estimate-Probit-with-endogenous-variables/m-p/719724#M34830zongxi2021-02-16T21:03:02Z