similar to: Matrix inverse

Displaying 20 results from an estimated 20000 matches similar to: "Matrix inverse"

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)
2016 Apr 20
6
Solving sparse, singular systems of equations
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 methods of solving this system that I found online, two of which give me an error and one of which succeeds on the
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
2000 Feb 14
2
Error in the inverse of a diagonal matrix?
I?m new to R so maybe this issue has been asked before and I still could not read the complete set of past messages sent to the list. I found a weird behabiour that I will explain with a simple example. Lets consider the following block of commands: > x <- diag(c(1,4,10)) > x [,1] [,2] [,3] [1,] 1 0 0 [2,] 0 4 0 [3,] 0 0 10 > invx <- x^-1 > invx
2000 May 01
1
solve vs. qr.solve
> Date: Mon, 1 May 2000 16:25:11 +0200 (CEST) > From: gb <gb at stat.umu.se> > > On 1 May 2000, Douglas Bates wrote: > > gb <gb at stat.umu.se> writes: > > > > > How about 'Ainv <- qr.solve(A)'? > > > > > > I happened to read the help page for 'qr.solve' the other day, and there I > > > found that
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
2003 Nov 12
2
bug in det using method="qr" (PR#1244) (PR#4450)
I just detected, that det() is not working on complex matrices any more, due to the fix to the bug reports noted above. I am not happy with this, as determinants are perfectly usable on complex matrices. AFAIUI the bugs resulted from less than optimal behaviour of qr() in certain cases. IMHO this is due to the unhappy decision to use a default for parameter tol to decide whether the the
2000 Mar 20
3
lm handling of ill-conditioned systems
The lm() function in R seems to handle the inversion of singular X'X matrices (where there is collinearity between regression inputs) in a way where one of the inputs is dropped and this also seems to be the default behavior in SAS (please let me know if i'm wrong about this). In some other packages (i.e. octave ols() function) the pseudo inverse is computed where singular values less
2003 Oct 30
3
Change in 'solve' for r-patched
The solve function in r-patched has been changed so that it applies a tolerance when using Lapack routines to calculate the inverse of a matrix or to solve a system of linear equations. A tolerance has always been used with the Linpack routines but not with the Lapack routines in versions 1.7.x and 1.8.0. (You can use the optional argument tol = 0 to override this check for computational
2007 Dec 18
2
"gam()" in "gam" package
R-users E-mail: r-help@r-project.org I have a quenstion on "gam()" in "gam" package. The help of gam() says: 'gam' uses the _backfitting algorithm_ to combine different smoothing or fitting methods. On the other hand, lm.wfit(), which is a routine of gam.fit() contains: z <- .Fortran("dqrls", qr = x * wts, n = n, p = p, y = y *
2004 May 12
6
Design matrix not identity
Hello again, I was too quick before. What I was looking for was a function that constructs the design (or incidence) matrix (X in a linear model) from a factor. Uwe Ligges suggested using model.matrix and this does almost what I want, but it is first necessary to construct a data variable. It also asigns ones to all rows of the first column (because this is set to be the contrast, not really what
2010 Sep 01
2
What solve() does?
Hello! Can anyone explain me what solve() function does: Gaussian elimination or iterative, numeric solve? In addition, I would need both the Gaussian elimination and iterative solution for the course. Are the two built in R? Thanks! PM
2003 Mar 26
1
Solving equations
Hello, Does somebody knows if there exists a function which solves a set of equation, say f(vars), for the variables vars (similar to Solve in mathematica). The functions I am considering are of the form f(t) ~ A*exp(B*t), where A and B are matrices. Thanks Thomas
2009 Mar 25
3
very fast OLS regression?
Dear R experts: I just tried some simple test that told me that hand computing the OLS coefficients is about 3-10 times as fast as using the built-in lm() function. (code included below.) Most of the time, I do not care, because I like the convenience, and I presume some of the time goes into saving a lot of stuff that I may or may not need. But when I do want to learn the properties of an
2003 Feb 28
3
Tabulating
Hello, I wonder if someone could send me suggestions on how to solve the following problem: I have a vector of an arbitrary size (ex. data<-c(10,10,11,10,12,11,10,12,11,11,10,11)) and use the table function, which gives the following result 10 11 12 5 5 2 that''s fine, but what I would like to do now is: construct new classes based on the number of classes from table, 10
2007 Oct 03
1
inverse of matrix made by low.tri function
Hi all, I am using R trying to get a inverse matrix of (X^T)X , but I keep getting the error message like: no b argument and no default value for sprintf(gettext(fmt, domain = domain), ...) . -------------------------------------------------------------------------------------------- # my code X<-Matrix(rep(1,500),100,5) X[lower.tri(X)]<-1-10^-7 XtX<- t(X)%*% X XtXu<-lu(XtX)
2002 Oct 02
4
Introduction of NA:s
Hello, I wonder if someone could help me with the following: I have generated 10 000 values from rnorm and now I want to randomly replace 500 of those with NA. The problem is that values indexed between 6-10,16-20,26-30.... only should be considered for replacement. Any suggestions? Patrik Waldmann -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing
2016 Apr 20
0
Solving sparse, singular systems of equations
This is kind of like asking for a solution to x+1=x+1. Go back to linear algebra and look up Singular Value Decomposition, and decide if you really want to proceed. See also ?svd and package irlba. -- Sent from my phone. Please excuse my brevity. On April 20, 2016 4:22:34 AM PDT, A A via R-help <r-help at r-project.org> wrote: > > > >I have a situation in R where I would like
2008 Oct 27
1
Algo. for matrix inverse
I am looking fpr a algo to find matrix inverse. Till time I am aware of Gauss-Jordan Elimination procedure to find the same. Are there any other algo. as well? What does R use to find the inverse? -- View this message in context: http://www.nabble.com/Algo.-for-matrix-inverse-tp20182285p20182285.html Sent from the R help mailing list archive at Nabble.com.
2000 Jul 26
3
Correlation matrices
Hello, are there any good methods in R that will test if two correlation matrices (obtained in different ways) are equal? Something better than the Mantel test would be preferable. Regards, Patrik Waldmann -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",