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? > xyDat X Y 1 -0.49 -2.13 2 0.91 0.48 3 0.20 -2.80 4 -0.76 -3.23 5 -0.36 2.50 6 1.38 1.24 7 -1.73 -2.14 8 -0.28 -1.97 9 -2.65 0.91 10 -2.03 0.92 11 0.40 -1.54 12 -1.40 2.39 thank you very much in advance. best jan
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? > xyDat X Y 1 -0.49 -2.13 2 0.91 0.48 3 0.20 -2.80 4 -0.76 -3.23 5 -0.36 2.50 6 1.38 1.24 7 -1.73 -2.14 8 -0.28 -1.97 9 -2.65 0.91 10 -2.03 0.92 11 0.40 -1.54 12 -1.40 2.39 thank you very much in advance. best jan -- Dr. Jan M. Wiener LPPA - Coll?ge de France - CNRS 11, place Marcelin Berthelot 75005 Paris, France - e-mail: mail at jan-wiener.net url: www.jan-wiener.net phone: +33 (0)1 44 27 14 21
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.