Re: [R] Iterative regression through a series

2013-04-05 Thread triskell4-umbre...@yahoo.fr
future projects much more streamlined.   Regards, Mendi De : Rui Barradas ruipbarra...@sapo.pt Cc : r-help@r-project.org r-help@r-project.org Envoyé le : Mercredi 3 avril 2013 3h43 Objet : Re: [R] Iterative regression through a series Hello, I've made

Re: [R] Iterative regression through a series

2013-04-03 Thread Rui Barradas
: Mardi 2 avril 2013 11h51 Objet : Re: [R] Iterative regression through a series Hello, The error comes from NAs where you would expect coefficients. Try the following. set.seed(7511) # Make the example reproducible N - 100 Time -1:N Price - rnorm(N, 8, 2) estim - numeric(N) # It's better

[R] Iterative regression through a series

2013-04-02 Thread triskell4-umbre...@yahoo.fr
Hello, Some context:  let's say I have a data series (let's call it PRICE, for simplicity), sample size N.  I have a desire to regress that on TIME, and then to use the TIME and intercept coefficients to predict the price in the next period and to use the standard error to calculate a

Re: [R] Iterative regression through a series

2013-04-02 Thread Rui Barradas
Hello, The error comes from NAs where you would expect coefficients. Try the following. set.seed(7511) # Make the example reproducible N - 100 Time -1:N Price - rnorm(N, 8, 2) estim - numeric(N) # It's better to allocate the results error - numeric(N) # vectors in advance for (i in

Re: [R] Iterative regression through a series

2013-04-02 Thread Michael Weylandt
Also look at zoo's rollapply. MW On Apr 2, 2013, at 13:51, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, The error comes from NAs where you would expect coefficients. Try the following. set.seed(7511) # Make the example reproducible N - 100 Time -1:N Price - rnorm(N, 8, 2)

Re: [R] Iterative regression through a series

2013-04-02 Thread triskell4-umbre...@yahoo.fr
Envoyé le : Mardi 2 avril 2013 11h51 Objet : Re: [R] Iterative regression through a series Hello, The error comes from NAs where you would expect coefficients. Try the following. set.seed(7511)  # Make the example reproducible N - 100 Time -1:N Price - rnorm(N, 8, 2) estim - numeric(N)  # It's

Re: [R] Iterative regression through a series

2013-04-02 Thread David Chertudi
De : Michael Weylandt michael.weyla...@gmail.com À : Rui Barradas ruipbarra...@sapo.pt @r-project.org r-help@r-project.org Envoyé le : Mardi 2 avril 2013 11h58 Objet : Re: [R] Iterative regression through a series Also look at zoo's rollapply. MW On Apr 2

Re: [R] Iterative regression through a series

2013-04-02 Thread Mark Leeds
De : Michael Weylandt michael.weyla...@gmail.com À : Rui Barradas ruipbarra...@sapo.pt @r-project.org r-help@r-project.org Envoyé le : Mardi 2 avril 2013 11h58 Objet : Re: [R] Iterative regression through a series Also look at zoo's rollapply. MW On Apr 2, 2013, at 13:51, Rui