楼主: 落叶无雨
1279 2

[问答] 如何调用函数计算结果? [推广有奖]

已卖:21份资源

教授

4%

还不是VIP/贵宾

-

威望
0
论坛币
9 个
通用积分
118.4230
学术水平
72 点
热心指数
85 点
信用等级
63 点
经验
7505 点
帖子
423
精华
1
在线时间
1539 小时
注册时间
2011-10-22
最后登录
2025-12-19

楼主
落叶无雨 学生认证  发表于 2016-12-6 20:37:19 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

# Step4. Calculateand plot the Moran’s I value for the variable

result<-moran.test(CRIME,col.listw)

print(result)


QQ截图20161206202820.jpg


问题一:如何把调用  Moran I statistic standard deviate = 5.6761,并赋值给一个新变量?



# Step4. Calculateand plot the Moran’s I value for the variable

result<-moran.test(CRIME,col.listw)

print(result)


plot.map(CRIME,col.poly, main= paste ("CRIME",":Moran’sI =", result[1]))


2.jpg


问题二:如何改变图例中数据标签的小数位数?


曾经尝试使用round()函数,未成功,如下图所示:


3.jpg




谢谢!



二维码

扫码加我 拉你入群

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

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

关键词:calculate Variable Result RESUL moran 如何

沙发
落叶无雨 学生认证  发表于 2016-12-6 21:17:56
自己已经解决该问题,方法如下:

> head(result)
$statistic
Moran I statistic standard deviate
                          5.676064

$p.value
[1] 6.891468e-09

$estimate
Moran I statistic       Expectation          Variance
      0.519389978      -0.020833333       0.009058413

$alternative
[1] "greater"

$method
[1] "Moran I test under randomisation"

$data.name
[1] "CRIME  \nweights: col.listw  \n"

> morani=round(result$statistic,3)
> print(morani)
Moran I statistic standard deviate
                             5.676

藤椅
杰然一生 发表于 2016-12-6 22:51:55
恭喜恭喜

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 23:54