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
--
View this message in context:
http://www.nabble.com/calculating-plotting-error-ellipses-tf4509082.html#a12864033
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
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.