Displaying 20 results from an estimated 1100 matches similar to: "solve() versus ginv()"
2009 Feb 04
1
reference for ginv
?ginv provides 'Modern Applied Statistics with S' (MASS), 3rd, by
Venables and Ripley as the sole reference.
I happen to have this book (4th ed) on loan from our library, and as far
as I can see, ginv is mentioned there twice, and it is *used*, not
*explained* in any way. (It is used on p. 148 in the 4th edition.)
ginv does not appear in the index of MASS. ginv is an implementation of
2008 Feb 23
1
ginv and matlab's pinv give different results
Dear all;
I'm kind of confused with the results obtained using the ginv function
from package MASS and pinv function from Matlab. Accroding to the
documentation both functions performs a Moore-Penrose generalized
inverse of a matrix X. The problem is when I change the tolerance
value, say to 1E-3.
Here is some output from ginv
195.2674402 235.6758714 335.0830253 8.977515484 -291.7798965
2012 Dec 05
1
Understanding svd usage and its necessity in generalized inverse calculation
Dear R-devel:
I could use some advice about matrix calculations and steps that might
make for faster computation of generalized inverses. It appears in
some projects there is a bottleneck at the use of svd in calculation
of generalized inverses.
Here's some Rprof output I need to understand.
> summaryRprof("Amelia.out")
$by.self
self.time self.pct
2004 Mar 25
1
g-inverse question
I am using the ginv function from MASS and have run across this problem
that I do not understand. If I define the matrix A as below, its
g-inverse does not satisfy the Moore-Penrose condition
A %*% ginv(A) %*% A = A.
The matrix A is X'WX in a quadratic regression using some very large
dollar values.
The much simpler matrix B does satisfy the MP condition. Am I doing
something wrong? Is
2003 Aug 07
3
ginv vs. solve
Why do
x<-b%*%ginv(A)
and
x<-solve(A,b)
give different results?. It seems that I am missing some basic feature of
matrix indexing.
e.g.:
A<-matrix(c(0,-4,4,0),nrow=2,ncol=2)
b<-c(-16,0)
x<-b%*%ginv(A);x
x<-solve(A,b);x
Thanks in advance,
Angel
2010 Jul 05
1
if using ginv function, does it mean there is no need to use solve function any more?
since ginv can deal with both singular and non-singular conditions, is there
any other difference between them?
if I use ginv only, will be any problem?
thanks
[[alternative HTML version deleted]]
2001 Oct 18
1
AW: General Matrix Inverse
Thorsten is right. There is a direct formula for computing the Moore-Penrose
inverse
using the singular value composition of a matrix. This is incorporated in
the following:
mpinv <- function(A, eps = 1e-13) {
s <- svd(A)
e <- s$d
e[e > eps] <- 1/e[e > eps]
return(s$v %*% diag(e) %*% t(s$u))
}
Hope it helps.
Dietrich
2004 Feb 06
1
How to get the pseudo left inverse of a singular squarem atrix?
>I'm rusty, but not *that* rusty here, I hope.
>
>If W (=Z*Z' in your case) is singular, it can not
have >inverse, which by
>definition also mean that nothing multiply by it will
>produce the identity
>matrix (for otherwise it would have an inverse and
>thus nonsingular).
>
>The definition of a generalized inverse is something
>like: If A is a
>non-null
2009 Aug 31
2
Problem in matrix definition?
I'm implementing a function to compute the moore-penrose inverse, using a code from the article: Fast Computation of Moore-Penrose Inverse Matrices. Neural Information Processing - Letters and Reviews. Vol.8, No.2, August 2005
However, the R presents an error message when I use the geninv.
The odd thing is that the error occurs for some arrays, however they have the same size. And the R
2012 Mar 14
2
Moore-Penrose Generalized determinant?
Is there a function in R to calculate the generalized determinant of a
singular matrix? - similar to the ginv() used to compute the generalized
inverse.
I can't seem to find any R related posts at all.
Thanks in advance,
Sean O'Riordain
Trinity College Dublin
--
View this message in context: http://r.789695.n4.nabble.com/Moore-Penrose-Generalized-determinant-tp4471629p4471629.html
Sent
2000 Sep 29
2
Matrix inversion
I cannot find what is the function label for matrix inversion in R. I have
found 'ginv' for the moore-penrose in the MASS package, but there is
probably a simple inversion operator in the base package. Where can I find
it?
____________________________________________
Yvonnick Noel, PhD.
University of Lille 3
Department of Psychology
F-59653 Villeneuve d'Ascq Cedex
(+33) 320 41 63 48
2005 Jun 12
3
Essay identification
Hi R-help,
I have a database of 10 students who have written an overall of 78 essays.
The challenge? I would like to identify who wrote the 79th essay.
Has anybody used R in this context?
Even if not, would you suggest me which pattern recognition technique I might possibly apply?
Thanks a lot and regards,
Tom
---------------------------------
[[alternative HTML version
2010 Jun 08
3
Matrix to "database" -- best practices/efficiency?
I have a matrix of, say, M and N dimensions:
my_matrix=matrix(c(1:60),nrow=6,ncol=10)
I have two "id" vectors corresponding to the rows and columns, e.g.:
id_m=seq(10,60,by=10)
id_n=seq(100,1000,by=100)
I would like to create a "proper" database (let's say a data.frame for
this example -- i'm going to be loading these into an SQLite database,
but we'll leave
2005 Nov 29
3
floor()
Dear All,
Is this right?
> floor((5.05-floor(5))*100)
[1] 4
I would expect 5, or am I wrong?
Thanks and regards,
W
---------------------------------
[[alternative HTML version deleted]]
2005 Jun 13
3
Perl installation under SuSe
Hi R-Help,
I have just downloaded RSPerl_0.7-0.tar.gz under SuSe.
If I type
owner@linux: ~work> R CMD INSTALL -c RSPerl_0.7-0.tar.gz
i get the following error message
makedir: cannot create directory '/user/lib/R/library/00LOCK' : Permission denied
ERROR: failed to lock directory '/usr/lib/R/library' for modifing
I would really appreciate if somebody can help me
2001 Oct 18
0
General Matrix Inverse
Generalised Inverse:
The Moore-Penrose Generalisied Inverse is probably better defined as a
pseudo-Inverse that arises in solving least squares problems.
Another well known pseudo-Inverse is the so-called Drazin pseudo-Inverse.
If memory serves (and it's been 10-12 years!) it can be obtained via a
diagonalisation.
Anyway, I dare say Prof. Ripley (among others) probably has "all the
2010 Sep 27
3
name ONLY one column
Hi R-users
I can not change the name of one column only of my matrix.
my_matrix <- matrix (1:12,ncol=3)
colnames(my_matrix)[1] <- 'myname'
Error in dimnames(x) <- dn :
length of 'dimnames' [2] not equal to array extent
thank you for your help
Lorenzo
[[alternative HTML version deleted]]
2004 Nov 02
1
problem to solve a matrix
Dear R group,
I have to solve a hessian matrix 40*40, called M, in order to obtain the
standart deviations of estimators.
When I use the function solve(M), I have the following error message:
"Error in solve.default(M) : Lapack routine dgesv: system is exactly singular"
Do you know an alternative approach which could succeed? I have found some
information about the function
2012 Dec 12
3
R-2.15.2 changes in computation speed. Numerical precision?
Speaking of optimization and speeding up R calculations...
I mentioned last week I want to speed up calculation of generalized
inverses. On Debian Wheezy with R-2.15.2, I see a huge speedup using a
souped up generalized inverse algorithm published by
V. N. Katsikis, D. Pappas, Fast computing of theMoore-Penrose inverse
matrix, Electronic Journal of Linear Algebra,
17(2008), 637-650.
I was so
2009 May 15
2
Printing to screen a matrix or data.frame in one chunk (not splitting columns)
Hello,
I saw this nice trick I want to replicate but I lost the source and I hope
one of you can point me to the solution. My problem is that I don't know
the correct words to query this.
When I print to screen a matrix or data.frame the columns are split and
printed below the previous ones; even though I have plenty of screen left.
E.g.,
> my_matrix = matrix(runif(30),nrow=3,ncol=10)