我正在尝试在R中绘制椭圆,但收到错误消息。这是我的代码:
library(mixtools) ###I also tried library(ellipse)
mu<-c(.564,.603)
sigma<-matrix(c(0.0144,0.0117,0.0117,0.0146),2)
ellipse(mu,sigma,alpha=0.95,npoints=200,newplot=TRUE,type="l")
结果:
Error in ellipse(mu, sigma, alpha = 0.05, npoints = 200, newplot = TRUE, :
unused arguments (alpha = 0.05, npoints = 200, newplot = TRUE, type = "l")
然后我尝试了这个:
ellipse(mu, sigma)
结果:
Error in ellipse(mu, sigma) : argument "vec" is missing, with no default
我不确定论证&#34; vec&#34;除非我不知道这意味着什么,否则就会失踪。
然后我把我的&#34; mu&#34;进入矩阵可能有助于获得相同的结果。mu<-matrix(c(.564,.603),ncol=1)
sigma<-matrix(c(0.0144,0.0117,0.0117,0.0146),2)
ellipse(mu,sigma,alpha=0.05,npoints=200,newplot=TRUE,type="l")
我卸载了R并重新调整了最新但无效。
我查了一下:??ellipse
我似乎正在正确编写代码,但没有成功。
感谢您的协助。