Bug 7987 - eigen of a real pd symmetric matrix gives NaNs in $vector
Summary: eigen of a real pd symmetric matrix gives NaNs in $vector
Status: NEW
Alias: None
Product: R
Classification: Unclassified
Component: System-specific (show other bugs)
Version: old
Hardware: ix86 (32-bit) Windows 32-bit
: P5 normal
Assignee: Jitterbug compatibility account
URL:
Depends on:
Blocks:
 
Reported: 2005-07-04 14:34 UTC by Jitterbug compatibility account
Modified: 2005-07-04 14:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2005-07-04 14:34:47 UTC
From: cajo.terbraak@wur.nl
Full_Name: cajo ter Braak
Version: 2.1.1
OS: Windows
Submission from: (NULL) (137.224.10.105)


# I would like to attach the matrix C in the Rdata file; it is 50x50 and comes
from a geostatistical problem (spherical covariogram)

> rm(list=ls(all=TRUE))
> load(file= "test.eigen.Rdata")
> ls()
[1] "C"  "eW"
> 
> sym.check = max(abs(C - t(C)))    # should be 0 for symmetry
> sym.check
[1] 0
> eW <-eigen(C, symmetric = TRUE)
> l_eW <- eW$values
> print(eW$values)
 [1] 4.5730646 4.5730646 3.3066738 3.3066738 3.3066738 3.3066738 2.3935268
 [8] 2.3935268 1.9367508 1.9367508 1.9347787 1.9347787 1.4276845 1.4276845
[15] 1.4276845 1.4276845 0.9858318 0.9858318 0.9858318 0.9858318 0.9123115
[22] 0.9123115 0.7945283 0.7945283 0.7880493 0.7880493 0.6047920 0.6047920
[29] 0.6047920 0.6047920 0.5689609 0.5689609 0.5681210 0.5681210 0.5440676
[36] 0.5440676 0.5440676 0.5440676 0.5224040 0.5224040 0.5139844 0.5139844
[43] 0.5077485 0.5077485 0.5008249 0.5008249 0.5008249 0.5008249 0.4960220
[50] 0.4960220
> #print(eW$vector)
> 
> 
> #library(MASS)
> #n = nrow(C)
> #y = runif(n)
> 
> #lm1 = lm.gls(y~1, W = C)
> #summary(lm1)
> 
> eW <-eigen(C, symmetric = TRUE)
> l_eW <- eW$values
> # the thirdteens eigenvector contrains NaN
> print(eW$values)
 [1] 4.5730646 4.5730646 3.3066738 3.3066738 3.3066738 3.3066738 2.3935268
 [8] 2.3935268 1.9367508 1.9367508 1.9347787 1.9347787 1.4276845 1.4276845
[15] 1.4276845 1.4276845 0.9858318 0.9858318 0.9858318 0.9858318 0.9123115
[22] 0.9123115 0.7945283 0.7945283 0.7880493 0.7880493 0.6047920 0.6047920
[29] 0.6047920 0.6047920 0.5689609 0.5689609 0.5681210 0.5681210 0.5440676
[36] 0.5440676 0.5440676 0.5440676 0.5224040 0.5224040 0.5139844 0.5139844
[43] 0.5077485 0.5077485 0.5008249 0.5008249 0.5008249 0.5008249 0.4960220
[50] 0.4960220
> print(eW$vector[,13])
 [1]   0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN
[20] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NaN
[39] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
> 



Comment 1 Jitterbug compatibility account 2005-08-16 16:55:24 UTC
Audit (from Jitterbug):
Tue Aug 16 11:55:24 2005	ripley	moved from incoming to System-specific