Re: [R] BUG: atan(1i) / 5 = NaN+Infi ?

2024-09-06 Thread Jorgen Harmse via R-help
It seems to me that the documentation of R's complex class & R's atan function do not tell us what to expect, so (as others have suggested), some additional notes are needed. I think that mathematically atan(1i) should be NA_complex_, but R seems not to use any mathematically standard compactifi

Re: [R] BUG: atan(1i) / 5 = NaN+Infi ?

2024-09-06 Thread Richard O'Keefe
G.5.1 para 2 can be found in the C17 standard -- I actually have the final draft not the published standard. It's in earlier standards, I just didn't check earlier standards. Complex arithmetic was not in the first C standard (C89) but was in C99. The complex numbers do indeed form a field, and

Re: [R] Fwd: effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Gregg Powell via R-help
Need to kill some time, so thought I'd Opine. Given the intent, as I understood it... to extract components from a quantile regression (rq) object similar to how one might extract effects from an lm object. Since it seems effects() is not implemented for rq, here are some alternative approach

Re: [R] BUG: atan(1i) / 5 = NaN+Infi ?

2024-09-06 Thread Martin Maechler
> Duncan Murdoch > on Fri, 6 Sep 2024 05:54:23 -0400 writes: > On 2024-09-06 12:44 a.m., Richard O'Keefe wrote: >> I expect that atan(1i) = (0 + infinity i) and that atan(1i)/5 = (0 + >> infinity i)/5 = (0 + infinity i). >> Here's what I get in C: >> (0,1) = (0, 1)

Re: [R] BUG: atan(1i) / 5 = NaN+Infi ?

2024-09-06 Thread Duncan Murdoch
On 2024-09-06 12:44 a.m., Richard O'Keefe wrote: I expect that atan(1i) = (0 + infinity i) and that atan(1i)/5 = (0 + infinity i)/5 = (0 + infinity i). Here's what I get in C: (0,1) = (0, 1) atan((0,1)) = (0, inf) atan((0,1))/5 = (0, inf) Note the difference between I*infinity = (0,1)*infinity =

Re: [R] Calculation of VCV matrix of estimated coefficient

2024-09-06 Thread peter dalgaard
> On 5 Sep 2024, at 16:36 , Gabor Grothendieck wrote: > > sigma(model)^2 will give the correct MSE. Also note that your model > matrix has intercept at > the end whereas vcov will have it at the beginning so you will need to > permute the rows > and columns to get them to be the same/ Also,

[R] Fwd: effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Koenker, Roger W
Apologies, forgot to copy R-help on this response. Begin forwarded message: From: Roger Koenker Subject: Re: [R] effects() extractor for a quantile reqression object: error message Date: September 6, 2024 at 8:38:47 AM GMT+1 To: "Christopher W. Ryan" Chris, This was intended to emulate the

Re: [R] BUG: atan(1i) / 5 = NaN+Infi ?

2024-09-06 Thread Martin Maechler
> Richard O'Keefe > on Fri, 6 Sep 2024 17:24:07 +1200 writes: > The thing is that real*complex, complex*real, and complex/real are not > "complex arithmetic" in the requisite sense. > The complex numbers are a vector space over the reals, Yes, but they _also_ are field

Re: [R] effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Martin Maechler
> Christopher W Ryan via R-help > on Thu, 5 Sep 2024 22:50:24 -0400 writes: > I'm using quantreg package version 5.98 of 24 May 2024, in R 4.4.1 on > Linux Mint. > The online documentation for quantreg says, in part, under the > description of the rq.object, "The coef