全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
1372 0
2010-10-18
悬赏 10 个论坛币 未解决
主要是第二问的解答,用R或者Matlab都可。
3. Data Analysis: (40 pts) We want to study the worldwide distribution and temporal
variation of the Gini Index of Diversity. This requires you to do research of your
own on finding map data in R (country names, country outlines etc). Download from
coursework the data in the text file gini.txt into your folder, use the command
gini=read.table("gini.txt",fill=TRUE) to read in the data. Column 3 and 5 represent
dates at which the Gini indices were measured, columns 2 and 4 contain the
indices corresponding to those dates. Column 1 contains the country.
(a) Using the command is.na (and is negation !is.na) take the subset of observations
that have all the information for both dates.
Compare the dates.
Use the subset to visualize the temporal changes of the Gini indices in the
countries where the indices have been measured at two dates. (Hint: You
have to create a non standard plot which shows as much information about the
temporal changes as possible).
(b) Make as good a map of the data as you can.
Hints: Install one of the R packages such as map or maptools. One of the data
sets available with the package will have the outlines for countries with names,
you will need to match most of the names automatically (match function) and
some of the names by hand.
(c) Interpret your output from the two questions above.

gini.txt

大小:4.52 KB

 马上下载

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群