Hello, thank you very much for the quick answer. This works well. it draws a nice ellipse in the right orientation. However, I doubt that the ellipse represents the 95% confidence interval, even if that is the standard-parameter for level is .95. The ellipse surely is to large? Any further help would be greatly appreciated. Best, Jan
bbolker wrote: > > Jan M. Wiener wrote: > >> hello, >> sorry for posting what may be a simple question: >> i do have a matrix of coordinates (positional judgments, see below) and >> now want to calculate and plot the corresponding error ellipse. >> can anyone help me with the exact steps/syntax? >> >> > > Something along the lines of: > > m = colMeans(xyDat) # calc. column means > v = var(xyDat) # compute var-cov matrix > library(ellipse) # you may need install.packages("ellipse") > first > plot(ellipse(v,centre=m),type="l") ## draw the confidence ellipse > points(m[,1],m[,2]) # add the cent(re|er) point > > Of course, I haven't actually tested this ... > > Ben Bolker > > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.