[R] plotting muliple CI ellipses for EB estimates
jfox at mcmaster.ca
Sun Apr 13 20:46:21 CEST 2008
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 Fox, Professor
Department of Sociology
Hamilton, Ontario, Canada L8S 4M4
> -----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
> subjects and I would like to plot the slopes and intercepts with
> ellipses. These ellipses would be based on the confidence intervals for
> 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
> argument would allow me to over-plot. There are three arguments that
> the ellipse.
> 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
> 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
> more about the geometry of ellipse, but if anybody can provide any
> I would really appreciate it.
> ********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
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help