<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SAS结果仿STATA输出&amp;内生性问题]]></title><description><![CDATA[<pre><code>ods rtf file="D:\_云同步\_论文\20171215税收对收入流动性\1_1家庭税收总额作为核心自变量.rtf";
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_1: model  MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_new;
ODS OUTPUT ParameterEstimates =MN_1;
RUN;
</code></pre>
<pre><code>proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_2: model MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_new  tax_new2;
ODS OUTPUT ParameterEstimates =MN_2;
RUN;
</code></pre>
<pre><code>proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_3: model MT=labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_tod;
ODS OUTPUT ParameterEstimates =MN_3;
RUN;
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_4: model MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_tod  tax_tod2;
ODS OUTPUT ParameterEstimates =MN_4;
RUN;
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_5: model MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_old;
ODS OUTPUT ParameterEstimates =MN_5;
RUN;
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_6: model MT=labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_old  tax_old2;
ODS OUTPUT ParameterEstimates =MN_6;
RUN;
ods rtf close;
</code></pre>
<pre><code>/*Tax_new Tax_old 出现共线性 tax_old        = +1.0000 * tax_new +1.0000 * shock3                                                           */
data MN_1;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_1;	
	attrib param label='M1' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_2;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_2;	
	attrib param label='M2' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_3;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_3;	
	attrib param label='M3' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_4;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_4;	
	attrib param label='M4' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_5;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_5;	
	attrib param label='M5' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_6;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_6;	
	attrib param label='M6' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
</code></pre>
<pre><code>PROC SQL;
CREATE TABLE CUI.T1_ADJ510 AS
SELECT coalesce(A.Parameter,B.Parameter,C.Parameter,D.Parameter,E.Parameter,F.Parameter) as Parameter,
A.param AS MN_1,B.param AS MN_2,C.param AS MN_3,D.param AS MN_4,E.param AS MN_5,F.param AS MN_6
FROM MN_1 AS A 
FULL JOIN MN_2 AS B
ON A.Parameter=B.Parameter
FULL JOIN MN_3 AS C
ON A.Parameter=C.Parameter OR B.Parameter=C.Parameter
FULL JOIN MN_4 AS D
ON A.Parameter=D.Parameter OR B.Parameter=D.Parameter OR C.Parameter=D.Parameter
FULL JOIN MN_5 AS E
ON A.Parameter=E.Parameter OR B.Parameter=E.Parameter OR C.Parameter=E.Parameter OR D.Parameter=E.Parameter
FULL JOIN MN_6 AS F
ON A.Parameter=F.Parameter OR B.Parameter=F.Parameter OR C.Parameter=F.Parameter OR D.Parameter=F.Parameter OR E.Parameter=F.Parameter
;
QUIT;
</code></pre>
<pre><code>PROC EXPORT DATA= CUI.T1_ADJ510
            OUTFILE= "D:\_云同步\_论文\20171215税收对收入流动性\T1_家庭税收总额作为核心自变量.csv" 
            DBMS=CSV REPLACE;
     PUTNAMES=YES;
RUN;
</code></pre>
<pre><code>#也可以封装为宏块结构：
/*6 个*/
%MACRO Merge_6(OUT=T19 , A=,B=,C=,D=,E=,F=);
PROC SQL;
CREATE TABLE &amp;OUT AS
SELECT coalesce(A.Parameter,B.Parameter,C.Parameter,D.Parameter,E.Parameter,F.Parameter) as Parameter,
A.param AS &amp;A,B.param AS &amp;B,C.param AS &amp;C,D.param AS &amp;D,
E.param AS &amp;E,F.param AS &amp;F
FROM &amp;A AS A 
FULL JOIN &amp;B AS B
ON A.Parameter=B.Parameter
FULL JOIN &amp;C AS C
ON A.Parameter=C.Parameter OR B.Parameter=C.Parameter
FULL JOIN &amp;D AS D
ON A.Parameter=D.Parameter OR B.Parameter=D.Parameter OR C.Parameter=D.Parameter
FULL JOIN &amp;E AS E
ON A.Parameter=E.Parameter OR B.Parameter=E.Parameter OR C.Parameter=E.Parameter OR D.Parameter=E.Parameter
FULL JOIN &amp;F AS F
ON A.Parameter=F.Parameter OR B.Parameter=F.Parameter OR C.Parameter=F.Parameter OR D.Parameter=F.Parameter OR E.Parameter=F.Parameter
;
quit;
</code></pre>
<pre><code>PROC EXPORT DATA= &amp;OUT
            OUTFILE= "D:\_云同步\_论文\20171215税收对收入流动性\&amp;OUT..csv" 
            DBMS=CSV REPLACE;
     PUTNAMES=YES;
RUN;
%MEND;
</code></pre>
]]></description><link>https://actuarygarden.com/topic/22/sas结果仿stata输出-内生性问题</link><generator>RSS for Node</generator><lastBuildDate>Wed, 18 Nov 2026 14:46:35 GMT</lastBuildDate><atom:link href="https://actuarygarden.com/topic/22.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 May 2020 01:21:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SAS结果仿STATA输出&amp;内生性问题 on Mon, 25 May 2020 06:21:22 GMT]]></title><description><![CDATA[<pre><code>ods rtf file="D:\_云同步\_论文\20171215税收对收入流动性\1_1家庭税收总额作为核心自变量.rtf";
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_1: model  MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_new;
ODS OUTPUT ParameterEstimates =MN_1;
RUN;
</code></pre>
<pre><code>proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_2: model MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_new  tax_new2;
ODS OUTPUT ParameterEstimates =MN_2;
RUN;
</code></pre>
<pre><code>proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_3: model MT=labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_tod;
ODS OUTPUT ParameterEstimates =MN_3;
RUN;
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_4: model MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_tod  tax_tod2;
ODS OUTPUT ParameterEstimates =MN_4;
RUN;
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_5: model MT= labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_old;
ODS OUTPUT ParameterEstimates =MN_5;
RUN;
proc syslin data=family LIML;
endogenous  incstr;
instruments tax_level urban jobclass_hz labor;
MN_6: model MT=labor labor2  Incstr  asset  house  meaneduy  experience_hz  experience_hz2  tax_old  tax_old2;
ODS OUTPUT ParameterEstimates =MN_6;
RUN;
ods rtf close;
</code></pre>
<pre><code>/*Tax_new Tax_old 出现共线性 tax_old        = +1.0000 * tax_new +1.0000 * shock3                                                           */
data MN_1;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_1;	
	attrib param label='M1' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_2;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_2;	
	attrib param label='M2' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_3;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_3;	
	attrib param label='M3' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_4;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_4;	
	attrib param label='M4' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_5;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_5;	
	attrib param label='M5' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
data MN_6;
	rename Variable=Parameter;
	length Variable  $15;
	set MN_6;	
	attrib param label='M6' length=$20;
	if Probt&lt;=0.01 then param=strip(put(estimate,6.3))||' ***  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.05 then param=strip(put(estimate,6.3))||' **  ('||strip(put(Estimate/StdErr,6.2))||')';
	else if Probt&lt;=0.1 then param=strip(put(estimate,6.3))||' *  ('||strip(put(Estimate/StdErr,6.2))||')';
	else param=strip(put(estimate,6.3))||'  ('||strip(put(Estimate/StdErr,6.2))||')';
run;
</code></pre>
<pre><code>PROC SQL;
CREATE TABLE CUI.T1_ADJ510 AS
SELECT coalesce(A.Parameter,B.Parameter,C.Parameter,D.Parameter,E.Parameter,F.Parameter) as Parameter,
A.param AS MN_1,B.param AS MN_2,C.param AS MN_3,D.param AS MN_4,E.param AS MN_5,F.param AS MN_6
FROM MN_1 AS A 
FULL JOIN MN_2 AS B
ON A.Parameter=B.Parameter
FULL JOIN MN_3 AS C
ON A.Parameter=C.Parameter OR B.Parameter=C.Parameter
FULL JOIN MN_4 AS D
ON A.Parameter=D.Parameter OR B.Parameter=D.Parameter OR C.Parameter=D.Parameter
FULL JOIN MN_5 AS E
ON A.Parameter=E.Parameter OR B.Parameter=E.Parameter OR C.Parameter=E.Parameter OR D.Parameter=E.Parameter
FULL JOIN MN_6 AS F
ON A.Parameter=F.Parameter OR B.Parameter=F.Parameter OR C.Parameter=F.Parameter OR D.Parameter=F.Parameter OR E.Parameter=F.Parameter
;
QUIT;
</code></pre>
<pre><code>PROC EXPORT DATA= CUI.T1_ADJ510
            OUTFILE= "D:\_云同步\_论文\20171215税收对收入流动性\T1_家庭税收总额作为核心自变量.csv" 
            DBMS=CSV REPLACE;
     PUTNAMES=YES;
RUN;
</code></pre>
<pre><code>#也可以封装为宏块结构：
/*6 个*/
%MACRO Merge_6(OUT=T19 , A=,B=,C=,D=,E=,F=);
PROC SQL;
CREATE TABLE &amp;OUT AS
SELECT coalesce(A.Parameter,B.Parameter,C.Parameter,D.Parameter,E.Parameter,F.Parameter) as Parameter,
A.param AS &amp;A,B.param AS &amp;B,C.param AS &amp;C,D.param AS &amp;D,
E.param AS &amp;E,F.param AS &amp;F
FROM &amp;A AS A 
FULL JOIN &amp;B AS B
ON A.Parameter=B.Parameter
FULL JOIN &amp;C AS C
ON A.Parameter=C.Parameter OR B.Parameter=C.Parameter
FULL JOIN &amp;D AS D
ON A.Parameter=D.Parameter OR B.Parameter=D.Parameter OR C.Parameter=D.Parameter
FULL JOIN &amp;E AS E
ON A.Parameter=E.Parameter OR B.Parameter=E.Parameter OR C.Parameter=E.Parameter OR D.Parameter=E.Parameter
FULL JOIN &amp;F AS F
ON A.Parameter=F.Parameter OR B.Parameter=F.Parameter OR C.Parameter=F.Parameter OR D.Parameter=F.Parameter OR E.Parameter=F.Parameter
;
quit;
</code></pre>
<pre><code>PROC EXPORT DATA= &amp;OUT
            OUTFILE= "D:\_云同步\_论文\20171215税收对收入流动性\&amp;OUT..csv" 
            DBMS=CSV REPLACE;
     PUTNAMES=YES;
RUN;
%MEND;
</code></pre>
]]></description><link>https://actuarygarden.com/post/55</link><guid isPermaLink="true">https://actuarygarden.com/post/55</guid><dc:creator><![CDATA[谢远涛]]></dc:creator><pubDate>Mon, 25 May 2020 06:21:22 GMT</pubDate></item></channel></rss>