similar to: Help with R software

Displaying 20 results from an estimated 10000 matches similar to: "Help with R software"

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
2017 Jun 20
2
by can not find transpose function
I am trying to transpose a dataframe by its first column using the by statement using the t function. When I use the by function, I get a message, Error in FUN(X[[i]], ...) : could not find function "FUN" I don't think I have a syntax error in my by statement because the by statment works using the print function. Data and an executable example follows: phonydata2 <-
2011 Apr 12
5
B %*% t(B) = R , then solve for B
Hello,.. Apologies for the newbie question but... I have a matrix R, and I know that *B %*% t(b) = R* *I'm trying to solve for B *(aka. 'factoring the correlation matrix' I think) Please help! I've read that 'to solve for B we define the eigenvalues of R and then apply the techniques of Principal Component Analysis' This made me reach for princomp() but now I'm
2017 Jun 20
0
by can not find transpose function
> On Jun 20, 2017, at 7:19 AM, Sorkin, John <jsorkin at som.umaryland.edu> wrote: > > I am trying to transpose a dataframe by its first column using the by statement using the t function. When I use the by function, I get a message, > > Error in FUN(X[[i]], ...) : could not find function "FUN" > > I don't think I have a syntax error in my by statement
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)
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
2011 Apr 11
3
Coding matrix equation
Hi all, I have two matrices: G<-matrix(c(2.0, 0.5, 0.5, 0.5, 2.0, 0.5, 0.5, 0.5,2.0),3,3) P<-matrix(c(1.0, 0.5, 0.5, 0.5, 1.0, 0.5, 0.5, 0.5,1.0),3,3) and I want to run this equation to get a new matrix F: F = [P+2G]^-1/2 P [P+2G]^-1/2 Could someone please tell me how to code this in R? Many thanks in advance for your time. Best wishes, Matt [[alternative HTML version deleted]]
2001 Sep 06
1
svd and eigen
Hello List, i need help for eigen and svd functions. I have a non-symmetric square matrix. These matrix is not positive (some eigenvalues are negative). I want to diagonalise these matrix. So, I use svd and eigen and i compare the results. eigen give me the "good" eigenvalues (positive and negative). I compare with another software and the results are the same. BUT, when i use svd,
2009 Apr 22
2
Exporting objects plotted with plot3d() - rgl package
Dear all, Can anybody tell me how to export a 3d figure made with the plot3d function? I'm careless about whether it's still interactive or not in another format, as long I can get it out of R. Thanks! Alejandro Gonz?lez Departamento de Biodiversidad y Conservaci?n Real Jard?n Bot?nico Consejo Superior de Investigaciones Cient?ficas Claudio Moyano, 1 28014 Madrid, Spain Tel +0034
2011 May 22
2
Finding solution set of system of linear equations.
I have a simple system of linear equations to solve for X, aX=b: > a [,1] [,2] [,3] [,4] [1,] 1 2 1 1 [2,] 3 0 0 4 [3,] 1 -4 -2 -2 [4,] 0 0 0 0 > b [,1] [1,] 0 [2,] 2 [3,] 2 [4,] 0 (This is ex Ch1, 2.2 of Artin, Algebra). So, 3 eqs in 4 unknowns. One can easily use row-reductions to find a homogeneous solution(b=0) of: X_1
2004 Mar 13
2
recursive matrix multiplication question
List serv subscribers, I am wondering if there is an efficient means of doing recursive matrix multiplication in R. My data resides in a 4 X 2541 matrix from which I need to extract 2541 2X2 matrices based on each row. If I attempt something like this: function(AO) {A<-AO {for(t in 1:4)
2006 Nov 05
2
solution to a regression with multiple independent variable
Please forgive a statistics question. I know that a simple bivariate linear regression, y=f(x) or in R parlance lm(y~x) can be solved using the variance-covariance matrix: beta(x)=covariance(x,y)/variance(x). I also know that a linear regression with multiple independent variables, for example y=f(x,z) can also be solved using the variance-covariance matrix, but I don't know how to do this.
2012 Jan 12
1
How can I prevent solve.QP from printing the solution progress ?
Dear R Users, How can I prevent solve.Qp from printing the solution progress ? Thanks in advance, Tolga This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at
2011 Dec 13
2
Inverse matrix using eigendecomposition
General goal: Write R code to find the inverse matrix of an nxn positive definite symmetric matrix. Use solve() to verify your code works. Started with a 3x3 matrix example to build the code, but something dosen't seem to be working. I just don't know where I am going wrong. ##Example matrix I found online A<-c(4,1,-1,1,2,1,-1,1,2) m<-matrix(A,nrow=3,ncol=3) ##Caculate the eigen
2007 Oct 31
3
Find A, given B where B=A'A
Given a matrix B, where B=A'A, how can I find A? In other words, if I have a matrix B which I know is another matrix A times its transpose, can I find matrix A? Thanks, Mike
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:
2010 Jun 25
2
Forcing scalar multiplication.
I am trying to check the results from an Eigen decomposition and I need to force a scalar multiplication. The fundamental equation is: Ax = lx. Where 'l' is the eigen value and x is the eigen vector corresponding to the eigenvalue. 'R' returns the eigenvalues as a vector (e <- eigen(A); e$values). So in order to 'check' the result I would multiply the eigenvalues
2010 Nov 21
3
Can't invert matrix
Hi, I'm trying to use the solve() function in R to invert a matrix. I get the following error, "Lapack routine dgesv: system is exactly singular" However, My matrix doesn't appear to be singular. [,1] [,2] [,3] [,4] [1,] 0.99252358 0.93715047 0.7540535 0.4579895 [2,] 0.01607797 0.09616267 0.2452471 0.3088614 [3,] 0.09772828 0.58451468 1.4907090
2007 Dec 07
4
Using R function in Excel
Does anyone know a way that an function written in R can be called within a cell of an Excel spreadsheet. I would like to use the R function much as I use the native Excel functions, e.g. instead of using the excel function sum, =sum(A2,A6), I would like to use the function mysum written in R, e.g. =mysum(A2,A6). Thanks, John John Sorkin M.D., Ph.D. Chief, Biostatistics and Informatics
2001 Feb 05
1
SVD of complex matrices
Is there a way to determine the SVD of a complex matrix using R? (I'm using v1.0.1 and svd() won't do the trick). I know LAPACK has a function to do this. Thanks -- Ben Stapley Biomolecular Modelling Lab Imperial Cancer Research -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send