




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、Stata學(xué)習(xí)討論會第7期:畫圖命令的應(yīng)用產(chǎn)業(yè)經(jīng)濟學(xué) 肖寒主要內(nèi)容1.2.3.4.5.散點圖直方圖條形圖餅圖如何美化圖表畫圖的意義描述性統(tǒng)計是研究的基礎(chǔ)部分,在進行計量分析前需要知道數(shù)據(jù)“長什么樣”作圖是描述數(shù)據(jù)、直觀表達數(shù)據(jù)規(guī)律的有效工具作圖有助于尋找研究問題作圖為論文的研究內(nèi)容服務(wù)基本描述性統(tǒng)計基本描述性統(tǒng)計散點圖作用:兩個變量之間的規(guī)律基本命令:twoway scatter varlist if in weight , options選項:marker_options marker_label_options connect_options composite_style_option
2、jitter_options axis_choice_options twoway_optionsaspect ratio, etc.change look of markers (color, size, etc.) add marker labels; change look or positionchange look of lines or connecting method overall style of the plotjitter marker positions using random noise associate plot with alternate axistitl
3、es, legends, axes, added lines and text, by, regions, name,marker_optionsDescriptionmsymbol(symbolstylelist) mcolor(colorstylelist)outmsize(markersizestylelist) msangle(anglestyle) mfcolor(colorstylelist) mlcolor(colorstylelist) mlwidth(linewidthstylelist)mlalign(linealignmentstyle)shape of markerco
4、lor and opacity of marker, inside andsize of markerangle of marker symbolinside or fill color and opacity color and opacity of outlinethickness of outlineoutline alignment (inside, outside,center)overall style of outlinemlstyle(linestylelist)mstyle(markerstylelist)overall style of markermarker_label
5、_optionsDescriptionmlabel(varlist)specify marker variablesmlabposition(clockposlist) mlabvposition(varname) mlabgap(relativesizelist) mlabangle(anglestylelist) mlabsize(textsizestylelist) mlabcolor(colorstylelist)mlabtextstyle(textstylelist)where to locate label where to locate label 2gap between ma
6、rker and label angle of labelsize of labelcolor and opacity of label overall style of textmlabstyle(markerlabelstylelist) overall style of labelconnect_optionsDescriptionconnect(connectstylelist)how to connect pointssort(varlist)cmissing(y|n .)how to order data before connectingmissing values are ig
7、noredlpattern(linepatternstylelist)line pattern (solid, dashed, etc.)lwidth(linewidthstylelist)lcolor(colorstylelist) lalign(linealignmentstyle)thickness of line color and opacity of lineline alignment (inside, outside, center)lstyle(linestylelist)overall style of line直方圖作用:檢驗數(shù)據(jù)的分布、檢驗異常值基本命令:histogr
8、am varname if in weight , continuous_opts | discrete_opts options Options:bin(#) width(#) density fraction frequency percent normalkdensityset number of bins to # set width of bins to #draw as density; the default draw as fractionsdraw as frequencies draw as percentagesadd a normal density to the gr
9、aphadd a kernel density estimate to the graph條形圖作用:分組展示數(shù)據(jù)基本命令:graph bar yvars if in weight , options graph hbar yvars if in weight , options餅圖作用:分組展示比例基本命令:graph pie varname if in weight, over(varname)選項:pie(numlist|_allplabel(#|_all sum|percent|name|text美化圖表美化圖表選顏色:help colorsytle調(diào)整green%50:mcolor(
10、%30) 調(diào)整亮度: green*.8bcolor(*.7)美化圖表散點圖:graph tw (scatter y x)(lfit y x ) if “xxx)直方圖:,graphregion(color(white) legend(label(1graph twoway (hist x1if, color(eltblue*0.5)/( hist x2if, lcolor(black) fcolor(none) ) /(kdensity x1 if(kdensity x2 if, lpattern(solid) lcolor(red) lwidth(medthick) /, lpattern(
11、dash)lcolor(red) lwidth(medthick), /legend(label(1 “xxx) label(2 “xxx) /label(3 “xxx) label(4 “xxx) graphregion(color(white)美化圖表條形圖:twoway (barmonth_avg year if year2018, yaxis(2) barwidth(.3)lcolor(gs12) fcolor(gs12) xtitle() ytitle(“/) yscale(range(2 9) axis(2)(barmonth_avg_emp year if year2018, b
12、arwidth(.3) fcolor(none) lcolor(red) yaxis(2) xtitle() ytitle() ) /(connect employment_rate year if year2018, yaxis(1) lpattern(dash) xtitle() ytitle() yscale(range(.4 .5) axis(1),/legend(label(1 ) label(2 )label(3 ) /rows(3) ring(0) pos(11) region(lcolor(white) graphregion(fcolor(white)美化圖表餅圖:graph
13、 pie x if year = 2017, over(category) pie(1, explode color(red*.8) plabel(1 ) /pie(2, explode color(red*.4) plabel(2 xxx) /pie(5, explode color(blue*.4) plabel(5 pie(3, explode color(red*.2) plabel(3 pie(6, explode color(blue*.2) plabel(6 pie(4, explode color(blue*.8) plabel(4 xxxxxx ) / )/xxx ) /xxx) legend(off)美化圖表:中文期刊風(fēng)格ssc install scheme_tufte, replace findit scheme使用方法:sysuse auto.dta, clearset scheme s2colort
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 福建漳州2024~2025學(xué)年高一下冊期末數(shù)學(xué)試題學(xué)生卷
- 個性化營養(yǎng)方案制定考核試卷
- 獸用抗生素批發(fā)政策考核試卷
- 可持續(xù)發(fā)展與企業(yè)綠色物流實踐考核試卷
- 變電站自然災(zāi)害應(yīng)對措施考核試卷
- 化纖漿粕高溫過濾材料的生物降解性探討考核試卷
- 一次性護目鏡的防沖擊與防紫外線性能的國際標(biāo)準(zhǔn)對比考核試卷
- 2025年中國PE不飽和聚酯漆數(shù)據(jù)監(jiān)測報告
- 2025年中國L-酒石酸數(shù)據(jù)監(jiān)測報告
- 2025年中國E-cares面部雕塑系統(tǒng)數(shù)據(jù)監(jiān)測研究報告
- 電廠安規(guī)考試題庫及答案
- 2021-2022學(xué)年浙江省杭州市拱墅區(qū)英語小升初新生分班考試卷 附解析
- 2024-2025學(xué)年人教版(2024)初中英語七年級下冊教學(xué)工作總結(jié)(共4套)
- Unit 1 Happy Holiday 第5課時(Section B 2a-3c) 2025-2026學(xué)年人教版英語八年級下冊
- 2025年中國三元乙丙橡膠市場調(diào)查研究報告
- 常見耐藥菌感染診療與防控
- 征兵體檢外科標(biāo)準(zhǔn)
- 小學(xué)生預(yù)防拐騙教育課件
- 2025-2030年中國基于細胞的人源化小鼠模型行業(yè)市場現(xiàn)狀供需分析及投資評估規(guī)劃分析研究報告
- 2025至2030中國無線通訊檢測行業(yè)市場發(fā)展分析及競爭格局與投資機會報告
- 2025年上海徐匯區(qū)高一(下)信息技術(shù)合格考試題及答案
評論
0/150
提交評論