Eviews作图操作Word下载.docx
- 文档编号:19918103
- 上传时间:2023-01-12
- 格式:DOCX
- 页数:29
- 大小:240.55KB
Eviews作图操作Word下载.docx
《Eviews作图操作Word下载.docx》由会员分享,可在线阅读,更多相关《Eviews作图操作Word下载.docx(29页珍藏版)》请在冰豆网上搜索。
Copygf1gf3
–inbox(去掉边框)
!
Copygf1gf4
size(8,3)(修改为8,3虚拟英寸)
Graphgf1gf2gf3gf4
–display
(2,1,1)
Deletegf
2.坐标轴
有些图形命令,如line,对多个序列作图时,有如下坐标轴选项:
a:
自动选择坐标轴,横轴在底部,纵轴在左边。
d:
双坐标轴,第一个序列对应左边的坐标轴,其他序列对应右边的坐标轴,第一个序列的图形与其他序列不相交。
$
x:
同d,但允许相交。
n:
将序列标准化。
例如
graphrspr
copygf1gf2
(left)log(采用对数坐标)
copygf1gf3
(2)axis(right)(将价格水平的坐标放到右边)
copygf3gf4
overlap(允许相交)
graphgf1gf2gf3gf4
}
(2,2,2)
deletegf
showgfas
命令scale有invert和range等选项,设置反向坐标轴和坐标轴的标注范围。
如
Graphlog(gdp)
Copygf1gf2
invert
Copygf1gf3
linearzero
Copygf1gf4
】
range(4,8)
Graphgf1gf2gf3gf4
Deletegf
Showgfa1
坐标的外观,时间标度等也可以进行设置。
Graphlog(rs)
mirrorzeroline(增加零线,左右同时给出刻度)
—
interval(year,10)(横轴刻度是10年)
–labelgridticksin(去掉标度,增加网格线,刻度在里面)
Showgfag
wfopenhs
#
smpl1988@last
graphhs
showgf1
format(yyyy)interval(year,1)
-display
showgf2
format(yyyy)interval(year,1)-span
graphgf1gf2
showgf
3.颜色和线型
:
wfopendemo
smpl1990@last
graphgdpm1
(2)lcolor(orange)lwidth
(2)
showgf3
(1)lpat(dash1)symbol(star)
showgf4
-color
Smpl@all
Showgf1c
4.填充和纹线
matrix(2,3)mm
"
1,5,3,4,6,2
showmm
freeze(gf1)
–color
(1)gray(5)hatch(7)
·
(2)gray
(1)hatch(3)
(3)gray(3)hatch(4)
showgff
5.标注
>
可以用addtext命令在图形中添加文字,用draw命令突出某些内容。
例如graphrs
showrs
closers
(t)"
shorttreminterestrate"
(l)"
percent"
(shade,bottom,rgb(235,200,180))8085
(dashline,left,color(red))8
。
showgfat
6.图例
可以控制图例的位置、文本和外观。
graphlog(gdp)log(m1)prrs
(3)PriceLevel
-inboxposition,columns
(1)
/
(4)
showgfag
font(20)设置字体
–display不要图例
四、图形模板
通过模板,可以复制图形类型、线型和填充的设置、坐标轴的标度方式、图例的各种属性和图框的各种设定等。
graphlog(gdp)log(m1)
showgf0
?
(1)lwidth(4)
(2)symbol
(1)
(shade,bottom)8085
graph(o=gf0)pr*10rs
graph(t=gf0)pr*10rs
还可以在图形创建后再应用模板,例如
Graphpr*10rs
(o)gf0
(t)gf0
五、打印和导出
保存成图形文件。
Save命令支持三种常用的矢量图形文件,分别是wmf文件、emf文件、eps文件。
(t=wmf,u=in,w=4,-c)mygf
命令名:
freeze\graph\save\merge\align\template\options\name\addtext\legend\draw\scale\setelem
直方图
hist
关键字hist为命令distplot的分析设定(analyticalspec)。
hist有自己的选项。
标度类型:
scale={dens,freq,relfreg},分别表示密度直方图、频数直方图(默认)和频率直方图。
柱宽:
binw={eviews,sigma,iqr,silverman,freefman}.
锚点:
anchor=num
分界点:
rightclosed
图例文字:
leg={def,n,s,det},默认给出最少信息,其他三个选项对应的图例文字信息分别为无文本、短文本和详细信息。
折现直方图:
distplotfreqpoly
边线直方图:
distplotedgefreqpoly
移位直方图:
distplotash
freeze(gf01)freqpoly
showgf01
Freeze(gf02)edgefreqpoly(fill)
showgf02
freeze(gf03)histash
showgf03
freeze(gf04)hist(binw=silverman,anchor=ash
showgf04
<
增加正态分布曲线:
选中要画图的序列,打开,点view/gragh在specific里选中distribution,右边的distribution框选择histogram。
点击右边的option,在弹出来的框里点add,弹出的add框里选TheoreticalDensity。
点击ok再点击ok。
最后点击ok。
经验分布函数图
Eviews5cdfplot
Eviews7distplotcdf
Distplotcdf命令,默认绘制累积分布函数函数(选项c),还支持生存函数(选项s)和分位数函数(选项q)。
cdf
(说明:
showsthecumulativedistributionplotforlnwage,alongwiththedefault95%confidenceintervals.)
cdf(noci)则是不显示95%的置信区间
、
survivor(noci)
groupgro1weightheight
logsurvivor(ci=,leg=det)
(说明displaysthelog-survivorplotsforWEIGHTandHEIGHTalongwith90%confidenceintervals,andadetailedlegend.Theplotswillbedisplayedinindividualgraphframes.)
(s)quantile
(说明showsthequantileplotsforWEIGHTandHEIGHTinthesamegraphframe.)
QQ图
比较两个分布的工具。
如果分布相同,QQ图应该是一条直线。
理论QQ图(正态分布n,均匀分布u,指数分布e,Logistic分布l,第一类极值分布x),经验QQ图(s=name).
serieswage=exp(lnwage)
groupwwagelog(wage)
…
freeze(gfw)(n)
showgfw
wfopendemo
rndseed(type=mt)12357
groupdist@rnorm@rchisq(5)
freeze(gf)(s=dist)
(
直接比较PDF.如何绘制序列和某种分布的PDF
Dokernel(@obsrange,b=3,o=mrs)
seriesx
seriesrsk
groupgxrsk
mtos(mrs,g)
genry=@dchisq(x,5)
chi-squre(5)
interestrate
graphxyrsk
showgfd
盒图
wfopengarch
groupgraaar3
freeze(gfb)
showgfb
产生盒图的命令中,boxplot是群对象命令,进行多个序列的盒图比较。
而boxplotby是序列对象的命令,绘制单个序列内不同分组的盒图。
修改盒图元素的命令为setbpelem.例如
Copygfbgfn
ci(notch)
将盒图中间的阴影部分改为凹槽。
*
Syntax语法
boxplot(options)o1[o2o3...]
(options)[categorical_spec(arg)]
whereo1,o2,...,areseriesorgroupobjects.Youmayspecifygeneraloptionsaftertheboxplotkeyword.
Theoptionalcategorical_specallowsyoutospecifyacategoricalgraph(see"
CategoricalSpec"
).
Options
q=arg
Setthequantilemethod,whereargcanbe:
"
r"
-Rankit-Cleveland,"
o"
-Ordinary,"
v"
-vanderWaerden,"
b"
-Blom,"
t"
-Tukey,"
g"
-Gumbel.
rotate
Rotatethegraphsotheobservationaxisisontheleft.
|
Multipleseriesoptions(categoricalgraphsettingswilloverridetheseoptions)
m
Plotboxplotsinmultiplegraphs.
Paneloptions
Thefollowingoptionapplieswhengraphingpanelstructureddata:
panel=arg(defaulttakenfromglobalsettings)
Paneldatadisplay:
stack"
(stackthecross-sections),"
individual"
or"
i"
(separategraphforeachcross-section),"
combine"
c"
(computecross-sectiongraphsinasingleframe).
(Note:
moregeneralversionsofthesepanelgraphsmaybeconstructedascategoricalgraphs.)
Examples
Basicexamples
.
displaysboxplotsfortheseriesWAGE.
groupg1wagesexrace
displaysboxplotsforWAGES,SEXandRACEinasinglegraphframe.
(m,rotate)
placestherotatedboxplotsforeachseriesinaseparateframe.
Panelexamples
(panel=individual)
displaysboxplotsforeachcross-sectioninaseparateframe,while,
(panel=stack)
displaysasingleboxplotcomputedfromthestackedpaneldata.
(panel=combined,rotate)
showsrotatedboxplotscomputedforeachperiod(acrosscross-sections)inasingleframe.
Categoricalspecexamples
across(firm,dispname)
displaysacategoricalboxplotgraphofSER1usingdistinctvaluesofFIRMtodefinethecategories,anddisplayingtheresultinggraphsinmultipleframeswithcommonscaling.EachframeislabeledusingtheFIRMdisplayname.
across(firm,dispname,iscale)
constructsthesamegraphwithindividualscaling.
within(firm,label=value)
constructsaboxplotforeachvalueofFIRManddisplaystheresultsinasingleframe.TheindividualboxplotsarelabeledusingthevalueofFIRMassociatedwiththecategory.
across(firm)within(income,bintype=quant,bincount=4)
constructsacategoricalboxplotwithFIRMdefiningtheacrossdimension,andINCOMEdefiningthewithindimension.BoxplotsforeachINCOMEquartileofagivenfirmwillbecontainedinasingleframe,withdifferentfirmsdisplayedindifferentframes.
¥
within(sex)within(union)
createsanboxplotforwithincategoriesbasedonbothSEXandUNION.Sincewehavenotspecifiedbehaviorfortheimplicit@SERIESinGRP1,eachseriesinthegroupwillbedisplayedinaseparateframe,withindividualscaling.
element_list
Theelement_listmaycontainoneormoreofthefollowing:
median,med/-median,-med
[Show/Donotshow]themedians.
mean/-mean
[Show/Donotshow]themeans.
whiskers,w/-whiskers,-w
[Show/Donotshow]thewhiskers(linesfromtheboxtothestaples).
,
staples,s/-staples,-s
[Show/Donotshow]thestaples(linesdrawnatthelastdatapointwithintheinnerfences).
near/-near
[Show/Donotshow]thenearoutliers(valuesbetweentheinnerandouterfences).
far/-far
[Show/Donotshow]thefaroutliers(valuesbeyondtheouterfences).
width(arg)(default="
fixed"
)
Setthewidthsettingsfortheboxplots,whereargisoneof:
(uniformwidth),"
n"
(proportionaltosamplesize),"
rootn"
(proportionaltothesquarerootofsamplesize).
Setthedisplaymethodfortheconfidenceintervals,whereargisoneof:
none"
(donotdisplay),"
shade"
(shadedintervals),"
notch"
(notchedintervals).
-farwidth(n)ci(notch)
hidesthefaroutliers,setstheboxwidthsproportionaltothenumberofobservations,andenablesnotchingoftheconfidenceintervals.
distplot
Displayadistributiongraph.
Syntax
distplot(options)o1[o2o3...]
(options)analytical_spec(arg)[categorical_spec(arg)]
whereo1,o2,...,areseriesorgroupobjects.
Whenusedasacommand,distplotonlyallowsyoutodisplaythedefaulthistogramview.
Whenusedasanobjectview,youmustspecifythetypeofdistributiongraphyouwishtocreateintheanalytical_spec.Youmayselectfrom:
histogram,histogrampolygon,histogramedgepolygon,averageshiftedhistogram,kerneldensity,theoreticaldistribution,empiricalCDF,empiricalsurvivor,empiricallogsurvivor,orempiricalquantile(see"
AnalyticalSpec"
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Eviews 作图 操作