Displaying 20 results from an estimated 1000 matches similar to: "How to get the pseudo left inverse of a singular square matrix?"
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
2003 Aug 14
0
How to get the pseudo left inverse of a singular square m 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 matrix, and G satisfy AGA = A, then G is called
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
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
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
2003 Jul 11
2
using SVD to get an inverse matrix of covariance matrix
Dear R-users,
I have one question about using SVD to get an inverse
matrix of covariance matrix
Sometimes I met many singular values d are close to 0:
look this example
$d
[1] 4.178853e+00 2.722005e+00 2.139863e+00
1.867628e+00 1.588967e+00
[6] 1.401554e+00 1.256964e+00 1.185750e+00
1.060692e+00 9.932592e-01
[11] 9.412768e-01 8.530497e-01 8.211395e-01
8.077817e-01 7.706618e-01
[16]
2000 Nov 30
3
g-inverse
Is there any routine to obtain a g-inverse
of a matrix in R or S-PLUS?
Tapio Nummi
University of Tampere
Finland
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
2012 Dec 11
2
Catching errors from solve() with near-singular matrices
Dear all,
The background is that I'm trying to fix this bug in the geometry
package:
https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1993&group_id=1149&atid=4552
Boiled down, the problem is that there exists at least one matrix X for
which det(X) != 0 and for which solve(X) fails giving the error "system
is computationally singular: reciprocal condition
2011 Aug 16
2
generalized inverse using matinv (Design)
i am trying to use matinv from the Design package
to compute the generalized inverse of the normal equations
of a 3x3 design via the sweep operator.
That is, for the linear model
y = ? + x1 + x2 + x1*x2
where x1, x2 are 3-level factors and dummy coding is being used
the matrix to be inverted is
X'X =
9 3 3 3 3 3 3 1 1 1 1 1 1 1 1 1
3 3 0 0 1 1 1 1 0 0 1 0 0 1 0 0
3 0 3 0 1 1 1 0 1 0 0 1
2003 Apr 10
6
How to plot several graphs in a single 2-D figure?
Hi, R-listers
I tried to plot several graphs in a sigle x-y coordinate settings, like the
following:
|(y) s
| ****** s
| ***** s
| sssssssssssssssssss
|_______________________________(x)
where "*" and "s" denote two diffrent plots.
However, when I used
plot(data1); % data1 is the data points of "*"
2016 Apr 20
0
Solving sparse, singular systems of equations
> On 20 Apr 2016, at 13:22, A A via R-help <r-help at r-project.org> wrote:
>
>
>
>
> I have a situation in R where I would like to find any x (if one exists) that solves the linear system of equations Ax = b, where A is square, sparse, and singular, and b is a vector. Here is some code that mimics my issue with a relatively simple A and b, along with three other
2006 Apr 03
1
lm - Generalized Inverse
Hi,
is there a lm which will implement the moore-pensrose generalized inverse.
Thanks.
Harsh
---------------------------------
[[alternative HTML version deleted]]
2003 Apr 08
5
Help on smooth.spline?
Hey, R-listers
I was recommended to try using smooth.spline function
for estimating 2-Dimensinal curve given a data set.
So will you please tell me where to get this R function?
Or which package provides this function?
Thanks for your point.
Fred
2003 Feb 06
6
Confused by SVD and Eigenvector Decomposition in PCA
Hey, All
In principal component analysis (PCA), we want to know how many percentage
the first principal component explain the total variances among the data.
Assume the data matrix X is zero-meaned, and
I used the following procedures:
C = covriance(X) %% calculate the covariance matrix;
[EVector,EValues]=eig(C) %%
L = diag(EValues) %%L is a column vector with eigenvalues as the elements
percent
2008 Feb 19
1
Matrix inversion
Howdy,
I am trying to invert a matrix for the purposes of least squares. I
have tried a number of things, and the variety of results has me
confused.
1. When I try solve() I get the following:
>Error in solve.default(t(X) %*% X) : system is computationally
singular: reciprocal condition number = 3.76391e-20
2. When I try qr.solve(), I get:
>Error in qr.solve(t(X) %*% X) : singular matrix
2003 Mar 05
8
How to draw several plots in one figure?
Hey,
I want to draw several plots sequently, but have to make them dispaly in one
figure.
So how to achieve this?
Thanks.
Fred
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
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
2016 Apr 20
1
Solving sparse, singular systems of equations
Thanks for the help. Sorry, I am not sure why it looks like that in the mailing list - it looks much more neat on my end (see attached file).
On Wednesday, April 20, 2016 2:01 PM, Berend Hasselman <bhh at xs4all.nl> wrote:
> On 20 Apr 2016, at 13:22, A A via R-help <r-help at r-project.org> wrote:
>
>
>
>
> I have a situation in R where I would like to
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