Displaying 4 results from an estimated 4 matches for "lagtime".
2011 Apr 09
1
How do I make this faster?
...'d like to make it
faster. So, I'm including my code below, in hopes that somebody will be able
to figure out how to make it faster, either through parallelisation, or by
making changes. I've marked the places where Rprof showed me it was slowing
down:
currencyCorrelation <- function(lagtime = 1) {
require(quantmod)
dataTrack <- getSymbols(commandArgs(trailingOnly=T)[1], from='2009-11-21',
to='2011-04-03')
stockData <- get(dataTrack)
currencies <- row.names(oanda.currencies[grep(pattern='oz.', fixed=T, x
=as.vector(oanda.currencies$oanda.df.1.l...
2008 Aug 18
2
Using lag
...with several weather variables (maxitemp,
windspeed, rainfall etc), and the response variable (admissions). The
dataset is fairly large (1530 observations). I simply want to model the
response against a lag of a couple of the explanatory variables, say
maxitemp and rainfall. I would like to look at lagtimes of 4 days, i.e.
4 observations. My dataframe is called allengland.
I thought I would be able to do something like:
model1 <- lm(admissions~lag(maxitemp,4),data=allengland)
but when I compare this to a lag of 0 I have exactly the same output,
so I am clearly doing something wrong.
Could...
2012 Aug 01
1
finding correlation for lagged values
Hi
I've to find the correlation of a variable and lag of other variable.
My code currently looks like this
y= 32 1 45 26 33 55 15 24 31 78
x=51 69 96 67 71 89 61 42 78 24
lagTimes=2
i want to find the correlation between y and Lag(x,1) and Y &Lag(x,2)
i'm using loop to find the lag and then finding correlation
If there are more variables and need to find the correlation lag with y it
takes a lot of time.
can anyone help
-----
Thanks in Advance
Arun
-...
2006 Jan 09
2
Rating/Survey Plugin
I would like include the ability for people to rate posts on my site
from 1 to 5. I would like to then display the average rating for each
post. To compute the average each time is obviously database and cpu
intensive. I have been thinking about the best solution. I could
certainly use a cache and expire it every x minutes. However, I don''t
want to reinvent the wheel. Is there