Skip to content

Commit 39ffda2

Browse files
committed
remove eigchk to its own file
1 parent 0b142cd commit 39ffda2

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

R/fRegress.R

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -548,31 +548,4 @@ if (inherits(yfdPar, "fdPar") || inherits(yfdPar, "fd")) {
548548

549549
return(fRegressList)
550550

551-
}
552-
553-
554-
# ------------------------------------------------------------------------
555-
556-
eigchk <- function(Cmat) {
557-
558-
# check Cmat for singularity
559-
560-
eigval <- eigen(Cmat)$values
561-
ncoef <- length(eigval)
562-
if (eigval[ncoef] < 0) {
563-
neig <- min(length(eigval),10)
564-
cat("\nSmallest eigenvalues:\n")
565-
print(eigval[(ncoef-neig+1):ncoef])
566-
cat("\nLargest eigenvalues:\n")
567-
print(eigval[1:neig])
568-
stop("Negative eigenvalue of coefficient matrix.")
569-
}
570-
if (eigval[ncoef] == 0) stop("Zero eigenvalue of coefficient matrix.")
571-
logcondition <- log10(eigval[1]) - log10(eigval[ncoef])
572-
if (logcondition > 12) {
573-
warning("Near singularity in coefficient matrix.")
574-
cat(paste("\nLog10 Eigenvalues range from\n",
575-
log10(eigval[ncoef])," to ",log10(eigval[1]),"\n"))
576-
}
577-
}
578-
551+
}

0 commit comments

Comments
 (0)