m <- c(2,7); a<-5; b<-2; phi<-pi/7
df1 <- 2; df2 <- 20
# show F for different confidence levels:
p <- c(0.5, 0.75, 0.8, 0.95)
qf(p, df1, df2) # 0.717735 1.486984 1.746189 3.492828
# error in check but not in direct execution
el7 <- conf.ellipse(60,m,a,b,phi,df1,df2,p[2])
plot(el7,type="n",xlab="",ylab="")
lines(conf.ellipse(60,m,a,b,phi,df1,df2,p[1]),lty=2,col="red")
lines(conf.ellipse(60,m,a,b,phi,df1,df2,p[3]),lty=2,col="green")
lines(conf.ellipse(60,m,a,b,phi,df1,df2,p[4]),lty=2,col="blue")
lines(el7,lty=2,col="orange")
legend(x="bottom",paste(as.character(p*100),rep("%",length(p)),
sep=""), col = c("red", "orange","green","blue"), text.col=
"black", lty = c(2,2,2,2), merge = TRUE, bg='white', cex=0.9)
Run the code above in your browser using DataLab