similar to: Coding matrix equation

Displaying 20 results from an estimated 8000 matches similar to: "Coding matrix equation"

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
2007 Dec 12
2
Matrix Inversion
I got the following error: a = read.csv("mat.csv") b = as.matrix(a) tb = t(b) bb = tb %*% b dim(bb) ibb = solve(bb) bb %*% ibb > ibb = solve(bb) Error in solve.default(bb) : system is computationally singular: reciprocal condition number = 1.77573e-19 > Are there any ways to find more information about why it is singular? Thanks.
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
2011 May 12
2
Exporting interactive 3D plots with axes and labels
Hi, I have a question about exporting interactive 3D plots. I use the following code to plot a contour of a trivariate normal distribution: library(mvtnorm) library(rgl) library(misc3d) n=25 x=seq(-3,3,length=n) X=cbind(rep(x,each=n**2),rep(rep(x,each=n),n),rep(x,n**2)) p=array(dmvnorm(X,sigma=diag(3)*0.5+0.5),c(n,n,n)) contour3d(p,x,x,x,level=mean(p)) lim=c(-3,3)
2009 Mar 10
5
Cholesky Decomposition in R
Hi everyone: I try to use r to do the Cholesky Decomposition,which is A=LDL',so far I only found how to decomposite A in to LL' by using chol(A),the function Cholesky(A) doesnt work,any one know other command to decomposte A in to LDL' My r code is: library(Matrix) A=matrix(c(1,1,1,1,5,5,1,5,14),nrow=3) > chol(A) [,1] [,2] [,3] [1,] 1 1 1 [2,] 0 2 2
2010 Nov 21
1
solve nonlinear equation using BBsolve
Hi r-users, I would like to solve system of nonlinear equation using BBsolve function and below is my code.  I have 4 parameters and I have 4 eqns. mgf_gammasum <- function(p) { t  <- rep(NA, length(p)) mn <- 142.36 vr <- 9335.69 sk <- 0.8139635 kur <- 3.252591 rh  <- 0.896 # cumulants k1 <- p[1]*(p[2]+p[3]) k2 <- p[1]*(2*p[2]*p[3]*p[4] +p[2]^2+p[3]^2) k3 <-
2004 Jul 27
4
SVD with positivity constraints
Hello, I have a matrix equation, Ax=b, that I need to solve for x. x should be a vector of positive numbers (between 0 and 1). A is not a square matrix in general. This lead me to using the SVD. However, using the SVD gives me positive and negative numbers, as well. I have some constraints included in the A matrix itself (i.e., that the sum of some xi should be equal to 1) but I do not know how
2007 Sep 13
1
Subset Quirk?
Hello All, I am trying to subset a matrix using subset() and it works fine when I use matrix notation, but doesn't work when I use established column names. Sample code is below: library(mvtnorm) library(sm) library(ltm) library(irtoys) k<- 100 set.seed(271828) t <- rmvnorm(n=k,mean=c(-1,0,1),sigma=matrix(c(1,.8,.5,.8,1,.8,.5,.8,1),3,3)) colMeans(t) var(t) pairs(t) #tview
2011 May 27
1
eigenvalues and correlation matrices
I'm trying to test if a correlation matrix is positive semidefinite. My understanding is that a matrix is positive semidefinite if it is Hermitian and all its eigenvalues are positive. The values in my correlation matrix are real and the layout means that it is symmetric. This seems to satisfy the Hermitian criterion so I figure that my real challenge is to check if the eigenvalues are all
2010 Oct 11
1
Quintum Tenor AX and Echo
Let's try this again. I have a Quintum AX Tenor gateway sending calls to Asterisk from BT analogue lines connected to FXO. The agents hear an echo on their side but incoming callers hear the conversation fine. I can't seem to find the problem. Anyone seen this issue before? <p style="margin: 0; padding: 0; border-collapse: collapse; font-family: Tahoma, Arial, Sans-Serif;
2004 Dec 12
2
Help : generating correlation matrix with a particular structure
Hi, I would like to generate a correlation matrix with a particular structure. For example, a 3n x 3n matrix : A_(nxn) aI_(nxn) bI_(nxn) aI_(nxn) A_(nxn) cI_(nxn) aI_(nxn) cI_(nxn) A_(nxn) where - A_(nxn) is a *specified* symmetric, positive definite nxn matrix. - I_(nxn) is an identity matrix of order n - a, b, c are (any) real numbers Many attempts have been unsuccessful because a
2008 Mar 23
2
problem with 'install.packages'
Hi, All: Is there a way to identify whether any users are using a particular package in a shared network R installation? I ask, because we have such a multiple-user installation and when I tried to install a package using Rgui that was in use by Rterm on a single-user installation, 'install.packages' deleted the existing package but failed to install the new version;
2007 Nov 01
1
Help me in Cochran armitage trend test Coding
Dear sir, I am Shibu John from Thrombosis Research Institute India. It is a multidisciplinary organisation concerned with the interrelated problems of thrombosis and atherosclerosis. I was searching for Cochran armitage trend test program in R. Then I had seen your R coding for C-A trend test. I tried that in the R software. But I can?t run the program due the [Error: could not find function
2007 Oct 17
3
Observations on SVD linpack errors, and a workaround
Lately I'm getting this error quite a bit: Error in La.svd(x, nu, nv) : error code 1 from Lapack routine 'dgesdd' I'm running R 2.5.0 on a 64 bit Intel machine running Fedora (8 I think). Maybe the 64 bit platform is more fragile about declaring convergence. I'm seeing way more of these errors than I ever have before. From R-Help I see that this issue comes up from time to
2004 Dec 10
1
How to circumvent negative eigenvalues in the capscale function
Dear All I am trying to do a partial canonical analysis of principal coordinates using Bray-Curtis distances. The capscale addin to R appears to be the only way of doing it, however, when I try and calculate a Bray-Curtis distance matrix either using Capscale or Vegedist (capscale I understand uses Vegedist anyway to calculate its distance matrix), R uses up all available memory on the computer,
2002 Jul 09
1
RE: mvtnorm package installation failure
Hi, Thank you for the tip. I tried to re-intall R from Debian "stable", in which R's version is 1.4.0. And the installation of "mvtnorm" works. I then re-installed R yet again from Debian "unstable" (woody), in which R's version is 1.5.1. The installation of "mvtnorm" fails again with the same error message. Another package that failed with the
2005 Sep 16
4
Integrate functions with loops
Hi i am having a problem with the 'integrate' function the function i want to integrate has the form sum(vector^x) i have defined the function with a for loop first - integrandtotest <- function(x) {a<-rep(0,len=2) for (i in 1:2) {a[i]<-t[i]^x} sum(a) } the results gives errors ########### Error in integrate(integrandtotest, lower = 0.1, upper =
2011 Jun 10
2
Problem loading packages in R 2.13.0 on Mac
I am having problem loading packages in the newest version of R (2.13.0) on my Mac. I have tried to install various packages (e.g. lawstat, Rcmdr, car) and load them using the Package Installer and Package Manager menu options but I get the follow error: > library(lawstat) Loading required package: mvtnorm Error: package 'mvtnorm' could not be loaded In addition: Warning
2010 Jan 16
2
La.svd of a symmetric matrix
Dear R list users, the singluar value decomposition of a symmetric matrix M is UDV^(T), where U = V. La.svd(M) gives as output three elements: the diagonal of D and the two orthogonal matrices u and vt (which is already the transpose of v). I noticed that the transpose of vt is not exactly u. Why is that? thank you for your attention and your help Stefano AVVISO IMPORTANTE: Questo messaggio di
2004 Apr 14
3
mvtnorm problems (II)
Thanks a lot for your help! Obviously I've tried to load it before by using the install.packages function but it didn't work. This is what I got > install.packages("mvtnorm") trying URL `http://cran.r-project.org/bin/windows/contrib/1.7/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 12485 bytes opened URL downloaded 12Kb Warning message: No package