search for: zooreg

Displaying 20 results from an estimated 83 matches for "zooreg".

2007 Aug 02
1
Using 'diff' on zoo vs zooreg classes (possible bug?)
Hello, Can anyone explain the following behaviour? To me it seems a bug, but maybe it is intentional. It seems that a diff on a zooreg class that is not _strictly_ regular only considers those entries that are 'deltat' apart. In the following, diff on the zooreg class only returns values where the index was one second apart. The example replicates by dev code, but I've also tested using plain old integer indices, and...
2009 Mar 12
1
zooreg and lmrob problem (bug?)
Hi all and thanks for your time in advance, I can't figure out why summary.lmrob complains when lmrob is used on a zooreg object. If the zooreg object is converted to vector before calling lmrob, no problems appear. Let me clarify this with an example: >library(robustbase) >library(zoo) >dad<-c(801.4625,527.2062,545.2250,608.2313,633.8875,575.9500,797.0500,706.4188, 816.7000,619.1187,430.6188,852.1750,57...
2011 Sep 22
2
Subsetting a zooreg object using window / subset
Dear R users, I am currently working in subsetting a zooreg() object using either window or subset. I have a solution but it may be a bit cumbersome when I start working with actual data. Your inputs would be greatly appreciated. Example: I have a zooreg() object that starts in 1997 and ends in 2001. This object contains daily data for the 4 years aa<-...
2005 Aug 27
2
zoo, zooreg, & ISOdatetime
I create a zooreg object that runs from Jan-1-2002 0:00 to Jun-1-2005 0:00... regts.start = ISOdatetime(2002, 1, 1, hour=0, min=0, sec=0, tz="") regts.end = ISOdatetime(2005, 6, 1, hour=0, min=0, sec=0, tz="") regts.zoo <- zooreg( NA, regts.start, regts.end, deltat=3600 ) Upon inspection:...
2009 Nov 19
2
Problem with zoo and BootPR packages
...31226 58613 72360 107956 92066 [11] 95208 99098 95848 120383 110717 105680 98469 101916 Script: y1<-ts(y1); forey1<-BootBC(y1,p=2,h=3,nboot=5000,type="const+trend",correct="ssf") Plot.Fore(y1,forey1$forecast,start=1966,end=1984,frequency=1) The Error: Error in zooreg(x, start, end, frequency) : "data" : attempt to define illegal zoo object Any Help? Thanks Rick [[alternative HTML version deleted]]
2010 Jul 09
2
Strange R object
I have *** attached *** an RData file containing an R object that is acting strangely. Try this in a fresh workspace. Do not load zoo or any other package. We load the object, zz2, from the attached RData file. It is just the number 1 with the class c("zooreg", "zoo"). Now create an S3 print routine that simply prints an X when given an object of class "zoo". If we use print on the object it produces an X but not if we just enter it at the console. Also the object is not identical to its dput output. How can such an object e...
2010 Apr 18
4
confused with yearmon, xts and maybe zoo
R-listers, I am using xts with a yearmon index, but am getting some inconsistent results with the date index when i drop observations (for example by using na.omit). The issue is illustrated in the example below. If I start with a monthly zooreg series starting in 2009, yearmon converts this to "Dec-2008". Not such a worry for my example, but strange. Having converted to xts, i drop the first observation. The index shows jan 2009. But if i create a new variable with this index, it shifts the series back to dec 2008. No doubt...
2011 Sep 12
5
Hourly data with zoo
I have date data as a numeric and hourly data in 0 to 2300 hours in a dataframe. d <- rep(20110101,24) h <- seq(from = 0, to = 2300, by = 100) df <- data.frame(LST_DATE = d, LST_TIME = h, data = rnorm(24, 0, 1)) S <- chron(dates. = as.character(df$LST_DATE), times. = paste(as.character(df$LST_TIME/100), ":0:0", sep = ""), format =
2011 Apr 06
2
A zoo related question
Dear all, please consider my following workbook: library(zoo) lis1 <- vector('list', length = 2) lis2 <- vector('list', length = 2) lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1) lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency = 12) lis2[[1]] <- matrix(1:40, 20) lis2[[2]] <- matrix(41:80, 20) Now I want to make each element of 'lis2' as zoo obje...
2013 Sep 09
2
(sin asunto)
No he podido crear una matriz con dos columnas una de fechas y la otra columna con números de casos de una enfermedad x library(zoo) zooreg(1:300, start = as.Date("2012-03-01")) cbind(zooreg(1:300, start = as.Date("2012-03-01")) , c(1:300)) #?como incluir un vector o una ts? -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de la...
2010 Jul 12
3
How to create sequence in month
Hi all, can anyone please guide me how to create a sequence of months? Here I have tried following however couldn't get success > library(zoo) > seq(as.yearmon("2010-01-01"), as.yearmon("2010-03-01"), by="1 month") Error in del/by : non-numeric argument to binary operator What is the correct way to do that? Thanks for your time.
2010 Nov 23
2
Plot two zoo object with different indexes
Dear R community, I have the following two zoo objects: MONTHLY CPI > plot(z) > par("usr") [1] 1977.76333 2011.15333 70.39856 227.03744 > z=zooreg(cpius$Value,as.yearmon("1979-11"),frequency=12) > str(z) ?zooreg? series from Nov 1979 to Oct 2010 Data: num [1:372] 76.2 77 77.8 78.5 79.5 80.3 81.1 82 82 82.6 ... Index: Class 'yearmon' num [1:372] 1980 1980 1980 1980 1980 ... Frequency: 12 AND A DAILY SERIES IN THE...
2009 Jul 23
3
how to predict dynamic model in R
I have a dynamic time series model like this: dyn$lm( y ~ lag(y,-1) + x + lag(x,-1)+lag(x,-2) ) I need to do an out of sample forecast with this model. Is there any way I can do this with R? It would be greatly appreciated if some one can give me an example. Thanks. Harry [[alternative HTML version deleted]]
2010 Apr 08
2
Meaning of "lag 0.2, 0.4,..." ?
Please see that correlogram for a arbitrary time series : acf(zooreg(rnorm(39), start=as.yearmon("2008-01-01"), frequency=12)) What is the meaning of lag 0.2, 0.4, ........ in the plot? Those should not be integers? Or I am missing something? Thanks -- View this message in context: http://n4.nabble.com/Meaning-of-lag-0-2-0-4-tp1765093p1765093.html Sent...
2013 Feb 15
3
datos climáticos cambio de formato
Hola!! tengo un data.frame donde cada fila corresponde a un año y cada columna a un mes (De enero a diciembre) > head(valT) V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 1941 18.0 16.3 15.2 10.1 8.1 8.3 8.8 9.2 7.9 12.2 11.9 14.6 1942 17.2 15.9 13.6 11.6 8.7 6.2 6.4 7.2 9.7 12.0 14.1 16.7 1943 17.6 17.3 13.5 12.5 10.5 7.0 8.2 7.9 -999.9 -999.9
2015 Jun 12
3
pregunta
...ue adjunto a vector? necesito hacer lo siguiente con el archivo a library(zoo) x <- c (1,3,1,1,1,1,2,1,1,2,1,1,2,1,1,1,2,1,2,2,1,1,1,3,1,1,2,2,2,2,1,1,1,2,1,1,1,1,1,2,2,5,1,1,1,1,2,1,1,1,2,4,1,2,1,3,1,1,1,1,3,1,2,1,1,3,1,3,3,1,2,1,2,2,2,3,1,2,1,1,1,1,2,1,1,1,1,1,1) names(x) <- format(index(zooreg(1:89, start =as.Date("2015-01-01"))), '%Y-%m-%d') Mis saludos Jos? ------------ próxima parte ------------ Se ha borrado un adjunto en formato HTML... URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20150612/284e0510/attachment.html> ------------ próxima parte --...
2011 Jan 18
1
Semi-Regular Time Series with Missing Values
...quency other than 1 (so I can use stl). I've tried all permutations I can think of, but cannot get the desired (expected?) results. The values live in x and the corresponding semi-regular time stamps are in t: > library('zoo') > z = zoo(x, order.by=t, frequency=24) > zzr = as.zooreg(z, start=0) > zr = zooreg(x, order.by=t, start=0, frequency=24) > zrz = as.zoo(zr) The objects z, zr, and zzr all have frequency 24, as desired, and plot correctly. Object zrz plots correctly but has frequency 1. Now I try to make it a ts object: > zrt = ts(zzr) ... omits the missing val...
2012 Nov 25
2
creation of an high frequency series
...ation each minute. In this case, I would have 390 observations each day. I have tried the following: start <- ISOdatetime(year=2001, month=1, day=1, hour=9, min=0, sec=0, tz="GMT") end <- ISOdatetime(year=2001, month=1, day=1, hour=16, min=0, sec=0, tz="GMT") z <- zooreg(NA, start = start, end = end, frequency=390) but the result is a poor, single "NA". And I am not considering multiple days.. How could I solve this problem?? Thank you so much!! -- View this message in context: http://r.789695.n4.nabble.com/creation-of-an-high-frequency-series-tp4...
2009 Jul 18
7
Question on qplot
Hi, suppose I have following codes : library(zoo); library(ggplot2) dat <- matrix(rnorm(500*2), 500); dat <- zooreg(dat, start = as.Date("01/01/01", "%m/%d/%y"), frequency=1); plot(dat) head(dat); month.no <- format(index(dat), "%m"); dat1 <- cbind(coredata(dat), as.numeric(month.no)) x <- dat1[,1]; y <- dat1[,2]; z <- dat1[,3] Now I draw a qplot like : qplot(x, z)...
2013 Sep 09
2
RV: (sin asunto)
...ega data(Germany.1918) y cuando aplicamos el comando is.vector, nos refleja TRUE. Mi duda es COMO GENERAR UNA DATA SIMILAR A: data(Germany.1918) para que pueda realizar las operaciones que deseo. Al tratar de hacerlo #combinar fechas y casos df <- data.frame( Fecha = format(index(zooreg(1:269, start = as.Date("2012-03-01"))), '%Y-%m-%d'), Valores = confirmados) NO ME LEE MIS DATOS! como lo hace con data(Germany.1918) #del paquete original library(R0) data(Germany.1918) mGT<-generation.time("gamma", c(3, 1.5)) estR0<-estimate.R(G...