Displaying 20 results from an estimated 3000 matches similar to: "Help with interpolation of time series"
2010 Apr 12
1
N'th of month working day problem
Dear Gabor,
Thanks for your reply. however:
> tail(DJd)
^DJI.Close
2010-04-01 10927.07
2010-04-05 10973.55
2010-04-06 10969.99
2010-04-07 10897.52
2010-04-08 10927.07
*2010-04-09 10997.35*
> tail(ag)
2009-11-30 10344.84
2009-12-31 10428.05
2010-01-31 10067.33
2010-02-28 10325.26
2010-03-31 10856.63
*2010-04-30 10997.35
*
It seems the script "makes up"
2011 Feb 16
1
Timeseries Data Plotted as Monthly Boxplots
Hello, I'm trying to develop a box plot of time series data to look at the
range in the data values over the entire period of record.
My data initially starts out as a list of hourly data, and then I've been
using this code to make this data into the final ts array.
# Read in the station list
stn.list <- read.csv("/home/kbennett/fews/stnlist3", as.is=T, header=F)
# Read in
2012 Jun 01
2
Day or Month difference between dates???
HI, R-Users:
I got a questions. have been struggling so long time....
I have this data:
> m1$Year_Month
201009 201010 201011 201101 201102
> min(m1$Year_Month)
201009
I want to calculate the following two answers, how do I program it?
> difference in Month?????
[1] 0 1 2 4 5
>difference in Days?????
0 31 61 ....
Thank you in advance!!!
Tammy
[[alternative
2007 Mar 08
1
chronological scatterplots
Greets Folks,
I've been wrestling with how to better control plotting of time data and
just can't seem to see the right path. My dataset has thousands of points
distributes across a number of years. I would like to plot the responses
according to increasing time with nice boundaries - perhaps integer months
- along the abscissa. However, the earliest time occurs mid-month and I
2008 Dec 18
3
Parsing unusual date format
Hello,
If I have a character string like
d <- c("1990m3", "1992m8") #March 1990 and Aug 1992
what is the easiest way to convert it into any standard date form; for
example,
d <- c("01/03/1990", "01/08/1992")
I looked at as.Date but it doesn't seem to address my problem as I have an
"m" stuck in the middle of my character string
2009 Jan 15
4
number of Mondays
dear All,
i'm trying to calculate the number of Mondays, Tuesdays, etc that each
month within a date range has. I have time series data that spans 60
months and i want to calculate the number of Mondays, Tuesdays, Wed,
etc of each month. (I want to control for weekly seasonality but my
data is monthly).
Is there an easy way to to this in R? or is there a package i could
use? i did
2013 Jan 16
1
function approx interpolation of time series data sets
Readers,
Am trying to use the function 'approx' to interpolate time series data sets:
data1:
01:23:40 5
01:23:45 10
01:23:50 12
01:23:55 7
data2:
01:23:42
01:23:47
01:23:51
01:23:54
The objective is to obtain interpolated values of 'data1' column 2 (5,
10, 12, 7) for the times shown in data2. Tried the following command
but received the error shown:
2008 Sep 01
2
Interpolation Problems
Dear all,
I'm trying to interpolate a dataset to give it twice as many values (I'm giving the dataset a finer resolution by interpolating from 1 degree to 0.5 degrees) to match that of a corresponding dataset.
I have the data in both a data frame format (longitude column header values along the top with latitude row header values down the side) or column format (in the format latitude,
2011 Jul 22
2
Picking returns from particular days of the month from a zoo object
Hello,
I would like to implement a "turn-of-the-month' trading strategy in R.
Given a daily series of stock market return data as a zoo object, the strategy
would go long (buy) four trading days before the end of the month, and sell the
third trading day of the following month.
How can I select these days, particularly the fourth day before and the third
day after the turn of the
2011 May 04
1
bivariate linear interpolation
Hi,
I have three matrices (X,Y,P) with the same dimension. The X,Y grid is
regular and I want to
perform linear interpolation to pick out certain points. In matlab
appropriate call is
something like
Pout=interp2(X,Y,P,Xout,Yout, method="linear")
where Xout and Yout are the locations where I want the Pout data
(typically a different grid).
(Scipy has this routine in
2007 Dec 03
1
Plotting monthly timeseries with an x-axis in "time format"
I have the following timeseries "tab"
=====================================
> str(tab)
mts [1:23, 1:2] 79.5 89.1 84.9 75.7 72.8 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:2] "Ipex...I" "Omel...E"
- attr(*, "tsp")= num [1:3] 2006 2008 12
- attr(*, "class")= chr [1:2] "mts" "ts"
> tab
2009 Mar 31
4
Convert Character to Date
Hello,
I have a date in the format Year-Month Name (e.g. 1990-January) and R classes it as a character. I want to convert this character into a date format, but when I try as.Date(1990-January, "%Y-%B"), I get back NA. The function strptime also gives me NA back. Thanks.
[[alternative HTML version deleted]]
2012 Jul 24
9
Regular Expression
Hi--
I have three columns in an input file:
MONTH QUARTER YEAR
2012-07 2012-3 2012
2001-07 2001-3 2001
2002-01 2002-1 2002
I want to make output like so:
MONTH QUARTER YEAR
07 3 2012
07 3 2001
01 1 2002
I was having some trouble getting the regular expression to work. I think
it should
2011 Oct 27
2
Simple time series question with zoo
New user here. My goal is pull daily averages from a long dataset.
I've been working with some code I got from this list from
https://stat.ethz.ch/pipermail/r-help/2009-March/191302.html
The code how I have been using it is as follows:
library(zoo)
library(chron)
DB<-read.table("/Users/me/Desktop/R/data.csv", sep=",", header=TRUE, as.is
=TRUE)
z<-zoo(LTER6$temp,
2013 Jan 17
1
Help with interpolation
hi guys
I need to interpolate values for the zero coupon yield curve. Following data
is given
date days rate
1996 01
2012 Jun 06
2
package zoo, function na.spline with option maxgap -> Error: attempt to apply non-function?
Hello,
I'm trying to use na.spline (package zoo) to fill some missing data in a time series.
this works fine, however, if I apply the 'maxgap' argument, I always get the error:
<------
Error in na.spline.vec(x., coredata(object.), xout = xout., ...) : attempt to apply non-function
------>
I couldn't find a similar error for this case in the mailing lists and zoo vignette,
2011 May 28
1
How to do operations on zoo/xts objects with Monthly and Daily periodicities
Is there an elegant way to do operations (+/-/*/ / ) on zoo/xts objects when
one serie is monthly (end of month) and the other daily (weekdays only) -
typically a monthly economic indicator and a stock index price?
Thanks,
TDB
--
View this message in context: http://r.789695.n4.nabble.com/How-to-do-operations-on-zoo-xts-objects-with-Monthly-and-Daily-periodicities-tp3558081p3558081.html
2017 Oct 06
2
Time series: xts/zoo object at annual (yearly) frequency
Hi,
I'd like to make a time series at an annual frequency.
> a<-xts(x=c(2,4,5), order.by=c("1991","1992","1993"))
Error in xts(x = c(2, 4, 5), order.by = c("1991", "1992", "1993")) :
order.by requires an appropriate time-based object
> a<-xts(x=c(2,4,5), order.by=1991:1993)
Error in xts(x = c(2, 4, 5), order.by =
2012 Apr 18
1
interpolation issue
This moment I got stuck with one interpolation issue
the sample data which I have is as follows
pre1 <- c(10.34615 , 52.02116, 146.17357, 243.28644, 347.41504, 431.67105,
521.42712, 629.00446 ,729.95941, 827.86279,
921.55078, 956.44446)
pre2 <- c( 983.4477692, 973.6199013, 958.0722141, 938.8194208 ,915.1833983,
852.1671089, 765.0037479,
2009 Mar 25
1
Interpolate x from y
Is it possible to interpolate a value for x with knowledge of y?
For example, approx(x, y, xout) will give me y's given a set of x's,
which is opposite to what I'm after. I've tried switching x and y,
e.g., approx(y, x, xout), but in a real data set it is possible to
have more than one y for a given x causing approx() to remove
coordinates.
Thanks for your help,
Greg.