Thanks David. I have actually 1 more question. How do I assign a name to the
output created by this function?
Cheers,
B
--
View this message in context:
http://r.789695.n4.nabble.com/specific-matrix-element-tranformation-tp4640550p4640680.html
Sent from the R help mailing list archive at Nabbl
Hi guys,
After a long while I came up with this :
set.seed(2)
a<-matrix(rnorm(4),ncol=2)
abc<-function(a)
{
b=matrix(NA,nrow=3,ncol=3)
b[1,1]=a[1,1]+1
b[1,2]=a[2,1]*a[2,2]
b[1,3]=a[2,2]+a[1,1]
b[2,1]=a[1,1]-5
b[2,2]=sqrt(a[2,2])
b[2,3]=a[1,1]/a[2,2]
b[3,1]=a[2,2]-3
b[3,2]=a[1,1]*(a[1,2]+a[
Hi guys,
I am trying to write a function that allows me to perform specific
transformations to each element of
a 2 by 2 matrix to generate a 3 by 3 matrix.
Input into function-2 by 2 matrix
Output from function -3 by 3 matrix
For example:
# a is my original 2 by 2 matrix
#b is my new 3 by 3 m
Thanks guys for the help. I finally know what to do know :)
--
View this message in context:
http://r.789695.n4.nabble.com/Column-Extraction-from-matrix-tp4640465p4640482.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-proj
Hi all,
I have a 4 by 100 matrix. I wish to extract each column and make it into a 2
by 2 matrix.
I also want to assign names for each 2X2 matrix.
For example
set.seed(2)
a=matrix(rnorm(400),ncol=100)
a1=matrix(a[,1],ncol=2)
a2=matrix(a[,2],ncol=2)
.
.
.
a100=matrix(a[,100],ncol=2)
Any sim
But after looking through rollapply I still don't seem to be able to
implement it to my problem.
Could you make it more explicit for me to understand?
B
--
View this message in context:
http://r.789695.n4.nabble.com/Rolling-Sample-VAR-tp4631328p4631430.html
Sent from the R help mailing list arc
hi guys,
I am using trivariate VAR model to get 10 step ahead orthogonalized impulse
response functions. I want to use rolling sample analysis on the
coefficients of the irf but I have no idea how to do that. I looked through
the forums but I can't seem to find any solutions.
Any suggestions wou
7 matches
Mail list logo