StataLATEXarlionn@163.com2007.081stata.sty21.1stata.sty.....................................21.2Stata.......................................31.3Stata..........................................31.4Stata.......................................51.5.......................................71.6.........................................81.7..........................................8292.1—listtex...............................102.2—corrtex.............................102.3—latabtabout............................112.4—latabstat.............................112.5—esttab..............................12317StataWord181LATEXpdfWordStataStataLATEXStataStataLATEXStataLATEX1StataJournalstatapress.cls2StataLATEX3StataWord1stata.stystata.styLATEXLATEXStata(macros)(environments)StataJournalpdf1.1stata.styStata7MiKTeXLATEXStata“finditsjlatex”,sjlatexLaTeXStataJournalLATEX“C:\CTeX\texmf\tex\latex”StatasjlatexinstallusingC:\CTeX\texmf\tex\latex\sjlatexLATEXMiKTeXAccessories!MiKTeX!MiKTeXOptions,RefreshNowUpdateNowApplyLATEX\usepackagefstatagLATEXStataJournal1.2StataStata11:StataExampleResult\dref{merge}[D]merge\gref{graph}[G]graph\grefi{line\_options}[G]lineoptions\iref{datatypes}[I]datatypes\mreff{intro}[M-0]intro\mrefa{ado}[M-1]ado\mrefb{declarations}[M-2]declarations\mrefc{mataclear}[M-3]mataclear\mrefd{matrix}[M-4]matrix\mrefe{st\_view($\,$)}[M-5]stview()\mrefg{glossary}[M-6]glossary\mvref{cluster}[MV]cluster\pref{syntax}[P]syntax\rref{regress}[R]regress\stref{streg}[ST]streg\svyref{svy:˜tabulateoneway}[SVY]svy:tabulateoneway\tsref{arima}[TS]arima\uref{1Readthis---itwillhelp}[U]1Readthis—itwillhelp\xtref{xtreg}[XT]xtreg1.3Stataregressregressdepvarindepvarsifinweight,noconstanthasconstssconsvce(vcetype)level(#)betaeform(string)noheaderplusdepname(varname)mse1\begin{stsyntax}\dunderbar{reg}ress{\itdepvar}\optindepvars\3\optif\\optin\\optweight\\optional{,\underbar{noc}onstant\underbar{h}asconstssconsvce({\itvcetype\/})\underbar{l}evel(\num)\underbar{b}eta\underbar{ef}orm(\ststring)\underbar{nohe}aderplus\dunderbar{dep}name(\varname)mse1}\end{stsyntax}stsyntax2stata.sty2:StataMacroResultMacroResult\LB\RB\varnamevarname\optvarnamevarname\varlistvarlist\optvarlistvarlist\newvarnamenewvarname\optnewvarnamenewvarname\newvarlistnewvarlist\optnewvarlistnewvarlist\ifexpif\optifif\inrangein\optinin\eqexp=exp\opteqexp=exp\byvarlistbyvarlist:\optbybyvarlist:\optional{text}text\optweightweight\num#\optindepvarsindepvars\ststringstring\opttypetype\underbar\dunderbar{\tt\underbar{reg}ress}generatesregress{\tt\dunderbar{reg}ress}generatesregress4\hangpara\morehangStatalevel(#)specifiestheconfidencelevel,asapercentage,forconfidenceintervals.Thedefaultislevel(95)orassetbysetlevel;see[U]23.5Specifyingthewidthofconfidenceinter-vals.\hangpara{\ttlevel(\num)}specifiestheconfidencelevel,asapercentage,forconfidenceintervals.Thedefaultis{\ttlevel(95)}orassetby{\ttsetlevel};see\uref{23.5Specifyingthewidthofconfidenceintervals}.1.4StataStataStataJournalpdfStatastlogStatasysuseauto,clearsumpricelistpriceifforeign==1regpricempgweightlengthstlog\begin{stlog}sysuseauto,clearsumpricelistpriceifforeign==1regpricempgweightlength\end{stlog}.sysuseauto,clear(1978AutomobileData).regressmpgweightlengthSourceSSdfMSNumberofobs=74F(2,71)=69.34Model1616.080622808.040312ProbF=0.0000Residual827.3788357111.653223R-squared=0.6614AdjR-squared=0.6519Total2443.459467333.4720474RootMSE=3.4137mpgCoef.Std.Err.tP|t|[95%Conf.Interval]weight-.0038515.001586-2.430.018-.0070138-.0006891length-.0795935.0553577-1.440.155-.1899736.0307867_cons47.884876.087877.870.00035.74660.023745(1)StatasjloglogTeXTeXoutput.dooutput1.log.texTEX“D:\CTeX\chps\Report\Stlog”*output.doversion9.0cdD:\CTeX\chps\Report\Stlogsjlogusingoutput1,replacesysuseauto,clearregressmpgweightlengthsjlogclose,replacenologcdStataoutput1LATEXoutput.do.smcl.log.log.texsjlogclosenolog.log(2)LATEXstloginputoutput1.log.tex\begin{stlog}\input{output1.log.tex}\nullskip\end{stlog}nullskiplog\begin{stlog}.sysuseauto(1978AutomobileData){\smallskip}.regressmpgweight{\smallskip}\oom{\smallskip}\cnp\end{stlog}\oom(macro)\cnp.sysuseauto(1978AutomobileData).regressmpgweight(outputomitted)(Continuedonnextpage)6stata.stystlogsjlog.logdotex()TEXStataJournalLATEX.txt.docmaketexLATEX1stlog8-point\fontsize{#}{#}\selectfont[auto]\begin[auto]{stlog}1.5stresultsStata(,r(N),e(cmd))(Scalars)(Macros)(Matries)(Functions)\stresultsgroupregresse()Scalarse(N)numberofobservationse(F)Fstatistice(mss)modelsumofsquarese(rmse)rootmeansquarederrore(dfm)modeldegreesoffreedome(llr)loglikelihoode(rss)residualsumofsquarese(llr0)loglikelihood,constant-onlye(dfr)residualdegreesoffreedommodele(r2)R-squarede(Nclust)numberofclustersMacrose(cmd)regresse(wexp)weightexpressione(depvar)nameofdependentvariablee(clustvar)nameofclustervariablee(model)olsorive(vcetype)covarianceestimationmethode(wtype)weighttypee(predict)programusedtoimplementpredictMatricese(b)coefficientvectore(V)variance–covariancematrixoftheestimatorsFunctionse(sample)