Displaying 20 results from an estimated 700 matches similar to: "for loop or "by" group in EF function"
2008 Jul 28
2
Help with a loop
HI:
I need ideas on how to make this code shorter (maybe with a second loop?).
The code as it is works, but in this case I only have 14 samples, but it
will become insane with more, so I need a way to make it more automatic. The
problem is that the output from ts1, ts2, and so on is a vector with more
than one value, so I do not know how to solve this.
Thanks
Prenewbie
The code is the
2005 Oct 31
1
how to optimise cross-correlation plot to study time lag between time-series?
Dear R-help,
How could a cross-correlation plot be optimized such that the relationship
between seasonal time-series can be studied?
We are working with strong seasonal time-series and derived a
cross-correlation plot to study the relationship between time-series. The
seasonal variation however strongly influences the cross-correlation plot
and the plot seems to be ?rather? symmetrical (max
2009 Aug 07
2
create separate plots by factors
Hello,
I am attempting to create several plots based on "site" (~300 total)
and am having trouble with the code. I simply want to create a plot
using the code, plot(year, peak), for the following dataset. I would
like for each site to be plotted on a separate page and the plots
saved in a directory. Would a "foreach" loop work? I tried a "by"
statement, but
2013 Aug 29
1
Calculation with Times Series
HI,
May be this helps:
?ts1<- ts(1:20)
?ts2<- ts(1:25)
ts1[-(1:3)]<- ts1[-(1:3)]+ts2[1:17]
?as.numeric(ts1)
# [1]? 1? 2? 3? 5? 7? 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37
A.K.
Hey everyone,
I`m an absolut beginner in R and need some help for an exercise:
I want to do ordinary calculations with 2 time series. The issue
with this, that I want to use different elements of time
2008 Mar 31
1
concatenating two successive time series
Dear Helpers,
I am looking for methods and tools to compare and then to concatenate
two successive time series. They are both in the same frequency and they
describe one phenomena. There is no time gap between them. The problem
is that the method of measurements has changed between both time series
and they are no statistically the same. I would like to merge them to
receive one homogeneous
2007 Aug 23
1
Estimate Intercept in ARIMA model
Hi, All,
This is my program
ts1.sim <- arima.sim(list(order = c(1,1,0), ar = c(0.7)), n = 200)
ts2.sim <- arima.sim(list(order = c(1,1,0), ar = c(0.5)), n = 200)
tdata<-ts(c(ts1.sim[-1],ts2.sim[-1]))
tre<-c(rep(0,200),rep(1,200))
gender<-rbinom(400,1,.5)
x<-matrix(0,2,400)
x[1,]<-tre
x[2,]<-gender
fit <- arima(tdata, c(1, 1, 0), method = "CSS",xreg=t(x))
2010 Dec 16
0
Problem wiht mvbutils and timeDate in R 2.12
Dear list,
We have encountered problems with the package mvbutils while creating (or
reading from disk) timeSeries objects. Below is a very simple example of the
problem. We are using R 2.12 in a PC running Windows 7 64-bit Professional.
-----------
library(timeSeries)
cv1 <- as.character(as.Date(1:10, origin = "1970-01-01"))
ts1 = timeSeries(1:10, cv1, units = NULL)
2005 Jan 06
1
GLMM and crossed effects
Hi again. Perhaps a simple question this time....
I am analysing data with a dependent variable of insect counts, a fixed
effect of site and two random effects, day, which is the same set of 10
days for each site, and then transect, which is nested within site (5
each).
I am trying to fit the cross classified model using GLMM in lme4. I
have, for potential use, created a second coding
2005 Apr 28
2
ips and netbios name on the logs
Hi people, does someone know how to only log the name of the machine and
not the name of the machine AND the ip? Let me explain this:
-rw-r--r-- 1 root root 0 Apr 28 02:47 0.0.0.0.log
-rw-r--r-- 1 root root 0 Apr 28 02:49 10.3.0.10.log
-rw-r--r-- 1 root root 0 Apr 28 02:47 10.3.0.21.log
-rw-r--r-- 1 root root 0 Apr 28 02:46 10.3.0.22.log
-rw-r--r-- 1 root root 0 Apr 28 02:48
2008 May 25
1
n Realizations of a Stochastic Process assigned to dynamically generated variable names?
I am interested in creating multiple (say 1000) time series, from a
given stochastic process, of length 250. I want to refer to each
realization with its own variable name, of the format say, tsn, where
n is the n'th simulation. i.e. ts1, ts2, ts3, ts4, .... , ts1000
The way I am thinking of doing this is placing the following code
within another loop, and the 'tsn' assignment should
2010 Sep 05
8
R time series analysis
I have a data file with a given time series of price data and I would like to
split the time series into a test set and training set. I would then like to
build an ARIMA model on the training set and apply this model on test set.
Below is some code:
[CODE]
data= read.table("A.txt",sep=",")
attach(data)
training = data[1:120, 6]
test = data[121:245, 6]
ts1 = ts(training)
ts2 =
2023 Feb 28
1
vector a partir de los valores de una tabla
Muy buenas, necesito crear un vector a partir de los valores de una tabla
como la de abajo. Debe ser algo muy fácil pero no lo encuentro en la web.
Gracias,
Manuel
246, 345, 401, 131,125, 69 a partir de:
TS1 TS2 TS3 TS4 TS5 TS6
246 345 401 131 125 69
[[alternative HTML version deleted]]
2008 May 28
1
Problem accessing to Windows Terminal Server in load balancing.
Hi guys, I have this configuration:
LAN -- LINUX BRIDGE -- LINUX BRIDGE -- TS
The linux's bridges are for wifi purposes (2 centos machines) and is
working fine.
The problem I have is that the TS are 3 windows TS in load balancing
configuration. There is 1 IP for general purposes and every TS has its own
IP.
For example, the configuration is:
192.168.0.1/24 TS1
192.168.0.2/24 TS2
2009 Feb 26
1
T-test by groups
I would like to run a t-test within a "by" group function. My
dataset, "error", is organized as the following (I have 133 Sites):
Site week Dataset Region lat_map long_map mean_tsim diff20 diff40
diff80
ALFI 15 USACE UC 48.15625 -117.0938 8.87 1.34 1.90
2.98
ALFI 16 USACE UC 48.15625 -117.0938 10.28 0.57 1.08
2.27
ALFI 17
2008 May 29
1
cbind results to original data frame
I have the following script, which gives me a prediction for each of
my observations (> 49k), and subsets my data frame by site (n = 183):
ts <- (by(dem16,dem16['Site'],function(dat)
try(predict(nls(Tw ~ mu + ((alpha - mu)/
(1 + exp(gamma*(B - Mean_air)))),
data = dat,
start = list(mu = 0.8, alpha = 21.8, gamma = 0.22, B =
12.8),
2005 Jun 16
1
Sweave and sideways
Hi there,
I'm rying to 'turn' an Schunk in an .Rnw file(Xemacs-21.4.13, ESS-5.2.8,
R-2.1, miktex-2.4.1705).
Has anyone got the isorot package to work with Sweave?
JC
example test.Rnw:
\documentclass[a4paper]{article}
\usepackage{Sweave}
\usepackage{isorot}
\rotdriver{dvips}
\clockwise
\title{Sweave Example 1}
\author{apologies to Friedrich Leisch }
\begin{document}
\maketitle
2009 Apr 03
1
how to do this "the R way"
Hi. I am sure there is a better way in R to do this then using a loop but I
am new to it and not sure what to do. I think it might be something about
using a function as an argument but not sure.
I have a 1 x 2000 vector TS2 which has entries from the set {x: x is in Z
and 0<x<8} (where Z is the set of Integers).
Then I also have a 5050 x 7 matrix called 'perm' whose entries are
2005 Mar 07
0
iax2 setvars help needed
I'm trying to pass a variable between servers using "setvar" in iax.conf.
I have a box (ts2) with a t100p in it. It answers the call and dials
another box (ast0) via IAX. I want to pass a variable along with the call
from ts2 to ast0.
I'm running CVS-HEAD-03/07/05 on ts2 and ast0.
ts2's iax.conf:
[general]
disallow = all
allow
2010 Oct 07
0
Lottery with Data Frame Rows
Hi List.
I've to perform a sequence of conditional sampling without repetition from a
very simple data frame.
It contains the samples and people names (which picked the sample).
Something like this (but much more longer):
Sample
Picker
4ME1B2 B
Ana
4ME1C1 B
Ana
4ME1D2 C
Ana
4ME1E2 C
Ana
4ME1E3 A
Ana
4ME2A1 C
Ana
4ME2D2 B
Ana
4CME3 B
Ingrid
4CME7 C
Ana
2007 Jan 19
1
help with ets function in forecast package
I have been trying to use the ets function in the forecast package on a
daily time series (ts2 is a ts object with frequency =7). However when I run
the following code I get an error related to etsmodel. I have looked at ets
and I can see that there is a call to the function etsmodel, but I cant seem
to find info on the ets function anywhere. Does anyone know anything about
the etsmodel function?