Displaying 20 results from an estimated 2000 matches similar to: "Solving Matrices"
2007 Jun 29
4
Dominant eigenvector displayed as third (Marco Visser)
Dear R users & Experts,
This is just a curiousity, I was wondering why the dominant eigenvetor and eigenvalue
of the following matrix is given as the third. I guess this could complicate automatic selection
procedures.
0 0 0 0 0 5
1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0
0 0 0 1 0 0
0 0 0 0 1 0
Please
2006 Mar 03
1
NA in eigen()
Hi,
I am using eigen to get an eigen decomposition of a square, symmetric
matrix. For some reason, I am getting a column in my eigen vectors (the
52nd column out of 601) that is a column of all NAs. I am using the option,
symmetric=T for eigen. I just discovered that I do not get this behavior
when I use the option EISPACK=T. With EISPACK=T, the 52nd eigenvector is
(up to rounding error) a
2005 Oct 19
1
nlme Singularity in backsolve at level 0, block 1
Hi,
I am hoping some one can help with this.
I am using nlme to fit a random coefficients model. It ran for hours before returning
Error: Singularity in backsolve at level 0, block 1
The model is
> plavix.nlme<-nlme(PLX_NRX~loglike(PLX_NRX,PD4_42D,GAT_34D,VIS_42D,MSL_42D,SPE_ROL,XM2_DUM,THX_DUM,b0,b1,b2,b3,b4,b5,b6,b7,alpha),
+ data=data,
+ fixed=list(b0 +
2005 Jul 13
2
Efficient testing for +ve definiteness
Dear R-users,
Is there a preferred method for testing whether a real symmetric matrix is
positive definite? [modulo machine rounding errors.]
The obvious way of computing eigenvalues via "E <- eigen(A, symmetric=T,
only.values=T)$values" and returning the result of "!any(E <= 0)" seems
less efficient than going through the LU decomposition invoked in
2006 Sep 26
2
about the determinant of a symmetric compound matrix
Dear R users,
even if this question is not related to an issue about R, probably some of you will be able to help me.
I have a square matrix of dimension k by k with alpha on the diagonal and beta everywhee else.
This symmetric matrix is called symmetric compound matrix and has the form
a( I + cJ),
where
I is the k by k identity matrix
J is the k by k matrix of all ones
a = alpha - beta
c =
2007 Dec 05
1
Calculating large determinants
I apologise for not including a reproducible example with this query but I
hope that I can make things clear without one.
I am fitting some finite mixture models to data. Each mixture component
has p parameters (p=29 in my application) and there are q components to
the mixture. The number of data points is n ~ 1500.
I need to select a good q and I have been considering model selection
methods
2001 May 19
1
COMPUTING DETERMINANT FROM SVD
Dear R-users,
I computed determinant of a square matrix "var.r" using the SVD output:
detr _ 1
d _ svd(var.r)$d
for (i in 1:length(d)) {
detr _ detr*d[i]
}
print(detr)
30.20886
BUT when I tried :
det(var.r)
I got :
-30.20886
Is this because SVD output will only give absolute of the eigenvalues ?, If
this is the case
how can I get the original eigenvalues?
Thanks,
Agus
How to use PC1 of PCA and dim1 of MCA as a predictor in logistic regression model for data reduction
2011 Aug 17
4
How to use PC1 of PCA and dim1 of MCA as a predictor in logistic regression model for data reduction
Hi all,
I'm trying to do model reduction for logistic regression. I have 13
predictor (4 continuous variables and 9 binary variables). Using subject
matter knowledge, I selected 4 important variables. Regarding the rest 9
variables, I tried to perform data reduction by principal component
analysis (PCA). However, 8 of 9 variables were binary and only one
continuous. I transformed the data by
2012 Jan 04
5
simulating stable VAR process
Hello all,
I looking at package dse or vars or mAr
I know how to simulate a VAR(p) process, my problem is that most of those
processes are unstable (not weakly stationary).
Do anybody know how to generate a random VAR (or VARMA even better) process
that is weakly stationary?
Thanks
--
View this message in context: http://r.789695.n4.nabble.com/simulating-stable-VAR-process-tp4261177p4261177.html
2007 Jul 02
2
how to use mle with a defined function
Hi all,
I am trying to use mle() to find a self-defined function. Here is my
function:
test <- function(a=0.1, b=0.1, c=0.001, e=0.2){
# omega is the known covariance matrix, Y is the response vector, X is the
explanatory matrix
odet = unlist(determinant(omega))[1]
# do cholesky decomposition
C = chol(omega)
# transform data
U = t(C)%*%Y
WW=t(C)%*%X
beta = lm(U~W)$coef
Z=Y-X%*%beta
2009 Mar 20
2
Finding determinants of x-loaded matrix?
R friends,
I need to find the determinant of this matrix
x 1 0 0
1 x 1 0
0 1 x 1
0 0 1 x
det yields x^4-3x^2+1
I can then use polyroot to find the roots of the coefficients.
The question is about the use of "x", which is what I'm solving for.
thanks in advance, and this is a back-burner question.
Apologies if I have posted this incorrectly/to the wrong place, I'm a newbie
2003 Oct 07
1
(PR#4450)
Hello,
When I use det() and qr() on complex matrices the result is in some cases indeterministic. The documentation speaks of numeric matrices (and not of complex matrices) but det() uses qr() which should handle complex matrices correctly. I've also tried using only qr() with
similar results. det() returns a value that is not the determinant of the complex matrix (in accordance with
2007 Jun 01
1
Determinant function (PR#9715)
Full_Name: Krzysztof Podgorski
Version: R version 2.4.1 (2006-12-18)
OS: Windows XP
Submission from: (NULL) (130.235.3.79)
The function ''det'' works improperly for a singular matrix and returns a
non-zero value even if ''solve'' reports singularity. The matrix is very simple
as shown below.
A <- diag(rep(c(64,8), c(8,8)))
A[9:16,1] <- 8
A[1,9:16] <- 8
2013 Jul 09
3
fitting log function: errors using nls and nlxb
Hi-
I am trying to fit a log function to my data, with the ultimate goal of
finding the second derivative of the function. However, I am stalled on
the first step of fitting a curve.
When I use the following code:
FG2.model<-(nls((CO2~log(a*Time)+b), start=setNames(coef(lm(CO2 ~
log(Time), data=FG2)), c("a", "b")),data=FG2))
I get the following error:
Error in
2005 Dec 13
5
getting faster results
Hey,
Can anyone answer this question. I am working with really large datasets and most of the programs I have been running take quite some time.
I heard that R may be faster in Unix. I sthis true and if so can anyone reccomend which system and requirements may allow things to go faster for?
Thanks!!
Elizabeth Lawson
---------------------------------
[[alternative
1999 Apr 20
2
eigenvalue/eigenvector calculations
Some of you may have seen a message on s-news by Stefan Steinhaus
regarding his paper on "Comparison of mathematical programs for data
analysis". He compares S-PLUS 4.5 with several other programs. He
does not include R in the comparisons. On p. 28 of his report he
gives the URL the Auckland site along with URL's for two other systems
but comments that "I didn't received
2009 Dec 01
1
eigenvalues of complex matrices
Dear all,
I want to compute the eigenvalues of a complex matrix for some statistics.
Comparing it to its matlab/octave sibling, I don't get the same eigenvalues
in R computing it from the exact same matrix.
In R, I used eigen() and arpack() that give different eigenvalues. In
matlab/octave I used eig() and eigs() that give out the same eigenvalues but
different to the R ones.
For real
2005 Aug 03
3
prcomp eigenvalues
Hello,
Can you get eigenvalues in addition to eigevectors using prcomp? If so how?
I am unable to use princomp due to small sample sizes.
Thank you in advance for your help!
Rebecca Young
--
Rebecca Young
Graduate Student
Ecology & Evolutionary Biology, Badyaev Lab
University of Arizona
1041 E Lowell
Tucson, AZ 85721-0088
Office: 425BSW
rlyoung at email.arizona.edu
(520) 621-4005
2004 Jun 28
3
How to determine the number of dominant eigenvalues in PCA
Dear All,
I want to know if there is some easy and reliable way
to estimate the number of dominant eigenvalues
when applying PCA on sample covariance matrix.
Assume x-axis is the number of eigenvalues (1, 2, ....,n), and y-axis is the
corresponding eigenvalues (a1,a2,..., an) arranged in desceding order.
So this x-y plot will be a decreasing curve. Someone mentioned using the elbow (knee)
2013 Mar 14
2
Same eigenvalues but different eigenvectors using 'prcomp' and 'principal' commands
Dear all,
I've used the 'prcomp' command to
calculate the eigenvalues and eigenvectors of a matrix(gg).
Using the command 'principal' from the
'psych' packageĀ I've performed the same exercise. I got the same
eigenvalues but different eigenvectors. Is there any reason for that
difference?
Below are the steps I've followed:
1. PRCOMP
#defining the matrix