similar to: Calculating monthly var-cov matrix on non-overlapping rooling window basis

Displaying 20 results from an estimated 10000 matches similar to: "Calculating monthly var-cov matrix on non-overlapping rooling window basis"

2008 Jun 01
1
Creating zoo object on monthly time series
Hi all, I have following monthly time series : > head(data1) V1 V2 V3 1 Nov-80 NA 1007.44 2 Dec-80 NA 982.05 3 Jan-81 NA 994.25 4 Feb-81 NA 996.31 5 Mar-81 NA 939.91 6 Apr-81 NA 923.32 Now I want to convert it to a 'zoo' object. I wrote following syntax : ss = zoo(data1[,3], as.Date(data1[,1], format="%m/%y")) However I got following : > head(ss)
2008 Mar 10
1
Error in extracting monthly observation from a daily time series data
Hi all, Suppose I have following dataset : library(zoo) SD = 1 date1 = seq(as.Date("01/01/90", format = "%m/%d/%y"), as.Date("12/31/08", format = "%m/%d/%y"), by = 1) len1 = length(date1); data1 = zoo(matrix(rnorm(len1, mean=0, sd=SD*0.5), nrow = len1), date1) Now I want to extract monthly observation. obs =
2008 Jun 29
1
Calculating quarterly statistics for time series object
I have time series observation on daily frequencies : library(zoo) SD=1 date1 = seq(as.Date("01/01/01", format = "%m/%d/%y"), as.Date("12/31/02", format = "%m/%d/%y"), by = 1) len1 = length(date1); data1 = zoo(matrix(rnorm(len1, mean=0, sd=SD*0.5), nrow = len1),  date1) plot(data1) Now I want to calculate 1. Quarterly statistics like mean, variance etc
2008 Mar 03
1
Formating a zoo dataset .
Suppose I have following dataset : > head(data1) Date Return 1 03/31/00 0.14230650 2 04/28/00 -0.03276228 3 05/31/00 -0.06527890 4 06/30/00 -0.04999873 5 07/31/00 -0.01447902 6 08/31/00 0.22265729 Now I convert it to zoo object : > data11 = zoo(data1[,2], as.Date(data1[,1], format="%m/%d/%y")) > head(data11) 2000-03-31 2000-04-28 2000-05-31
2007 Aug 31
3
Choosing the optimum lag order of ARIMA model
Dear all R users, I am really struggling to determine the most appropriate lag order of ARIMA model. My understanding is that, as for MA [q] model the auto correlation coeff vanishes after q lag, it says the MA order of a ARIMA model, and for a AR[p] model partial autocorrelation vanishes after p lags it helps to determine the AR lag. And most appropriate model choosed by this argument gives
2007 Jun 18
2
Calculating Percentile in R
Hi all, I have a problem on how R calculates Percentiles : Suppose I have following data set: > data1 [1] -16648185 -14463457 -14449400 -13905309 -13443436 -13234755 -12956282 -11660896 [9] -10061040 -9805005 -9789583 -9754642 -9562164 -9391709 -9212182 -9151073 [17] -9092732 -9068214 -8978151 -8943912 -8761890 -8632106 -8541580 -8501249 [25] -8234466 -8219015
2007 Aug 16
2
ADF test
Hi all, Hope you people do not feel irritated for repeatedly sending mail on Time series. Here I got another problem on the same, and hope I would get some answer from you. I have following dataset: data[,1] [1] 4.96 4.95 4.96 4.96 4.97 4.97 4.97 4.97 4.97 4.98 4.98 4.98 4.98 4.98 4.99 4.99 5.00 5.01 [19] 5.01 5.00 5.01 5.01 5.01 5.01 5.02 5.01 5.02 5.02 5.03 5.03 5.03
2008 Oct 11
5
Extracting subset of a vector
I have 2 vecros : x<-c(100,96,88,100,100,96,80,68,92,96,88,92,68,84,84,88,72,88,72,88) x1 = sample(x, 5, replace=FALSE) Now i want to get remaining values of vector "x" those are not member of vector "x1". Can anyone please tell me how to do that?
2009 Sep 13
3
How to get last day of a month?
Is there any R function to calculate automatically the last day of a particular month? For example "sep2009" should be converted to last day of September of 2009? Thanks -- View this message in context: http://www.nabble.com/How-to-get-last-day-of-a-month--tp25425645p25425645.html Sent from the R help mailing list archive at Nabble.com.
2008 Mar 15
1
Fwd: Re: How to create following chart for visualizing multivariate time series
Thanks David, It is working. Holtman's also gave me a solution but, I wanted to have a color pallet for description of colors, that was not in his solution. However I need one small modification. If I want to plot only lower diagonal elements of 'dat' then how should I proceed? What I want is, to visualize only lower diagonal elements and having the color pallet on them only. Also
2008 Jun 06
2
write.table() error
Hi, I got following error in write.table() : > write.table(dataa, file="c:/data1.csv", row.names=F, col.names=T, sep=",") Error in file(file, ifelse(append, "a", "w")) : cannot open the connection In addition: Warning message: In file(file, ifelse(append, "a", "w")) : cannot open file 'c:/data1.csv': Permission denied
2008 Mar 15
1
How to create following chart for visualizing multivariate time series
Let me take an artifical matrix : dat = matrix(rnorm(200*200), 200, 200) My goal is to visualize this matrix according to the procedure, described in previous mails. I took Mendelssohn's advice and got following advice : ?plot.im Z <- setcov(owin()) plot(Z) .................... etc However I can not reproduce this example in my problem. How I can change my data
2008 Sep 17
5
Loop on vector name
[My previous message rejected, therefore I am sending same one with some modification] I have 3 vectors with object name : dat1, dat2, dat3 Now I want to create a loop, like : for (i in 1:3) { cat(sd(dati)) } How I can do this in R? Regards,
2009 Jul 22
6
A question on operation on list
Hi, I have created a list object like that : x = vector("list") for (i in 1:5) x[[i]] = rnorm(2) x Now I want to do two things : 1. for each i, I want to do following matrix calculation : t(x[[i]]) %*% x[[i]] i.e. for each i, I want to get a 2x2 matrix 2. Next I want to get x[[1]] + x[[2]] +.... I did following : res=vector("list"); res = sapply(x, function(i) t(x[[i]]) %*%
2007 Jun 12
3
Panel data
Dear all R users, I have a small doubt about panel data analysis. My basic understanding on Panel data is a type of data that is collected over time and subjects. Vector Autoregressive Model (VAR) model used on this type of data. Therefore can I say that, one of statistical tools used for analysis of panel data is VAR model? If you clarify my doubt I will be very grateful. Thanks and regards,
2010 Oct 15
7
Problem with merging two zoo objects
Dear all, I have following 2 zoo objects. However when I try to merge those 2 objects into one, nothing is coming as intended. Please see below the objects as well as the merged object: > dat11 V2 V3 V4 V5 2010-10-15 13:43:54 73.8 73.8 73.8 73.8 2010-10-15 13:44:15 73.8 73.8 73.8 73.8 2010-10-15 13:45:51 73.8 73.8 73.8 73.8 2010-10-15 13:46:21 73.8 73.8 73.8 73.8
2008 Sep 10
2
Woring message in as.yearmon()
I have following dataset: > res [,1] [,2] [,3] [1,] 1946 4 1.27 [2,] 1946 5 1.27 [3,] 1946 6 1.27 [4,] 1946 7 1.27 [5,] 1946 8 1.52 [6,] 1946 9 1.52 [7,] 1946 10 1.52 [8,] 1946 11 1.52 [9,] 1946 12 1.62 [10,] 1947 1 1.62 [11,] 1947 2 1.62 [12,] 1947 3 1.62 [13,] 1947 4 1.87 [14,] 1947 5 1.87 [15,] 1947 6 1.87 Now I write following code
2009 Feb 16
5
Alternate to for-loop
Hi, I am trying to create a vector of length 10 (say), wherein each element will be average of random sample of size 100, from a distribution, say Normal. Can anyone please tell me without creating a "for" loop, how I can do that? Regards, -- View this message in context: http://www.nabble.com/Alternate-to-for-loop-tp22035954p22035954.html Sent from the R help mailing list archive at
2008 Sep 10
3
How to find where is the <space> in data
I have following " 1975 01 7711.16" Here I need to identify where the <space> is there and then concatenate rest of the digits without <space>, i.e. I want to have "1975017711.16". Is there any R function? Regards,
2008 Feb 29
1
Fwd: Re: How to create following chart for visualizing multivariate time series
I used ?image function to do that, like below : require(grDevices) # for colours x <- y <- seq(-4*pi, 4*pi, len=27) r <- sqrt(outer(x^2, y^2, "+")) image(x, y, r, col=gray((0:32)/32)) However my next problem to add a color pallet for color description [as shown in following link]. If anyone here tell me how to do that, it will be good for me. Regards, Megh Dal