[R] Regression - how to deal with past values?

Eduardo M. A. M. Mendes emammendes at gmail.com
Tue Aug 16 15:27:31 CEST 2011


Yes, I have.

As far as R packages go I found two packages: forecast (only deals with linear stuff) and tsDyn (deals with nonlinear models but considers no input).

Cheers

Ed


On Aug 15, 2011, at 10:06 PM, Comcast wrote:

> Have you done any searching (with for instance the term "forecast")? If so then you should describe what you found and why it doesn't meet your needs.
> 
> -- 
> David
> 
> 
> Sent from my iPhone
> 
> On Aug 15, 2011, at 7:54 PM, "Eduardo M. A. M.Mendes" <emammendes at gmail.com> wrote:
> 
>> Many thanks but I am not  looking for a remote consulting.
>> 
>> Actually it is not difficult but unfortunately I am a newbie as far as
>> writing functions on R.  
>> 
>> Can I gather from your email that there is nothing available on R that deals
>> with dynamic models (k-step ahead and free-run)?
>> 
>> Cheers
>> 
>> Ed
>> 
>> 
>> -----Original Message-----
>> From: Bert Gunter [mailto:gunter.berton at gene.com] 
>> Sent: Monday, August 15, 2011 7:42 PM
>> To: Eduardo M. A. M.Mendes
>> Cc: r-help at r-project.org
>> Subject: Re: [R] Regression - how to deal with past values?
>> 
>> This may not be helpful, but this sounds difficult enough that you should
>> work with a local statistician rather than trying to get remote consulting
>> here.
>> 
>> -- Bert
>> 
>> On Mon, Aug 15, 2011 at 3:00 PM, Eduardo M. A. M.Mendes
>> <emammendes at gmail.com> wrote:
>>> Dear R-users
>>> 
>>> 
>>> 
>>> I need to fit a nonlinear model to a piece of data. The model to be 
>>> fitted uses past values of the input and the ouput - something like
>>> 
>>> y(k) ~ f(y(k-1),y(k-2),u(k),u(k-1) ....) (k is time index).  As far as 
>>> I know I could use earth(MARS), nnet and etc but I am not sure how to 
>>> deal with the past values since most, if not all, examples I saw 
>>> formula does not take in account past values of any input (let alone
>> output).
>>> 
>>> 
>>> 
>>> Is there any package available that deals with this type of 
>>> regression?  (ar
>>> (linear) is not what I am looking for).
>>> 
>>> 
>>> 
>>> Is there any example out there that I can follow?  I have searched the 
>>> web using words such as fitting and past values but I could not find 
>>> what I want.
>>> 
>>> 
>>> 
>>> Many thanks
>>> 
>>> 
>>> 
>>> Ed
>>> 
>>> 
>>> 
>>> 
>>>       [[alternative HTML version deleted]]
>>> 
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide 
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>> 
>> 
>> 
>> 
>> --
>> "Men by nature long to get on to the ultimate truths, and will often be
>> impatient with elementary studies or fight shy of them. If it were possible
>> to reach the ultimate truths without the elementary studies usually prefixed
>> to them, these would not be preparatory studies but superfluous diversions."
>> 
>> -- Maimonides (1135-1204)
>> 
>> Bert Gunter
>> Genentech Nonclinical Biostatistics
>> 467-7374
>> 
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list