[R] plotting muliple CI ellipses for EB estimates

John Fox jfox at mcmaster.ca
Sun Apr 13 20:46:21 CEST 2008


Dear Samuel,

The radius reflect the desired coverage of the ellipse. You should be able
to use  radius <- sqrt(qchisq(.95, 2)), I think.

I hope this helps,
 John

--------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Sam Field
> Sent: April-13-08 11:47 AM
> To: r-help at r-project.org
> Subject: [R] plotting muliple CI ellipses for EB estimates
> 
> I have empirical Bayes estimates for slopes and intercepts for a number
> of
> subjects and I would like to plot the slopes and intercepts with
> confidence
> ellipses. These ellipses would be based on the confidence intervals for
> the
> slope and intercepts (forming the major and minor axis of each
> ellipse), and
> the correlation in the slope and intercepts.
> 
> 
> The ellipse function in the car library looks like the way to go, the
> add=
> argument would allow me to over-plot.  There are three arguments that
> generate
> the ellipse.
> 
> center
> shape
> radius
> 
> Center would be the posterior means for the intercept and slopes.
> shape would be the posterior covariance matrices (I think)
> 
> I don't know what I would use for the radius argument however. My guess
> would
> be the upper bound of a confidence interval for either the slope or the
> intercept, but this does not return sensible results. I guess I need to
> know
> more about the geometry of ellipse, but if anybody can provide any
> assistance,
> I would really appreciate it.
> 
> 
> thanks!
> 
> 
> 
> --
> ********Note the new contact information*******
> 
> Samuel H. Field, Ph.D.
> Senior Research Investigator
> CHERP/Division of Internal Medicine - University of Pennsylvania
> Philadelphia VA Medical Center
> 3900 Woodland Ave (9 East)
> Philadelphia, PA 19104
> (215) 823-5800 EXT. 6155 (Office)
> (215) 823-6330 (Fax)
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list