search for: tkr

Displaying 6 results from an estimated 6 matches for "tkr".

Did you mean: tar
2006 Jul 13
1
ts and stl functions - still a problem
Hi I am still having problems with using the stl function, when I read the csv file into R into a file called tkr and use dim(tkr) the result is 132 1 which is fine. When coerce it into a trime series using ts either: tstkr <- ts(t(tkr), deltat=1/12) or tstkr <- ts(c(tkr), deltat=1/12) and use the stl function I get the following error: Error in stl(tstkr) : only univ...
2012 Mar 05
1
index instead of loop?
...d = apply(rd1, 2, fix) dimnames(rd) = dimnames(rd) dt1 <- seq(from =as.Date(z.dates[1]), to = as.Date("2009-03-25"), by = "day") dt = sapply(dt1, as.character) fin = dt ck_rows = length(dt) bad = character(0) start_t_all = Sys.time() for(cn in 1:ncol(ua)){ uac = ua[,cn] tkr = colnames(ua)[cn] rdc = rd[,cn] ua_rd = cbind(uac,rdc) colnames(ua_rd) = c(tkr,'rt_date') xx1 = merge(dt,ua_rd,by.x=1,by.y= 'rt_date',all.x=T) xx = as.character(xx1[,2]) values <- c(NA, xx[!is.na(xx)]) ind = cumsum(!is.na(xx)) + 1 y <- values[ind] if(ck_rows...
2006 Jul 12
1
ts and stl functions
Hi, I have imported a csv file into R which contains one column (the rate er 100,000 population of a disease, by month over 11 years) I coerced into a time series using the following function, tstkr<-ts(tkr,deltat=1/12) This seems to work fine, and when I check for the class of the object using class(tstkr) I get "ts" as the response. When I try to use the stl function in stats I get the error message: Error in stl(tstkr)only univariate series are allowed I then tried this...
2012 Mar 03
0
removing data look-ahead, something faster.
...apply(rd1, 2, fix) dimnames(rd) = dimnames(eps_rd) dt1 <- seq(from =as.Date(z.dates[1]), to = as.Date("2009-03-25"), by = "day") dt = sapply(dt1, as.character) fin = dt ck_rows = length(dt) bad = character(0) start_t_all = Sys.time() for(cn in 1:ncol(ua)){ uac = ua[,cn] tkr = colnames(ua)[cn] rdc = rd[,cn] ua_rd = cbind(uac,rdc) colnames(ua_rd) = c(tkr,'rt_date') xx1 = merge(dt,ua_rd,by.x=1,by.y= 'rt_date',all.x=T) xx = as.character(xx1[,2]) values <- c(NA, xx[!is.na(xx)]) ind = cumsum(!is.na(xx)) + 1 y <- values[ind] if(ck_rows...
2006 Jul 12
0
ts command and stl function
Hi, I have imported a csv file into R which contains one column (the rate er 100,000 population of a disease, by month over 11 years) I coerced into a time series using the following function, tstkr<-ts(tkr,deltat=1/12) This seems to work fine, and when I check for the class of the object using class(tstkr) I get "ts" as the response. When I try to use the stl function in stats I get the error message: Error in stl(tstkr)only univariate series are allowed I then tried this:...
2002 Jan 28
2
R/Tk from batch file
Dear R-help, Reccently I've been working on sample size estimates for our forensic scientists and have to make the work accessible to them, preferably in some Windows based graphical form. The obvious choise was Tk via R, so I now have a couple of very nice, user friendly front ends for calculating betas and beta-binomials which run equally well under Windows and other systems (same code -