I am trying to plot an ellipse in R but getting an error message. Here is my code:
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")
Result:
Error in ellipse(mu, sigma, alpha = 0.05, npoints = 200, newplot = TRUE, :
unused arguments (alpha = 0.05, npoints = 200, newplot = TRUE, type = "l")
Then I tried just this:
ellipse(mu, sigma)
Result:
Error in ellipse(mu, sigma) : argument "vec" is missing, with no default
I am not sure argument "vec" is missing unless i do not know what that means.
I then turned my "mu" into a matrix may be that will help but got same result.
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")
I uninstalled R and re-istalled the latest but to no avail.
I checked: ??ellipse
I seem to be writing the code correctly but with no success.
Your assistance is appreciated.