楼主: kentang518
6414 4

[问答] 求助,id.method="identify"提示不是图形参数 [推广有奖]

  • 0关注
  • 0粉丝

已卖:1份资源

大专生

46%

还不是VIP/贵宾

-

威望
0
论坛币
17 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
545 点
帖子
12
精华
0
在线时间
81 小时
注册时间
2018-2-26
最后登录
2023-11-19

楼主
kentang518 发表于 2018-10-13 11:04:58 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
这是《R语言实战》一书中的代码:

library(car)
states<-as.data.frame(state.x77[,c("Murder","Population","Illiteracy","Income","Frost")])
fit<-lm(Murder~Population+Illiteracy+Income+Frost,data=states)
influencePlot(fit, id.method="identify" ,main="Influence Plot",
              sub="Circle size is proportional to Cook's distance")

我在r中输入这代码一直提示"id.method"不是图形参数,然后书上面说id.method="identify" 会产生图形交互,点击图上的点会标注函数中label选项的设定值,但是图上根本没有产生交互式绘图,点击也没反应。

我的car包是3.0.2版本,是不是版本的问题?



二维码

扫码加我 拉你入群

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

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

关键词:identify Method Identi ETH IDE

沙发
不会经济的小豆 发表于 2018-11-11 16:30:06
记得以前可以的,最近重新看看也遇到这个问题,是不是改了之类

藤椅
lion果 发表于 2019-1-21 22:43:13
今天用3.5.2版本 遇到同样的问题

板凳
qimingxingwen 发表于 2019-5-7 22:38:52
今天也遇到了这个问题,看文档后发现使用方法变了。
Usage
influencePlot(model, ...)

## S3 method for class 'lm'
influencePlot(model, scale=10,  
xlab="Hat-Values", ylab="Studentized Residuals", id=TRUE, ...)
Arguments
model        
a linear or generalized-linear model.

scale        
a factor to adjust the size of the circles.

xlab, ylab        
axis labels.

id        
settings for labelling points; see link{showLabels} for details. To omit point labelling, set id=FALSE; the default, id=TRUE is equivalent to id=list(method="noteworthy", n=2, cex=1, col=carPalette()[1], location="lr"). The default method="noteworthy" is used only in this function and indicates setting labels for points with large Studentized residuals, hat-values or Cook's distances. Set id=list(method="identify") for interactive point identification.

...        
arguments to pass to the plot and points functions.
所以现在调用,可以采用这种方式,如:
influencePlot(fit, id=list(method="identify"), main="Influence Plot", sub="Circle size is proportional to Cook's distance")

报纸
精分儿冲鸭 发表于 2020-7-18 11:38:36
qimingxingwen 发表于 2019-5-7 22:38
今天也遇到了这个问题,看文档后发现使用方法变了。
Usage
influencePlot(model, ...)
牛逼{:3_59:}

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

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