Re: [R] calculating area of ellipse

2021-05-11 Thread John Fox
Dear Jeff, I don't think that it would be sensible to claim that it *never* makes sense to multiply quantities measured in different units, but rather that this would rarely make sense for regression coefficients. James might have a justification for finding the area, but it is still, I think

Re: [R] calculating area of ellipse

2021-05-11 Thread Michael Dewey
Dear Stephen In that application the axes would be sensitivity and specificity (or their inverses) or some transformation of them like logits so the units would be the same. Whether the area has any scientific meaning I am not sure. Michael On 11/05/2021 15:20, Stephen Ellison wrote: In do

Re: [R] calculating area of ellipse

2021-05-11 Thread Jeff Newmiller
The area is a product, not a ratio. There are certainly examples out there of meaningful products of different units, such as distance * force (work) or power " time (work). If you choose to form a ratio with the area as numerator, you could conceivably obtain the numerator with force snd dista

Re: [R] calculating area of ellipse

2021-05-11 Thread John Fox
Dear Stephen, On 2021-05-11 10:20 a.m., Stephen Ellison wrote: >> In doing meta-analysis of diagnostic accuracy I produce ellipses of confidence >> and prediction intervals in two dimensions. How can I calculate the area of >> the ellipse in ggplot2 or base R? > > There are established formul

Re: [R] calculating area of ellipse

2021-05-11 Thread Stephen Ellison
> In doing meta-analysis of diagnostic accuracy I produce ellipses of confidence > and prediction intervals in two dimensions. How can I calculate the area of > the ellipse in ggplot2 or base R? There are established formulae for ellipse area, but I am curious: in a 2-d ellipse with different qu

Re: [R] calculating area of ellipse

2021-05-07 Thread Jim Lemon
Hi John, Thanks for that. An education for me and my advice to use "str" to check for the radii in the return value was clearly mistaken. Jim On Sat, May 8, 2021 at 2:15 AM John Fox wrote: > > Dear David and Jim, > > As I explained yesterday, a confidence ellipse is based on a quadratic > form

Re: [R] calculating area of ellipse

2021-05-07 Thread John Fox
Dear David and Jim, As I explained yesterday, a confidence ellipse is based on a quadratic form in the inverse of the covariance matrix of the estimated coefficients. When the coefficients are uncorrelated, the axes of the ellipse are parallel to the parameter axes, and the radii of the ellips

Re: [R] calculating area of ellipse

2021-05-06 Thread David Winsemius
On 5/6/21 6:29 PM, Jim Lemon wrote: Hi James, If the result contains the major (a) and minor (b) axes of the ellipse, it's easy: area<-pi*a*b ITYM semi-major and semi-minor axes. -- David try using str() on the result you get. Jim On Fri, May 7, 2021 at 3:51 AM james meyer wrote:

Re: [R] calculating area of ellipse

2021-05-06 Thread Jim Lemon
Hi James, If the result contains the major (a) and minor (b) axes of the ellipse, it's easy: area<-pi*a*b try using str() on the result you get. Jim On Fri, May 7, 2021 at 3:51 AM james meyer wrote: > > In doing meta-analysis of diagnostic accuracy I produce ellipses of confidence > and predic

Re: [R] calculating area of ellipse

2021-05-06 Thread John Fox
Dear James, To mix notation a bit, presumably the (border of the) confidence ellipse is of the form (b - beta)'V(b)^-1 (b - beta) = c, where V(b) is the covariance matrix of b and c is a constant. Then the area of the ellipse is pi*c^2*sqrt(det(V(b))). It shouldn't be hard to translate that in

[R] calculating area of ellipse

2021-05-06 Thread james meyer
In doing meta-analysis of diagnostic accuracy I produce ellipses of confidence and prediction intervals in two dimensions. How can I calculate the area of the ellipse in ggplot2 or base R? thank you James Meyer __ R-help@r-project.org mailing list -- T