Thanks for your response Gustav,

 

The dots in the models mean that there are other effects in the models.

In relation to the model, it would be like this:

 

Q(i) = Q(i-1) + b*max(s(i) - s(0), 0) + c*min(s(i) - s(0), 0) If( s(i) >
s(0)) then

   max(s(i) - s(0), 0) = s(i)-s(0) 

   min(s(i) - s(0), 0) = 0

   There is an accumulative positive effect and Q(1) is greater than Q(0)

      

If( s(1) < s(0)) then

   max(s(i) - s(0), 0) = 0

   min(s(i) - s(0), 0) = s(i)-s(0)

   There is an accumulative negative effect and Q(1) is lower than Q(0)

 

 

For i=1:

 

Q(1) = Q(0) + b*max(s(1) - s(0), 0) + c*min(s(1) - s(0), 0) If( s(1) > s(0))
then

   max(s(1) - s(0), 0) = s(1)-s(0) 

   min(s(1) - s(0), 0) = 0

      

If( s(1) < s(0)) then

   max(s(1) - s(0), 0) = 0

   min(s(1) - s(0), 0) = s(1)-s(0)

   

In the model the value of Q depends on the value of s. If that value is
above a threshold, Q increases and if the value of s is below the threshold
Q decreases. Then, when Q is above a threshold (different that the threshold
of s) it has an effect.

In my particular case, s is temperature and Q would be the amount of
temperature (or something similar) that is accumulated.

 

 

-----Original Message-----

From: Gustaf Rydevik [mailto:gustaf.rydevik@gmail.com]

Sent: Friday, September 28, 2007 11:13 AM

To: Manuel Ramon

Cc: r-help@r-project.org

Subject: Re: [R] Is there a model like that in R?

 

On 9/28/07, Manuel Ramon <mramon@uga.edu> wrote:

> Hi to everyone,

> 

> 

> 

> I am starting to work with a model that is not familiar to me.

> 

> The model would be like that:

> 

> 

> 

>    y = . - a*max(Q(i) - Q(0), 0) + .

> 

> 

> 

> where Q(i) is the accumulated effect of a variable at time i and Q(0) 

> a threshold above it there is effect on y.  The value of Q(i) could be 

> estimated as:

> 

> 

> 

>   Q(i+1) = Q(i) + b*max(s(i) - s(0), 0) + c*min(s(i) - s(0), 0) + .

> 

> 

> 

> Where s would be the effect that produces the accumulate effect of Q, 

> s(i) would be this effect at time i and s(0) another threshold above 

> it the accumulative effect is produced. The coefficient b would be the 

> rate of accumulation and c the rate of decay.

> 

> 

> 

> What kind of model is it? Is it somewhat similar to time series?

> 

> 

> 

> I appreciate your help.

> 

> 

> 

> Manuel Ramon

> 

 

I'm not sure what you're describing, but something is wrong for your
definition of Q(i).

 

For i=1:

 

Q(1) = Q(0) + b*max(s(0) - s(0), 0) + c*min(s(0) - s(0), 0) +
.=Q(0)+b*0+c*0=Q(0).

Thus, Q(n)=Q(n-1)=...=Q(0)

 

In addition, what is intended by the dots and the final plus in "y = .

- a*max(Q(i) - Q(0), 0) + ."?

 

I think you have to describe things a bit more careful, if we are to
understand what's happening.

 

Best,

 

Gustaf

 

 

--

Gustaf Rydevik, M.Sci.

tel: +46(0)703 051 451

address:Essingetorget 40,112 66 Stockholm, SE skype:gustaf_rydevik

 

 

 

 

Manuel

 


	[[alternative HTML version deleted]]

