高级计量经济学及stata应用(第2版)_一文读懂108个常用stata命令

ec50c62f02c89aee0a876e337f5ea79f.png

本文由计量经济学服务中心编辑整理,转载请注明出处。下面命令按照重要程度以及相关分析方法步骤等依次列出。

Some useful Stata commands

help : online help on a specific command

findit : online references on a keyword or topic

ssc : access routines from the SSC Archive

pwd : print the working directory

cd : change the working directory

log : log output to an external file

tsset : define the time indicator for timeseries or panel data

compress : economize on space used by variables

clear : clear memory

quietly : do not show the results of a command

update query : see if Stata is up to date

adoupdate : see if user-written commands are up to date

exit : exit the program (,clear if dataset is not saved)

 Data manipulation commands

generate : create a new variable

describe : describe a data set or current contents of memory

replace : modify an existing variable

rename : rename variable

renvars : rename a set of variables

sort : change the sort order of the dataset

drop : drop certain variables and/or observations

keep : keep only certain variables and/or observations

append : combine datasets by stacking

merge : merge datasets (one-to-one or match merge)

encode : generate numeric variable from categorical variable

recode : recode categorical variable

destring : convert string variables to numeric

foreach : loop over elements of a list, performing a block of code

forvalues : loop over a numlist, performing a block of code

local : define or modify a local macro (scalar variable)

use : load a Stata data set

save : write the contents of memory to a Stata data set

insheet : load a text file in tab- or comma-delimited format

infile : load a text file in space-delimited format or as defined in a

dictionary

outfile : write a text file in space- or comma-delimited format

outsheet : write a text file in tab- or comma-delimited format

contract : make a dataset of frequencies

collapse : make a dataset of summary statistics

tab : abbreviation for tabulate: 1- and 2-way tables

table : tables of summary statistics

Statistical commands

summarize : descriptive statistics

correlate : correlation matrices

ttest : perform 1-, 2-sample and paired t-tests

anova : 1-, 2-, n-way analysis of variance

regress : least squares regression

predict : generate fitted values, residuals, etc.

test : test linear hypotheses on parameters

lincom : linear combinations of parameters

cnsreg : regression with linear constraints

testnl : test nonlinear hypothesis on parameters

margins : marginal effects (elasticities, etc.)

ivregress : instrumental variables regression

prais : regression with AR(1) errors

sureg : seemingly unrelated regressions

reg3 : three-stage least squares

qreg : quantile regression

Limited dependent variable estimation commands

logit, logistic : logit model, logistic regression

probit : binomial probit model

tobit : one- and two-limit Tobit model

cnsreg : Censored normal regression (generalized Tobit)

ologit, oprobit : ordered logit and probit models

mlogit : multinomial logit model

poisson : Poisson regression

heckman : selection model

 Time series estimation commands

arima : Box–Jenkins models, regressions with ARMA errors

arfima : Box–Jenkins models with long memory errors

arch : models of autoregressive conditional heteroskedasticity

dfgls : unit root tests

corrgram : correlogram estimation

var : vector autoregressions (basic and structural)

irf : impulse response functions, variance decompositions

vec : vector error–correction models (cointegration)

sspace : state-space models

dfactor : dynamic factor models

ucm : unobserved-components models

rolling: prefix permitting rolling or recursive estimation over subsets

 Panel data estimation commands

xtreg,fe : fixed effects estimator

xtreg,re : random effects estimator

xtgls : panel-data models using generalized least squares

xtivreg : instrumental variables panel data estimator

xtlogit : panel-data logit models

xtprobit : panel-data probit models

xtpois : panel-data Poisson regression

xtgee : panel-data models using generalized estimating equations

xtmixed : linear mixed (multi-level) models

xtabond : Arellano-Bond dynamic panel data estimator

◆◆◆◆

精彩回顾

14f8ad6caa3b25c7fd320d0a5cf9ad0e.png

点击上图查看:

Stata寒假研讨班_2020年1月_第13&14届“高级计量经济学及stata应用”研讨班@上海/北京专场_火热报名中

6bc0891724f2f43445113b3a0c2adbf4.png

点击上图查看:

《空间计量三部曲:零基础|轻松搞定空间计量:空间计量及GeoDa、Stata、Matlab应用》

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值