Displaying 20 results from an estimated 9000 matches similar to: "g-inverse"
2001 Mar 07
1
cross-validation
The function crossval (in library bootstrap)
works well for the first degree polynomial model,
but in the case of the second degree model I got
an error message (see below).
I would be very greatfull if somebody could
give some advices for the following:
> library(bootstrap)
>
> x<-c(22,23.4,24.9,28.5,29.8,31.6,34.2,36.4,37.7,39)
>
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
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
2000 Apr 28
3
Matrix inverse
I haven't found a function that directly calculates the matrix inverse, does it exist? Otherwise what would be the fastest way to do it?
Patrik Waldmann
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the
2003 Aug 14
2
How to get the pseudo left inverse of a singular square matrix?
Dear R-listers,
I have a dxr matrix Z, where d > r.
And the product Z*Z' is a singular square matrix.
The problem is how to get the left inverse U of this
singular matrix Z*Z', such that
U*(Z*Z') = I?
Is there any to figure it out using matrix decomposition method?
Thanks a lot for your help.
Fred
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
2009 Oct 30
1
R strucchange question: recursive-based CUSUM
Hello R users:
I'm trying now to apply the package strucchange to see whether there is
a structural change in linear regression. I have noted the following
problem that arises in my case with recursive-based CUSUM: generic
function recresid() in efp() generates an error, since (probably) it
cannot compute the inverse matrix of (X^(i-1)^T)*(X^(i-1)) at each step
(i-1), because the matrix
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]
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
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]]
2005 May 30
3
how to invert the matrix with quite small eigenvalues
Dear all,
I encounter some covariance matrix with quite small eigenvalues
(around 1e-18), which are smaller than the machine precision. The
dimension of my matrix is 17. Here I just fake some small matrix for
illustration.
a<-diag(c(rep(3,4),1e-18)) # a matrix with small eigenvalues
b<-matrix(1:25,ncol=5) # define b to get an orthogonal matrix
b<-b+t(b)
bb<-eigen(b,symmetric=T)
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
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
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
2005 Oct 15
1
solve() versus ginv()
Dear All,
While inverting a matrix the following error appears on my console:
Error in solve.default(my_matrix) : Lapack routine dgesv: system is exactly singular
With this respect, I have been replacing the solve() function with ginv(): the Moore-Penrose generalized inverse of a matrix.
These are the questions I would like to ask you:
1. Would you also replace solve() with ginv() in
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
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
2011 Mar 07
1
a numeric problem
### An numeric problem in R ########
###I have two matrix one is##########
A <- matrix(c(21.97844, 250.1960, 2752.033, 29675.88, 316318.4, 3349550,
35336827,
24.89267, 261.4211, 2691.009, 27796.02, 288738.7, 3011839,
31498784,
21.80384, 232.3765, 2460.495, 25992.77, 274001.6, 2883756,
30318645,
39.85801, 392.2341, 3971.349, 40814.22, 423126.2,
2007 Sep 03
2
Row-Echelon Form
I was looking for an R-package that would reduce matrices to
row-echelon form, but Google was not my friend; any leads?
If not, I wonder if the problem could be expressed in terms of
constraint satisfaction...