Displaying 3 results from an estimated 3 matches for "jurosreal".
2011 Oct 26
1
help with means using tail()
Hi all,
I have 5 series (5 ts objects: rp, igpm, ereal, jurosreal, crescpib), and want to create a vector with the means of the last values of each variable.
What I did was this:
mrp1<-mean(tail(rp,9))
migpm1<-mean(tail(igpm,9))
mereal1<-mean(tail(ereal,9))
mjr1<-mean(tail(jurosreal,9))
mcp1<-mean(tail(crescpib,9))
means=rbind(mrp1,migpm1,mereal1...
2011 Oct 27
2
creating vector os zeros for simulations (beginner's question)
Dear R helpers,
I know this is a simple task, but I'm new to R and I'm still havind difficulties with the language.
I want to create 30 vectors to be used in a simulation, each with 1 columm and 5 lines, of random numbers N(0,1).
What I tried was this:
N=150
u2<-rep(1:150,0)
u2<-list(matrix(0,5))
u2
for(i in 1:N)
{
u2[i]<-rnorm(5)
}
u2
### also tried this:
N=150
2011 Oct 18
0
how to use VARselect with missing values - beginner's question
Dear R helpers,
I have a ts object, dadosvar, and want to run a VAR.
These are my data:
> dadosvar[1:15,]
dl rp igpm ereal crescpib jurosreal
[1,] 32.31 NA 39.07 419.59 NA 7025.95
[2,] 32.00 NA 40.78 596.57 NA 13401.25
[3,] 32.70 NA 45.71 867.63 NA 7738.64
[4,] 33.22 NA 40.91 1261.36 NA 15669.95
[5,] 33.58 NA 42.58 1832.68 NA 8741.45
[6,] 33.12 NA 45.21 2636.04 NA 13...