On 26/06/12 00:39, Kathie wrote:
Dear R users,
I'd like to compute X like below.
X_{i,t} = 0.1*t + 2*X_{i,t-1} + W_{i,t}
where W_{i,t} are from Uniform(0,2) and X_{i,0} = 1+5*W_{i,0}
Of course, I can do this with "for" statement, but I don't think it's good
idea because "i" and "t" are too
thanks peter. I was thinking more about t but you're right in that there's
an i there also. my
bad ( twice ).
On Mon, Jun 25, 2012 at 9:37 AM, Petr Savicky wrote:
> On Mon, Jun 25, 2012 at 05:39:45AM -0700, Kathie wrote:
> > Dear R users,
> >
> > I'd like to compute X like below.
> >
> > X_{i
On Mon, Jun 25, 2012 at 05:39:45AM -0700, Kathie wrote:
> Dear R users,
>
> I'd like to compute X like below.
>
> X_{i,t} = 0.1*t + 2*X_{i,t-1} + W_{i,t}
>
> where W_{i,t} are from Uniform(0,2) and X_{i,0} = 1+5*W_{i,0}
>
> Of course, I can do this with "for" statement, but I don't think it's
Hi Kathryn: I'm sorry because I didn't read your question carefully enough.
arima.sim won't help because you don't have a normal error term. I think
you have to loop unless someone else knows of a way that I'm not aware of.
good luck.
On Mon, Jun 25, 2012 at 8:39 AM, Kathie wrote:
> Dear R us
Hi: Use arima.sim because when you have recursive relationships like that,
there's no way to
not loop. If arima.sim doesn't allow for the trend piece (0.1*t ), then you
can do that part seperately using cumsum(0.1*(1:t)) and then add it back in
to what arima.sim gives you. I don't remember if arim
Dear R users,
I'd like to compute X like below.
X_{i,t} = 0.1*t + 2*X_{i,t-1} + W_{i,t}
where W_{i,t} are from Uniform(0,2) and X_{i,0} = 1+5*W_{i,0}
Of course, I can do this with "for" statement, but I don't think it's good
idea because "i" and "t" are too big.
So, my question is that
Is
6 matches
Mail list logo