[R] plotting muliple CI ellipses for EB estimates
fieldsh at mail.med.upenn.edu
Sun Apr 13 17:46:48 CEST 2008
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
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.
********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)
More information about the R-help