similar to: An entire data frame which is a time-series?

Displaying 20 results from an estimated 2000 matches similar to: "An entire data frame which is a time-series?"

2004 Aug 21
3
Puzzled at lm() and time-series
I tried toy problems and there doesn't seem to be a basic problem between lm() and ts objects: X = data.frame(x=c(1,2,7,9), y=c(7,2,3,1)) lm(y ~ x, X) X <- lapply(X, function(x) ts(x, frequency=12, start=c(1994,7))) lm(y ~ x, X) and this works fine - whether you do an lm() before or after making ts objects, it's okay. But I have a situation where things aren't okay.
2010 Dec 01
2
Problem in reading Excel spreadsheets
Hi folks, Win 7 64bit R 2.12.0 32bit Problem in reading Excel spreadsheets (the text file, research_databaseI.xls, was download on Internet) > data=odbcConnectExcel(file.choose()) > sqlTables(data) TABLE_CAT TABLE_SCHEM 1 C:\\Users\\satimiswin764\\Documents\\research_databaseI <NA> 2
2009 Sep 24
2
Downloading data from from internet
Hi all, I want to download data from those two different sources, directly into R : http://www.rateinflation.com/consumer-price-index/usa-cpi.php http://eaindustry.nic.in/asp2/list_d.asp First one is CPI of US and 2nd one is WPI of India. Can anyone please give any clue how to download them directly into R. I want to make them zoo object for further analysis. Thanks, -- View this message in
2004 Apr 14
3
A bug report?
Folks, I have a strange situation, which I may have isolated as a bug report. Or, it could just be that there's something about R that I don't know. :-) I have attached the data file and the program file but don't know whether these attachments will make it into the list. Here is my bugreport.R program -- ---------------------------------------------------------------------------
2009 Jul 27
2
Forecasting Inflation
Dear All, I wanted to forecast Inflation for Indian Economy. please send what techniques to be used after the variable selection. WPI, CPI, Money supply, IIP, Interest rate and so on..How i can use R for the same [[alternative HTML version deleted]]
2001 Feb 10
3
Scatterplot - symbols coded by factor
Hi - I would like to create a scatterplot with the symbols coded by a factor in each record. Is their a better way than what I have used below? I attempted to use the plot.factor, but cannot force it to make a scatterplot instead of boxplots. I have considerd making a function with a 'for' statement for each level of the factor. Is there a better way for when I am dealing with more
2013 May 01
2
Shorewall 4.5.15 fails to start using systemctl on FC18
Starting Shorewall using systemctl fails with the error message as below. Starting from command line succeeds. I''ve tried changing the permissions on the /var/lib/shorewall folder to 777 but no change. The temp file isn''t present after the error so I don''t know if the permission issue is related to that. Selinux is disabled. I''m new to FC18 and systemctl so
2007 Aug 31
2
Bugreport on integration of Sweave and latex beamer
I think I have isolated a problem with integration between Sweave and beamer. Could you please see the file: http://www.mayin.org/ajayshah/tmp/bugdemo.Rnw Unfortunately, it uses some of my internal libraries, so you can't run it. When I put it through Sweave, I get: http://www.mayin.org/ajayshah/tmp/bugdemo.tex which is, of course, a generic latex file which you can read and
2005 Jun 07
1
R and MLE
I learned R & MLE in the last few days. It is great! I wrote up my explorations as http://www.mayin.org/ajayshah/KB/R/mle/mle.html I will be most happy if R gurus will look at this and comment on how it can be improved. I have a few specific questions: * Should one use optim() or should one use stats4::mle()? I felt that mle() wasn't adding much value compared with optim, and
2008 Mar 18
3
Puzzled at generating combinations
I have two data frames. Suppose the first has rows r1 r2 r3 and the second has rows R1 R2 R3 I'd like to generate the data frame: r1 R1 r1 R2 r1 R3 r2 R1 r2 R2 r2 R3 r3 R1 r3 R2 r3 R3 How would I go about doing this? I'm sure there's a clean way to do it but I find myself thinking in loops. -- Ajay Shah
2004 May 27
3
Date parsing question
How do I parse a date "yyyymmdd"? I tried asking chron(s, "ymd") but that didn't work. Would the date parsing routines of the Date class of 1.9 grok this? -- Ajay Shah Consultant ajayshah at mayin.org Department of Economic Affairs http://www.mayin.org/ajayshah Ministry of Finance, New Delhi
2008 Oct 15
2
"Heuristic optimisation"?
I wondered was people on this list felt about this article: http://www.voxeu.org/index.php?q=node/2363 which talks about the problems of obtaining sound answers in numerical optimisation in settings such as MLE or NLS. -- Ajay Shah http://www.mayin.org/ajayshah ajayshah at mayin.org http://ajayshahblog.blogspot.com <*(:-? -
2008 Mar 17
4
How does one do simple string concatenation?
How does one convert objects c("a","b","c") and "d" into "abcd"? > paste(c("a","b","c"), "d") of course yields [1] "a d" "b d" "c d" -- Ajay Shah http://www.mayin.org/ajayshah ajayshah at mayin.org
2009 Mar 15
1
Stuck on building a package
Folks, I have a personal package which used to build fine. Today when I tried to build the package again, some errors popped up. Could you please help? When I paste the offending function into an R it works correctly. But the package build breaks. $ R CMD check ansecon * checking for working pdflatex ... OK * using log directory '/Users/ajayshah/L/R/packages/ansecon.Rcheck' * using R
2006 Jan 26
2
Prediction when using orthogonal polynomials in regression
Folks, I'm doing fine with using orthogonal polynomials in a regression context: # We will deal with noisy data from the d.g.p. y = sin(x) + e x <- seq(0, 3.141592654, length.out=20) y <- sin(x) + 0.1*rnorm(10) d <- lm(y ~ poly(x, 4)) plot(x, y, type="l"); lines(x, d$fitted.values, col="blue") # Fits great! all.equal(as.numeric(d$coefficients[1] + m
2008 Mar 05
1
New data source - now how do we build an R interface?
Folks, A nice new data resource has come up -- http://data.un.org/ I thought it would be wonderful to setup an R function like tseries::get.hist.quote() which would be able to pull in some or all of this data. I walked around a bit of it and I'm not able to map the resources to predictable URLs which can then be wget. There's some javascript going on that I'm not understanding.
2009 Oct 17
2
How do I access with the name of a (passed) function
How would I do something like this: f <- function(x, g) { s <- as.character(g) # THIS DOES NOT WORK sprintf("The %s of x is %.0f\n", s, g(x)) } f(c(2,3,4), "median") f(c(2,3,4), "mean") and get the results "The median of x is 3" "The mean of x is 3" -- Ajay Shah
2006 Mar 06
3
Interleaving elements of two vectors?
Suppose one has x <- c(1, 2, 7, 9, 14) y <- c(71, 72, 77) How would one write an R function which alternates between elements of one vector and the next? In other words, one wants z <- c(x[1], y[1], x[2], y[2], x[3], y[3], x[4], y[4], x[5], y[5]) I couldn't think of a clever and general way to write this. I am aware of gdata::interleave() but it deals
2008 Jan 21
5
"nonstandard" column names
Hi everyone, I am sure that this question has been asked here some time ago but I do not remember the answer and was unable to find it in the archives... Below is my question: suppose that I have a data.frame x and one of it's columns name is "CPI/RPI" (without quotation marks of course). How can I reference this column? Neither of x$CPI/RPI or x$"CPI/RPI" work. I
2007 May 27
0
Not able to understand the behaviour of boot
Folks, I have a time-series of 875 readings of the weekly returns of a stock market index (India's Nifty). I am interested in the AR(1) coefficient. When I do arima(r, order=c(1,0,0)) I get a statistically significant AR1 coefficient. If we apply the ordinary bootstrap to this problem, this involves sampling with replacement, which destroys the time-series structure. Hence, if we do