similar to: Using time series and lm

Displaying 20 results from an estimated 11000 matches similar to: "Using time series and lm"

2005 May 10
1
Aggregate lag
hello, Does anybody know how to aggregate a lag series ? when I try to use aggregate I get the following message > try<-ts(1:100,start=c(1985,1),freq=12) > aggregate(try,4,mean,na.rm=T) Qtr1 Qtr2 Qtr3 Qtr4 1985 2 5 8 11 1986 14 17 20 23 1987 26 29 32 35 1988 38 41 44 47 1989 50 53 56 59 1990 62 65 68 71 1991 74 77 80 83 1992
2006 Jan 25
2
Question about Aggregate
hello, Suppose you a monthly series you want to aggregate at a quaterly frequency with the start and the end of your series in the middle of the quarter. For example 2001M2 2001M3 2001M4 2001M5 2001M6 2001M7 12 13 12 14 16 15 how can you get something like : 2001Q1 2001Q2 200Q3 NA 14 NA or 2001Q1 2001Q2 200Q3 12.5 14 15 Thanks in advance
2005 Mar 05
4
How to use "lag"?
Is it possible to fit a lagged regression, "y[t]=b0+b1*x[t-1]+e", using the function "lag"? If so, how? If not, of what use is the function "lag"? I get the same answer from y~x as y~lag(x), whether using lm or arima. I found it using y~c(NA, x[-length(x)])). Consider the following: > set.seed(1) > x <- rep(c(rep(0, 4), 9), len=9) > y <-
2005 Feb 18
2
Using sweave
hello, Suppose in Rnw file, I compute a numeric of name x containing the value 1. In my tex file, I want to write Let x= "the real value of x" so that I can see in my dvi file : Let x = 1, with 1, the actual value of x written in a math environnement for example. Thanks, Matthieu
2009 Jul 15
1
Plotting hourly time-series data loaded from file using plot.ts
Hello everyone, I am just a tyro in R and would like your kindly help for some problems which I've been struggling for a while but still in vain. I have a time-series file (with some missing value ) which looks like time[sec] , Factor1 , Factor2 00:00:00 01.01.2007 , 0.0000 , 0.176083 01:00:00 01.01.2007 , 0.0000 , 0.176417 [ ... ] 11:00:00 10.06.2007 , 0.0000 , 0.148250 12:00:00 10.06.2007
2005 May 13
2
help with texi2dvi
Hello, Does anyone know how to write the files created by the call of "texi2dvi" in another directory ? Thanks, Matthieu
2011 Aug 04
2
Efficient way of creating a shifted (lagged) variable?
Hello! I have a data set: set.seed(123) y<-data.frame(week=seq(as.Date("2010-01-03"), as.Date("2011-01-31"),by="week")) y$var1<-c(1,2,3,round(rnorm(54),1)) y$var2<-c(10,20,30,round(rnorm(54),1)) # All I need is to create lagged variables for var1 and var2. I looked around a bit and found several ways of doing it. They all seem quite complicated - while in
2005 Apr 26
1
Time alignment of time series
One thing that has given me trouble is the fact that the time series implementation in the class ts relies on the concept of a "start" to the time series. For example, if I have ts1 <- ts(c(1,2,3)) dts1 <- diff(ts1) then dts1 will be a vector c(1,1) but with the attribute start = 2. Similarly, when one takes lags the "start" is moved around and the underlying vector
2005 Nov 17
1
Help with read.csv2
Hello, I am importing the following file ;aa;bb;cc 1988;12;12;12 1989;78;78;12 1990;78;78;12 1991;78;78;12 1992;78;78;12 1993;78;78;12 1994;78;78;12 ------------------------------------------------ data<-read.csv2("test.csv",header=T) ------------------------------------------ it gives X aa bb cc 1 1988 12 12 12 2 1989 78 78 12 3 1990 78 78 12 4 1991 78 78 12 5 1992 78 78 12 6
2010 Apr 05
1
predict.lm
Hello I am trying to use predict.lm, but I am having trouble getting out of sample predictions. I am getting the same output if I use the following three commands: predict(ModeloLineal,predictors[721:768,]) predict(ModeloLineal,predictors[1:768,]) predict(ModeloLineal) where ModeloLineal is the output from ModeloLineal<-lm(dataTS[,6] ~ predictors[1:720,]), so the first 720 observations of
2010 Apr 06
1
Out of sample forecast
Hello I am trying to use predict, but I am having trouble getting out of sample predictions. I am getting the same output if I use the following three commands: predict(ModeloLineal,predictors[721:768,]) predict(ModeloLineal,predictors[1:768,]) predict(ModeloLineal) where ModeloLineal is the output from ModeloLineal<-lm(dataTS[,6] ~ predictors[1:720,]), so the first 720 observations of
2005 Sep 16
1
About princomp
Hi, I run the example for princomp for R211 I got the following error for biplot > ## The variances of the variables in the > ## USArrests data vary by orders of magnitude, so scaling is appropriate > (pc.cr <http://pc.cr> <- princomp(USArrests)) # inappropriate Erreur dans cov.wt(z) : 'x' must contain finite values only > princomp(USArrests, cor = TRUE) # =^=
2005 Apr 07
3
analyse des correspondances multiples
bonjour, Je voudrais faire une analyse des correspondances multiples avec R. avec les repr?sentation graphiques correspondantes avec R. je ne sais pas comment proc?der .. en vour remerciant par avance Faouzi
2005 Feb 07
2
questions sur R
bonjour, Je suis actuellement en derniere annee d'ecole d'ingenieur en informatique et statistiques et je dois réaliser mon projet de fin d'études sur le logiciel R. En fait, je dois réaliser un scoring sous R puis le meme sous SAS et comparer les resultats. Mon fichier se prete à une regression logistique. J'ai donc utilisé la fonction glm sous R et Catmod sous SAS seumement, je
2004 Dec 01
3
grandstream bt100 upgrade 1.0.5.18
hi all i upgrade a bt100 phone and it can't resgister with asterisk Dec 1 13:25:49 NOTICE[1112980400]: chan_sip.c:7519 handle_request: Registration from '<sip:@172.16.4.249>' failed for '172.16.4.226' is was working with the version 1.0.5.3 some bady now what is hapening? thanks in advance Rodney
2005 Apr 21
4
basic question
I know this question is very simple, but I am not figure it out I have the data frame:   test<- data.frame(year=c(2000,2000,2001,2001),x=c(54,41,90,15), y=c(29,2,92,22), z=c(26,68,46,51)) test   year    x   y   z 1 2000 54 29 26 2 2000 41  2  68 3 2001 90 92 46 4 2001 15 22 51   I want to sum the vectors x, y and z within each year (2000
2008 Jan 31
1
Feature request: about lag(), which.min() and cat().
Hello I'm only user of R and have many little knowledge in programming but I permit to send you some whishes/suggestions for R. which.min like which(), which.min() should also include an argument arr.ind. Note that one can have it with which(a==min(a), arr.ind=TRUE) but if there is a reason to build a special function which.min, why not add also this nice argument? lag() If one wants to
2004 Aug 13
2
how to plot an array with labels
How can i plot an array and instead of having on the x labels the indexes of the array I want to display an other String array of the same length
2004 Sep 23
3
multinomial logistic regression
Hi, how can I do multinomial logistic regression in R? I think glm() can only handle binary response variable, and polr() can only handle ordinal response variable. how to do logistic regression with multinomial response variable? Thanks __________________________________
2004 Nov 05
2
graphics site
About six months ago there was a reference to a site (in french) that did a spectacular job of demonstrating R's graphical capabilities. My bookmarks were recently wiped and I cannot find this site despite my best googling. Anyone have the address which I have done a miserable job describing? Thanks. Michaell