[R] For loop - how to assign i when it is not an element of an index?

2008-10-21 Thread Scotty Nelson
Hello, I'm trying to build a for loop, where I estimate a series of models with different sets of (time series) data. However my for loop doesn't recognize the i # code window.1=anomalies.CAK[(positions(anomalies.CAK)=timeDate(1/1/1971)

[R] nlm return wrong function value - garch fitting

2008-10-14 Thread Scotty Nelson
I am using nlm to maximize a likelihood function. When I call the likelihood function (garchLLH) via nlm however, nlm returns the wrong value of the function. When I test the likelihood function manually I get the correct answer. I'm probably doing something really stupid, maybe someone can

[R] lag function doesn't work - what am i doing wrong?

2008-10-10 Thread Scotty Nelson
I am trying to lag a time series. My data is in a matrix, but I coerce it into a ts object. But when I lag it and then look at the result, nothing has changed. What am I doing wrong? residsq-resid^2 residsq-as.ts(residsq) lag1residsq-lag(residsq,-1) residsq[1:5] 1 2

Re: [R] lag function doesn't work - what am i doing wrong?

2008-10-10 Thread Scotty Nelson
subscripting of time series works. On Fri, Oct 10, 2008 at 1:27 PM, Scotty Nelson [EMAIL PROTECTED] wrote: I am trying to lag a time series. My data is in a matrix, but I coerce it into a ts object. But when I lag it and then look at the result, nothing has changed. What am I doing wrong

[R] qqline function doesn't plot

2008-08-05 Thread Scotty Nelson
I have a data vector x. When I try qqline(x) I get the following error: Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...) : plot.new has not been called yet And a blank plot appears. Can anybody help? What am I doing wrong? Thanks, Scotty

Re: [R] qqline function doesn't plot

2008-08-05 Thread Scotty Nelson
Thanks! -- View this message in context: http://www.nabble.com/qqline-function-doesn%27t-plot-tp18827175p18842548.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Including exogenous X-variables in ARFIMA models

2008-08-04 Thread Scotty Nelson
Does anybody know if there is a way to include exogenous X-variables in an ARFIMA model? It appears the ARFIMA function in fracdiff does not support this. Supposing there is nothing already written, and I wanted to modify the existing arfima function, how would I go about this? Would I need to

[R] Installing Packages in Windows Vista -- YES I tried Run as Administrator

2008-05-01 Thread Scotty Nelson
I'm having trouble installing packages in Windows Vista. It's driving me nuts. I read all the threads and I have tried the following: 1) Right click on R and Run as Administrator 2) Turn off User Account Control 3) Toss machine across room (OK haven't tried this one yet, but I'm close) Here is