[Rd] eigen in beta

Paul Gilbert pgilbert at bank-banque-canada.ca
Tue Apr 10 21:15:02 CEST 2007


Here is another check that R-2.4.1 is right. This should give 1.

prod(eigen(z, symmetric = FALSE, only.values = TRUE)$values ) *
prod(eigen(solve(z), symmetric = FALSE, only.values = TRUE)$values )

R-2.4.1 gives
[1] 1+0i

R-2.5.0  gives
[1] 1.01677-0i

Paul

Paul Gilbert wrote:

> Here is the example. Pehaps others could check on other platforms. It 
> is only the first eigenvalue that is different.  I am relatively sure 
> the old values are correct, since I compare with an alternate 
> calculation using the expansion of a polynomial determinant.
>
>
> z <- t(matrix(c(
> 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.0064083373167516857, 
> -0.14786612501440565826,  0.368411802235074137,
> 0, 0, 0, 0, 0, 0, 0, 0, 0,  0.0568624483195125444,  
> 0.08575928008564302762, -0.101993668348446601,
> 0, 0, 0, 0, 0, 0, 0, 0, 0,  0.0039684327579889069, 
> -0.00002857482925046247,  0.202241897806646448,
> 1, 0, 0, 0, 0, 0, 0, 0, 0, -0.0222834092601282285, 
> -0.09126708346036176145,  0.644249961695308682,
> 0, 1, 0, 0, 0, 0, 0, 0, 0, -0.0032676036920228878,  
> 0.16985862929849462888,  0.057282326361118636,
> 0, 0, 1, 0, 0, 0, 0, 0, 0,  0.0148488735227452068, 
> -0.06175528918915401677,  0.109566197834008949,
> 0, 0, 0, 1, 0, 0, 0, 0, 0, -0.0392756265125193960,  
> 0.04921079262665441212,  0.078176878215115805,
> 0, 0, 0, 0, 1, 0, 0, 0, 0, -0.0013937451966661973,  
> 0.02009823693764142133, -0.207228935136287512,
> 0, 0, 0, 0, 0, 1, 0, 0, 0,  0.0273358858605219357,  
> 0.03830466468488327725,  0.224426004034737836,
> 0, 0, 0, 0, 0, 0, 1, 0, 0, -0.1456426235151105919,  
> 0.28688029213315069388,  0.326933845656016908,
> 0, 0, 0, 0, 0, 0, 0, 1, 0,  0.0164670122082246559, 
> -0.21966261349875662590,  0.036404179329694988,
> 0, 0, 0, 0, 0, 0, 0, 0, 1,  0.0146156940584119890,  
> 0.07505490943478997090,  0.077660578370038813
> ), 12, 12))
>
>
> R-2.5.0 gives
> >  eigen(z, symmetric = FALSE, only.values = TRUE)$values
> [1]  0.8465266+0.0000000i -0.0280087+0.6244992i -0.0280087-0.6244992i
> [4] -0.2908409+0.5522274i -0.2908409-0.5522274i -0.6228929+0.0000000i
> [7]  0.6177419+0.0000000i -0.5604582+0.1958709i -0.5604582-0.1958709i
> [10]  0.1458799+0.4909300i  0.1458799-0.4909300i  0.3378356+0.0000000i
>
> R-2.4.1 and many, many previous versions gave
> >  eigen(z, symmetric = FALSE, only.values = TRUE)$values
> [1]  0.8794798+0.0000000i -0.0280087+0.6244992i -0.0280087-0.6244992i
> [4] -0.2908409+0.5522274i -0.2908409-0.5522274i -0.6228929+0.0000000i
> [7] -0.5604582+0.1958709i -0.5604582-0.1958709i  0.5847887+0.0000000i
> [10]  0.1458799+0.4909300i  0.1458799-0.4909300i  0.3378356+0.0000000i
>
> Sys.info()
>                             sysname                              release
>                             "Linux"                    "2.4.21-40.ELsmp"
>                             version                             nodename
> "#1 SMP Thu Feb 2 22:13:55 EST 2006"                           "mfa04559"
>                             machine                               
>                            "x86_64"
> Paul Gilbert
>
> Prof Brian Ripley wrote:
>
>> We are only aware of better behaviour from LAPACK 3.1 (which is what 
>> I suppose you are talking about, that is R compiled with its internal 
>> LAPACK).
>>
>> But in at least one case that means finding a complex set of 
>> eigenvalues where previously a real one was found.
>>
>> On Tue, 10 Apr 2007, Paul Gilbert wrote:
>>
>>> I am having some trouble with a case where  eigen in R-beta  gives a
>>> different largest value than in previous versions of R. Other values
>>> seem to be the same. Before I spend too much time, is anyone aware of a
>>> problem (symmetric = FALSE, only.values = TRUE).
>>>
>>> Paul Gilbert
>>> ==================================================================================== 
>>>
>>>
>>> La version française suit le texte anglais.
>>>
>>> ------------------------------------------------------------------------------------ 
>>>
>>>
>>> This email may contain privileged and/or confidential 
>>> inform...{{dropped}}
>>>
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>>
>>
====================================================================================

La version française suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential inform...{{dropped}}



More information about the R-devel mailing list