Displaying 20 results from an estimated 10000 matches similar to: "Subtracting time series"
2011 Jan 23
1
Plotting multiple xts/zoo time series on a single plot.
So I've got a 154 column wide xts time series object and I want to plot the
154 series on a single plot and have the added benefit of the time series
dates on the x axis.
Any suggestions for plotting functions, maplot works but does not give dates
on the axis and I can't seem to get plot to give me more than one series.
Nick
[[alternative HTML version deleted]]
2011 Jan 22
1
Plotting by factor with xts
Hi all,
I've got an xts time series of stock symbols and closing prices.
> head(x)
symbol close
2010-01-04 "AFB" "13.46"
2010-01-04 "AKP" "12.80"
2010-01-04 "APX" " 8.78"
2010-01-04 "AYN" "13.15"
2010-01-04 "BAF" "13.50"
2010-01-04 "BBF" "12.86"
>
2010 Aug 14
1
Simple problem with lm/predict
Hi all,
I've got an xts time series with monthly OHLC Dow Jones industrial index
data from 1980 to present, the data is in stored in x.
I've done an OLS fit on the data in 1982::1994 and stored it in extrapolate1
(x[,4] contains the closing value for the index).
> t3 <- seq(1980,1994,length = length(x["1980::1994",4]))
> t4<-t3^2
> extrapolate1 <-
2011 Jul 17
1
FOMULATING TIME SERIES DATA FROM DATA FRAME
I am estimating Value at Risk using PerfomanceAnalytics package. The?variables are stored in a data frame. I formated the data variables using zoo() and as.xtx() but it is not working. The working example is below.
##########################################################?
reguire(zoo)
require(PerformanceAnalytics)
reguire(xts)
?
year<- c(1991-12-30, 1992-12-30, 1993-12-30, 1994-12-30)
R1
2012 Mar 04
1
Store vectors as values in xts time-series object
Hi R programmers,
I have stumbled across what seems a very simple problem. My goal is to
create a xts time series object which contains vectors as values. In
other words, I try to create something like this:
2009-01-01 => c('aa', 'bb', 'dd')
...
2010-02-01 => c('mm')
I have figured out parts of separately. Here's what works (new xts
time-series with
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 =
2010 Oct 21
2
Adding rows to column
I'm new to R.
I'm extracting important columns from single table using following code:
File2<-"file.txt"
table2<- read.delim(File2, skip=19, sep=";", header=F, na.strings=NA,
fill=T)
#extracting column 7 where rows match "ID"
col1<- table2[grep("ID", table2[,1]),7]
#similarly extracting column 9,11,13,15
col2<-
2012 Nov 02
2
override date in xts time series
Using the following bit of R, I'm wondering if there is a way to
override/manipulate/replace the date in one xts time series with the date of
another xts time series while not affecting/changing the times of the xts
time series?
library(xts)
x.Date <- rep("1/1/2004",times=5)
x.Times<- c("00:00:00", "00:15:00", "00:30:00",
2011 Oct 08
1
Filling missing days in xts time series
Hi,
I have a bunch of irregularly spaced xts time series (with a POSIX index),
and I'm trying to write a function that fillls the missing days. Using a
solution suggested by Gabor Grothendieck for zoo, I wrote the following:
# FD: Fill missing days
FD<-function(ser) {rng<-range(time(ser))
> temp<-merge(ser,xts(,seq(rng[1],rng[2],"day")))
>
2011 Oct 03
1
xts/time-series and plot questions...
Hello,
I'm a complete newbie to R. Spent this past weekend reading The Art of R Programming, The R Cookbook, the language spec, Wikis and FAQs. I sort-of have my head around R; the dizzying selection of libraries, packages, etc? Not really. I've probably missed or failed to understand something...
I have very a simple data set. Two years (ish) of temperature data, collected and
2011 Nov 26
3
Time series merge?
I have two time series
a <- ts(1:10, start=c(1,6), end=c(2,5), frequency=10)
b <- ts(1:5, start=c(2,1), end=c(2,5), frequency=10)
Obviously 'b' is a subset of 'a'. I want a single index value indicating
where that start of 'b' lines up with the start of 'a'. So in this simple
example I would expect an index of 5. I was playing with 'merge'.
2012 Dec 18
1
How to draw frequency domain plot with xts time series data
Hello,
I'd like to convert the below time-series data with fft or wavelet related function and plot it.
Could you let me know
1. How to convert xts data frame format to list format ?
2. How to plot fft or wavelet diagram ?
Here is the data :
> class(zc)
[1] "xts" "zoo"
> str(zc)
An ‘xts’ object from (10/15/12 09:00:00) to (10/15/12 15:15:00)
2012 Jan 03
1
sqldf and not converting integers to floating point in SQLite
Hi,
I have following 2 tables:
Table 1:
POSTAL | VALUE
1000|49
1010|100
1020|50
Table 2:
INSEE | POSTAL
A|1000
B|1000
C|1010
D|1020
I would like to convert this to the following:
INSEE | VALUE_SPREAD
A|24.5
B|24.5
C|100
D|50
I can achieve this with a nested SQL query (through counting the
number of POSTAL that belong to any given INSEE, and diving the value
of the postal in that INSEE by
2006 Feb 28
2
Need help with a Power Find()
I was hoping someone would be able to help me with creating a method.
I have two tables. What I am trying to do is create a list of all the id''s
from table2 that aren''t currently referenced by Table1''s address_id column.
That way, when I create a new customer I can have a drop down list in the
view of all the addresses that are not currently being used.
##### Database
2011 Mar 02
1
Create a zoo/xts Time Series with Millisecond jumps
Is there a easy way to create the time index for a zoo/xts object for every
100 milliseconds.
eg. time Index would be:
10:00:00:100
10:00:00:200
10:00:00:300
10:00:00:400
I am looking to build an empty zoo/xts object with time index from 10am to
3pm, index jumps by 100ms each row.
Thanks,
Chris
--
View this message in context:
2011 Aug 23
1
Testing Specific Hypothesis
Hi All!
I am interested in testing whether the means for the data I am investigating
are equal to a specific value - let's say 0.01. I have already run a
one-way ANOVA and know that the differences in the means are not
significant, so now I want to know what values the means take on. "otestme"
is the data I am working with (it would be hard for me to get into a form
that would be
2005 Jul 24
2
Multiple series plot with different 'type' argument
Hi:
I need to plot two time series in the same plot and
they cover the same time range and have the same
frequency. With
RSiteSearch("multiple series plot")
i found this post by Gabor Grothendieck:
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/42281.html
Exactly what i need except for one detail. I want one series
to be made of points and the other by a line. When I simply
try:
xts
2012 May 07
5
Subtracting a matrix 1x28 from a scalar
Afternoon-
I am trying to subtract a matrix, basically a vector of 28 values, each by
the same number to account for differences in regression fitting. I am
taking the 1x28 and minus it by the mean value of the matrix, each number.
The result I receive is a 1X29 matrix. Does anyone know why the result has
an extra value?
> lffeb_march
[1] 6.588926 7.663877 6.917706 6.824374 7.029973
2011 Dec 08
1
prop.test() and the simultaneous confidence interval for multiple proportions in R
Dear list members,
I want to perform in R the analysis "simultaneous confidence interval for multiple proportions", as illustrated in the article of Agresti et al. (2008) "Simultaneous confidence intervals for comparing binomial parameter", Biometrics 64, 1270-1275.
If I am not wrong the R function implementing the Agresti et al. method is prop.test(). I ask an help because I
2011 Aug 26
1
Time Series data with data every half hour
I am working with data from the USGS with data every 30 minutes from
4/27/2011 to 8/25/2011.
I am having trouble with setting the frequency.
My R script is below:
> shavers=read.csv("shavers.csv")
> names(shavers)
[1] "agency_cd" "site_no" "datetime" "tz_cd" "Temp"
[6] "X04_00010_cd"