similar to: g-inverse question

Displaying 20 results from an estimated 400 matches similar to: "g-inverse question"

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
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
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,
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
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]]
2005 Apr 22
1
Required Packages etiquette
Dear friends, I am writing a package that I think may be of interest to many people so I am in the process to build-check-write-thedocumentation for it. I have some questions regarding the "rules" that a package should abide in order to be consistent with the other packages on CRAN. I have read and reread the Writing R extension manual and googled the mailing list and I have found
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
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
2009 Feb 06
1
Linear model: contrasts
Hey, I am modelling a linear regression Y=X*B+E. To compute the effect of ?group? the B-values of the regressors/columns that code the interaction effects (col. 5-8 and col. 11-14, see below) have to be weighted with non-zero elements within the contrast "Group 1" minus "Group 2" (see below). My first understanding was that the interaction effects add up to zero in each group.
2002 May 16
1
foreign library - negative integers??
I am having a problem with the foreign library correctly reading some integer data. Specifically, d _ read.dta('aptaa.dta') > d[1:5,] scenario metcode yr ginv cons gocc abs dvac gmre gmer 1 1 AA 2002 0.007 1377 -0.071 51710 0.071 -0.011 -0.127 2 1 AA 2003 0.000 0 -0.016 62568 0.014 -0.043 -0.538 3 1 AA 2004 0.000 0 -0.002
2008 Jun 05
1
Limit distribution of continuous-time Markov process
I have (below) an attempt at an R script to find the limit distribution of a continuous-time Markov process, using the formulae outlined at http://www.uwm.edu/~ziyu/ctc.pdf, page 5. First, is there a better exposition of a practical algorithm for doing this? I have not found an R package that does this specifically, nor anything on the web. Second, the script below will give the right
2004 Jul 06
2
Generate a matrix Q satisfying t(Q)%*%Q=Z and XQ=W
Hello, I have a question that is not directly related to R ... but I try to do it in R ;-) : I would like to generate a matrix Q satisfying (for a given Z, X and W) the two following conditions: t(Q)%*%Q=Z (1) XQ=W (2) where: Q is m rows and r columns X is p rows and m columns D is p rows and r columns C is r rows and r columns with m>p,r e.g: m=6, p=2 r=3
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
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
2009 Sep 03
3
Rdonlp2 package question
Previous versions have this question have partially bounced. I apologize if parts of this are showing up multiple times on the list. Another try ... There was at one time an R package called Rdonlp2 for solving constrained nonlinear programming problems. Both the objective function and the constraints could be nonlinear in the decision variables. The package is no longer in the CRAN list.
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
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
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