运行do文件时出现AppData\Local\Temp\ST_00000002.tmp not found-经管之家官网!

人大经济论坛-经管之家 收藏本站
您当前的位置> 会计>>

会计库

>>

运行do文件时出现AppData\Local\Temp\ST_00000002.tmp not found

运行do文件时出现AppData\Local\Temp\ST_00000002.tmp not found

发布:夜风雪 | 分类:会计库

关于本站

人大经济论坛-经管之家:分享大学、考研、论文、会计、留学、数据、经济学、金融学、管理学、统计学、博弈论、统计年鉴、行业分析包括等相关资源。
经管之家是国内活跃的在线教育咨询平台!

经管之家新媒体交易平台

提供"微信号、微博、抖音、快手、头条、小红书、百家号、企鹅号、UC号、一点资讯"等虚拟账号交易,真正实现买卖双方的共赢。【请点击这里访问】

提供微信号、微博、抖音、快手、头条、小红书、百家号、企鹅号、UC号、一点资讯等虚拟账号交易,真正实现买卖双方的共赢。【请点击这里访问】

stata运行do文件时出现了fileC:\Users\~\AppData\Local\Temp\ST_00000002.tmpnotfound,命令如下:*****PreparedataforcalculationofEITC,sendtoTAXSIM,andcreatedatasetforIV*****Setup*Baselinewithoutstate**001i ...
免费学术公开课,扫码加入


stata运行do文件时出现了file C:\Users\~\AppData\Local\Temp\ST_00000002.tmp not found,命令如下:

*****Prepare data for calculation of EITC, send to TAXSIM, and createdataset for IV

*****Setup

*Baseline without state

**001 is wage income only

**002 is wage plus unearned income

**012, 011 include state taxes and credits

foreach j in 012 011 211 311 411 511 611 711 {

***KEY to datasets***

*hat=0: real data, hat=4: baseline predicted, hat=2,3 needed for Table 4,hat=5,6,7 needed for Table 5

*state=0: no state tax information calculated, state=1: state taxesincluded

*spec=1: excludes unearned income, spec2: includes unearned income

local hat=substr("`j'",1,1)

local state=substr("`j'",2,1)

local spec=substr("`j'",3,1)

use main, replace

sort idchild year

*IMPORTANT NOTE: all income variables are in 1979 dollars, and need to beconverted to nominal dollars before sending through taxsim

*(convert to nominal dollars by multiplying by cpily)

replace earnincrimp=earnincrimp*cpily

replace earnincsimp=earnincsimp*cpily

replace earnincrsimp=earnincrsimp*cpily

replace unearnincrsimp=unearnincrsimp*cpily

replace nontaxincrsimp=nontaxincrsimp*cpily

gen pretaxinc=earnincrsimp+unearnincrsimp+nontaxincrsimp

*****As needed, make variable changes or sample restrictions

*note: one year already subtracted off to reflect that NLSY reports laggedincome

gen trend=year-1986

***Set state variable to missing if necessary (for state=0 samples)

replace state=0 if `state'==0

*****Sample restrictions

gen samp=1

replace samp = (year==1985|year==1987|year==1989|year==1991|year==1993|year==1995|year==1997|year==1999)& (piamatsn!=. | piarecsn!=. | piarersn!=.) if `hat'==2 | `hat'==3 |`hat'==4 | `hat'==5

replace samp = samp |(year==1988|year==1990|year==1992|year==1994|year==1996|year==1998) if `hat'==6| `hat'==7

sort idchild year

xtset idchild year, yearly delta(1)

*create variables for SIV and to define sample

gen test=(2.295/(10000*cpily))*earnincrsimp

gen x0=L2.test==0

gen x1=L2.test

gen x2=x1^2

gen x3=x1^3

gen x4=x1^4

gen x5=x1^5

gen getdiv02=marrlyimp==0 & (L1.marrlyimp==1|L2.marrlyimp==1)

gen getmarr02=marrlyimp==1 & (L1.marrlyimp==0|L2.marrlyimp==0)

gen flag1 = (2.295/(10000*cpily))*pretaxinc<10 &(2.295/(10000*L2.cpily))*L2.pretaxinc<10

gen flag = year>=1989 & !getmarr02 & !getdiv02 & flag1 if`hat'==2 | `hat'==3 | `hat'==4 | `hat'==6 | `hat'==7

replace flag = year>=1987 & !getmarr02 & !getdiv02 & flag1if `hat'==5

keep if samp

*drop poor oversample

keep if ((samprandom&sampnm)|sampnmblack|sampnmhisp) | (year==1994|year==1996|year==1998)

*****Get predicted income

*Need to have earned income (for eitc credit) and unearned income (forlocation on eitc schedule)

gen earninc=.

gen unearninc=.

*Use actual data (for hat=0 samples)

replace earninc=earnincrsimp if `hat'==0

replace unearninc=unearnincrsimp if `hat'==0

*year trend

if `hat'==2 {

reg test x0 x1 x2 x3 x4 x5 trend ifsamp & flag

predict earninchat if samp &flag

replaceearninc=earninchat*((10000*cpily)/2.295) if samp & flag

}

*year dummies

if `hat'==3 {

reg test x0 x1 x2 x3 x4 x5 yy* ifsamp & flag

predict earninchat if samp &flag

replaceearninc=earninchat*((10000*cpily)/2.295) if samp & flag

}

*baseline

if `hat'==4 {

reg test x0 x1 x2 x3 x4 x5 if samp& flag

predict earninchat if samp &flag

replaceearninc=earninchat*((10000*cpily)/2.295) if samp & flag

}

*for Table 5

if `hat'==5 {

gen f0=F2.test==0

gen f1=F2.test

gen f2=f1^2

gen f3=f1^3

gen f4=f1^4

gen f5=f1^5

reg test f0 f1 f2 f3 f4 f5 if samp& flag

predict earninchat if samp &flag

replaceearninc=earninchat*((10000*cpily)/2.295) if samp & flag

}

*for Table 5

if `hat'==6 {

gen f0=L1.test==0

gen f1=L1.test

gen f2=f1^2

gen f3=f1^3

gen f4=f1^4

gen f5=f1^5

reg test f0 f1 f2 f3 f4 f5 if samp& flag & (year==1987|year==1989|year==1991|year==1993|year==1995|year==1997|year==1999)& (piamatsn!=. | piarecsn!=. | piarersn!=.)

predict earninchat if samp &flag

replaceearninc=earninchat*((10000*cpily)/2.295) if samp & flag

}

*for Table 5

if `hat'==7 {

gen f0=F1.test==0

gen f1=F1.test

gen f2=f1^2

gen f3=f1^3

gen f4=f1^4

gen f5=f1^5

reg test f0 f1 f2 f3 f4 f5 if samp& flag &(year==1987|year==1989|year==1991|year==1993|year==1995|year==1997|year==1999)& (piamatsn!=. | piarecsn!=. | piarersn!=.)

predict earninchat if samp &flag

replaceearninc=earninchat*((10000*cpily)/2.295) if samp & flag

}

gen oldyear=year

*****Replace pwages and ui with predicted values earninc and unearninc andsave pre-eitc dataset

replace swages=0

replace pwages=earninc

replace ui=unearninc

*Set non-wage income (unearnincrsimp, which we are feeding through taxsimas "ui") equal to zero if necessary (for spec=1 samples)

replace ui=0 if `spec'==1

drop earninc unearninc

*Save pre-eitc master dataset, using real data, for later merging in futureprogram

if "`j'"=="012" {

save preeitcinput, replace

}

keep idchild cpily year state mstat depx agex pwages swages dividendsotherprop pensions gssi transfers rentpaid proptax otheritem childcare uidepchild mortgage stcg ltcg oldyear

*Note: don't send idchild to taxsim if using state identifiers

*****Send data to TAXSIM and get after tax income and EITC

taxsim9, replace full

replace year=oldyear

sort idchild year

save taxsimout`j', replace

}

*****Now rename taxsim variables and merge taxsim datasets together

*****Rename variables from taxsim output

local datasets 012 011 211 311 411 511 611 711

foreach i of local datasets {

use taxsimout`i', replace

rename v10 fedagi

rename v25 eitc

rename v28 fedinctax

rename v39 stateeitc

rename v40 statetotcredit

keep idchild year fedagi eitcfedinctax stateeitc statetotcredit siitax cpily pwages otherprop

*Put dollar values back in realterms (2000 dollars, so divide by cpily and multiply by 2.295) and divide allmonetary variables by 10,000

local vars "fedagi eitcfedinctax stateeitc statetotcredit siitax pwages"

foreach var of varlist `vars' {

qui replace `var' =`var'*(2.295/(10000*cpily))

}

*Create income variables

geninc=fedagi-fedinctax-siitax+statetotcredit

gen incnotax=pwages+eitc

gen tax=fedagi-eitc

*rename variables with appropriateextension

local vars "fedagi eitcfedinctax stateeitc statetotcredit siitax pwages inc incnotax tax"

foreach var of varlist `vars' {

rename `var' `var'`i'

}

save taxsim`i', replace

}

*****Merge all datasets together

*Start with preeitcinput for real data

use preeitcinput, replace

sort idchild year

foreach dataset of local datasets {

merge idchild year usingtaxsim`dataset'

tab _merge

drop _merge

sort idchild year

}

*Now for additional variables, put back in real terms (into 2000 dollars,so divide by cpily and multiply by 2.295) and divide all monetary variables by10,000

local vars "ui otherpropnontaxincrsimp earnincrsimp unearnincrsimp"

foreach var of varlist `vars' {

replace `var' =`var'*(2.295/(10000*cpily))

}

*Now for some variables, put into year 2000 dollars in real terms (convertfrom 1979 dollars to 2000 dollars, so multiply by 2.295) and divide allmonetary variables by 10,000

local vars "totweadimp2"

foreach var of varlist `vars' {

replace `var' =`var'/(10000*(1/2.295))

}

save taxsim-merged, replace


求大神解决,谢谢!!!


「经管之家」APP:经管人学习、答疑、交友,就上经管之家!
免流量费下载资料----在经管之家app可以下载论坛上的所有资源,并且不额外收取下载高峰期的论坛币。
涵盖所有经管领域的优秀内容----覆盖经济、管理、金融投资、计量统计、数据分析、国贸、财会等专业的学习宝库,各类资料应有尽有。
来自五湖四海的经管达人----已经有上千万的经管人来到这里,你可以找到任何学科方向、有共同话题的朋友。
经管之家(原人大经济论坛),跨越高校的围墙,带你走进经管知识的新世界。
扫描下方二维码下载并注册APP
本文关键词:

本文论坛网址:https://bbs.pinggu.org/thread-4155448-1-1.html

人气文章

1.凡人大经济论坛-经管之家转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
经管之家 人大经济论坛 大学 专业 手机版