110 likes | 125 Views
类别 资料 分析 Categorical Data Analysis 王德育 (T.Y. Wang) 伊利诺州立大学 (Illinois State University) tywang@ilstu.edu. 1. Stata 简介. 启动 Stata 四个视窗 : 「结果视窗」( Results window ),「指令视窗」( Command Window ), 「变量视窗」( Variable Window )以及「回顾视窗」( Review Window ). Stata 指令的运用 开启现有的数据库 (economy.dta) 主选单 取得数据库相关的资讯
E N D
类别资料分析Categorical Data Analysis王德育(T.Y. Wang)伊利诺州立大学(Illinois State University)tywang@ilstu.edu 1
启动Stata • 四个视窗: 「结果视窗」(Results window),「指令视窗」(Command Window), 「变量视窗」(Variable Window)以及「回顾视窗」(Review Window)
Stata指令的运用 • 开启现有的数据库 (economy.dta) • 主选单 • 取得数据库相关的资讯 • Data/describe data /describe data in memory • sum; tab1
回归分析指令 • 储存分析结果 • 储存指令(do file)
建立数据库:data/data editor • 更改变量名: 在data editor中, data/variable manager • 更改变量名 • rename var1 year • 变量标签 • label variable dfem "female"
变量值标签 • label define yesno 1 yes 0 no • label values dfem dblack dmar yesno
建立新变量 • gen dmale=dfem • recode dmale 1=0 0=1 • recode dmale 1=0 0=1 if dmar==1
下载SPost指令(Stata Postestimation commands) • search spost, net spost9_ado from http://www.indiana.edu/~jslsoc/stata Distribution-date: 21Dec2010 / spost9_ado Stata 9, 10 & 11 commands for the post-estimation interpretation / of regression models. Use package spostado.pkg for Stata 8. / Based on Long & Freese - Regression Models for Categorical Dependent / Variables Using Stata. Second Edition. / Support
Sample files spost9_do from http://www.indiana.edu/~jslsoc/stata spost9_do Stata 9 - SPost example do files. / Long & Freese 2005 Regression for Categorical Dependent Variables / using Stata. Second Edition. Stata Version 9. / Support www.indiana.edu/~jslsoc/spost.htm / Scott Long & Jeremy Freese (spostsup@indiana.edu)