代码拉取完成,页面将自动刷新
同步操作将从 连享会/statabook-PSM-倾向得分Stata实操-kmatch 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
*******************************************************************************
*General Do-File Header*
clear all //clear memory
capture log close //close any log-files (if still running)
*version 15.0 //your current version, change this to your version (and remove asterisk)!
set more off //do not halt to show all output
*******************************************************************************
***Setting your current working directory***
cd "C:/Users/username/stata-course/"
/*You must replace this generic example with the path to the folder
where your files are saved*/
***Showing current working directory***
pwd
***Show all files in the current folder***
dir
ls //Alternative command
*use "filename.dta" //Open desired Stata file
***Alternative: absolute folder paths***
*use "C:\Users\username\stata-course\filename.dta"
***Entering data manually***
clear all //Start with a fresh memory
set obs 10 //10 observations (cases)
generate age = .
generate income = .
generate gender = .
edit //Edit data
browse //Inspect data
***Using preinstalled data***
sysuse auto, clear //Open preinstalled file
describe //Inspect data
***Exporting data to (open) file formats***
outsheet using "auto_export.csv" //CSV - Comma Separated Values
export excel using "etest.xls" //XLS - Microsoft Excel File Format
***Delimit and line breaks***
sysuse nlsw88, clear
#delimit ; //Tell Stata that all commands end with a semicolon from here on
count if age < 40 &
smsa == 1 &
wage > 20 &
grade >= 7; //Finally end your long command with the semicolon
#delimit cr //Restore standard settings
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。