Displaying 20 results from an estimated 80 matches similar to: "r: eviews and r // eigen analysis"
2003 Oct 13
2
colnames from submatrix?
Hi R-Wizards:
I've looking through the R docs and have yet to find what I'm looking for
and have tried a few intermediate steps to now avail yet and rather than
spend another few hours looking for the solution, I figured I would post a
message.
I have a matrix (actually a set of them) that I want to pull all the names
of the non-zero columns into a vector/list for further processing:
2002 Oct 09
1
Summary Orthogonal Polynomials
As usual, the R newsgroup set me straight (thanks to Douglas Bates, Robert
Balshaw and Albyn Jones).
There is really no difference between using orthogonal polynomials of the
form:
Linear -3 -1 1 3
Quadratic 1 -1 -1 1
Cubic -1 3 -3 1
Versus
> poly(c(1:4),3)
1 2 3
[1,] -0.6708204 0.5 -0.2236068
[2,] -0.2236068 -0.5 0.6708204
[3,] 0.2236068
2002 Oct 08
2
Orthogonal Polynomials
Looking to the wonderful statistical advice that this group can offer.
In behavioral science applications of stats, we are often introduced to
coefficients for orthogonal polynomials that are nice integers. For
instance, Kirk's experimental design book presents the following
coefficients for p=4:
Linear -3 -1 1 3
Quadratic 1 -1 -1 1
Cubic -1 3 -3 1
In R orthogonal
2006 Feb 20
2
Matrix / SparseM conflict (PR#8618)
Full_Name: David Pleydell
Version: 2.2.1
OS: Debian Etch
Submission from: (NULL) (193.55.70.206)
There appears to be a conflict between the chol functions from the Matrix and
the SparseM packages. chol() can only be applied to a matrix of class dspMatrix
if SparseM is not in the path.
with gratitude
David
> library(Matrix)
> sm <- as(as(Matrix(diag(5) + 1), "dsyMatrix"),
2008 Jan 12
2
glm expand model to more values
Hi
I have the problem with fitting curve to data with lm and glm. When I
use polynominal dependiency, fitted values from model are OK, but I
cannot recive proper values when I use coefficents to caltulate this.
Let me present simple example:
I have simple data.frame: (dd)
a: 1 2 3 4 5 6
b: 3 5 6 7 9 10
I try to fit it to model:
model=glm(b~poly(a,3),data=dd)
I have following data
2012 Feb 06
1
Simple lm/regression question
I am trying to use lm for a simple linear fit with weights. The results
I get from IDL (which I am more familiar with) seem correct and
intuitive, but the "lm" function in R gives outputs that seem strange to me.
Unweighted case:
> x<-1:4
> y<-(1:4)^2
> summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
1 2 3 4
1 -1 -1 1
Coefficients:
2009 Apr 23
1
the definition of eigenvector in R
Dear All
i have a little puzzle about eigenvector in the R.
As we know that the eigenvector can be displayed on several form.
For example
A=matrix(c(1,2,4,3),2,2)
if we want to get the eigenvalue and eigenvector, the code followed
eigen(A)
$values
[1] 5 -1
$vectors
[,1] [,2]
[1,] -0.7071068 -0.8944272
[2,] -0.7071068 0.4472136
however, we also can calculate the vector matrix
2007 May 04
1
Bug in qr.R ? (PR#9655)
Ladies and Gentlemen,
using
> A <- structure(c(1, 0, 0, 3, 2, 1, 4, 5, -3, -2, 1, 0), .Dim =
as.integer(c(3,4)))
I get
> dim(A)
[1] 3 4
> qr.R(qr(A),complete=TRUE)
[,1] [,2] [,3] [,4]
[1,] -1 -3.000000 -4.000000 2.0000000
[2,] 0 -2.236068 -3.130495 -0.8944272
[3,] 0 0.000000 -4.919350 -0.4472136
> qr.R(qr(A),complete=FALSE)
[,1]
2008 May 23
3
nls diagnostics?
Hi, All:
What tools exist for diagnosing singular gradient problems with
'nls'? Consider the following toy example:
DF1 <- data.frame(y=1:9, one=rep(1,9))
nlsToyProblem <- nls(y~(a+2*b)*one, DF1, start=list(a=1, b=1),
control=nls.control(warnOnly=TRUE))
Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial
2011 Feb 21
2
Segfaults of eigen
Hi,
with small matrices eigen works as expected:
> eigen(cbind(c(1,4),c(4,7)), only.values = TRUE)
$values
[1] 9 -1
$vectors
NULL
> eigen(cbind(c(1,4),c(4,7)))
$values
[1] 9 -1
$vectors
[,1] [,2]
[1,] 0.4472136 -0.8944272
[2,] 0.8944272 0.4472136
> eigen(cbind(c(1,-1),c(1,-1)))
$values
[1] -3.25177e-17+1.570092e-16i -3.25177e-17-1.570092e-16i
$vectors
2011 Aug 08
3
Distance between a vector and matrix rows
I am trying to find the distance between a vector and each row of a
dataframe. I am using the function "distancevector" in the package "hopach"
as follows:
mydata<-as.data.frame(matrix(c(1,1,1,1,0,1,1,1,1,0),nrow=2))
V1 V2 V3 V4 V5
1 1 1 0 1 1
2 1 1 1 1 0
vec <- c(1,1,1,1,1)
d2<-distancevector(mydata,vec,d="euclid")
The Euclidean distance
2009 Mar 27
3
about the Choleski factorization
Hi there,
Given a positive definite symmetric matrix, I can use chol(x) to obtain U where U is upper triangular
and x=U'U. For example,
x=matrix(c(5,1,2,1,3,1,2,1,4),3,3)
U=chol(x)
U
# [,1] [,2] [,3]
#[1,] 2.236068 0.4472136 0.8944272
#[2,] 0.000000 1.6733201 0.3585686
#[3,] 0.000000 0.0000000 1.7525492
t(U)%*%U # this is exactly x
Does anyone know how to obtain L such
2003 Jul 16
2
Is there a bug in qr(..,LAPACK=T)
The following snippet suggests that there is either a bug in qr(,LAPACK=T), or some bug in my understanding. Note that the detected rank is correct (= 2) using the default LINPACK qr, but incorrect (=3) using LAPACK. This is running on Linux Redhat 9.0, using the lapack library that comes with the Redhat distribution. I'm running R 1.7.1 compiled from the source. If the bug is in my
2012 Oct 22
0
"Vars" package: impulse response function
Hello,
I'm using VAR models in R in order to obtain impulse responses of stock
market shock on US economy.
I have series of quarterly changes in real gdp, S&P 500 and quarterly level
of unemployment for 1985 - 2012 period.
My series are stationary. So I did all the steps below. However I don't
understand what do irf function results mean. These are the cumulative
orthogonal responses
2006 Nov 17
1
Files in EViews format
Dear HelpeRs,
I wonder if anyone knows of ways to read EViews file types.
I did not find a function in the package 'foreign' and a search query
submitted to http://search.r-project.org was not successful.
Any hint is very much welcome.
Dietrich Trenkler
--
Dietrich Trenkler c/o Universitaet Osnabrueck
Rolandstr. 8; D-49069 Osnabrueck, Germany
email: Dietrich.Trenkler at
2004 Sep 23
1
R vs EViews - serial correlation
Dear all,
I met with some problems when dealing with a time series with serial correlation.
FIRST, I generate a series with correlated errors
set.seed(1)
x=1:50
y=x+arima.sim(n = 50, list(ar = c(0.47)))
SECOND, I estimate three constants (a, b and rho) in the model Y=a+b*X+u, where u=rho*u(-1)+eps
library(nlme)
gls(y~x,correlation = corAR1(0.5)) # Is it the right procedure?
2005 Dec 25
1
Different ARCH results in R and Eviews using garch from tseries
Dear Sir,
First of all Happy Holidays!,...
I am writing to you because I am a bit confused about ARCH estimation.
Is there a way to find what garch() exactly does, without the need of
reading the source code (because I cannot understand it)?
In Eviews (the results at the end) I am getting different results than
in R (for those that have the program I do: Quick -> Estimage Equation
->
2005 May 02
14
eigenvalues of a circulant matrix
Hi,
It is my understanding that the eigenvectors of a circulant matrix are given as
follows:
1,omega,omega^2,....,omega^{p-1}
where the matrix has dimension given by p x p and omega is one of p complex
roots of unity. (See Bellman for an excellent discussion on this).
The matrix created by the attached row and obtained using the following
commands
indicates no imaginary parts for the
1997 Aug 11
1
R-alpha: R 0.50.a3 family.lm()
The following patch adds a trivial family method for linear models.
-k
--- src/library/base/funs/lm.orig Tue May 27 02:53:58 1997
+++ src/library/base/funs/lm Sun Aug 10 22:00:46 1997
@@ -412,3 +412,5 @@
}
formula.lm<-function(x)formula(x$terms)
+
+family.lm <- function(x) { gaussian() }
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-devel mailing list
2003 Apr 24
2
R-1.7.0 build feedback: NetBSD 1.6 (PR#2837)
R-1.7.0 built on NetBSD 1.6, but the validation test suite failed:
Machinetype: Intel Pentium III (600 MHz); NetBSD 1.6 (GENERIC)
Remote gcc version: gcc (GCC) 3.2.2
Remote g++ version: g++ (GCC) 3.2.2
Configure environment: CC=gcc CXX=g++ LDFLAGS=-Wl,-rpath,/usr/local/lib
make[5]: Entering directory `/local/build/R-1.7.0/src/library'
>>> Building/Updating