Re: [R] Problem in adapting a script I have not written.

2016-02-18 Thread Jeff Newmiller
Looks to me like the code was not tested for an AR value of 1. Works if I set it to 2. Could be an issue of failing to use the drop=FALSE option when indexing a matrix or data frame, but I don't have time to dig thorough the code to find out where. -- Sent from my phone. Please excuse my brevit

Re: [R] Problem in adapting a script I have not written.

2016-02-18 Thread Jeff Newmiller
d[ 3 ] means indexing some vector-like object called "d" to extract the third value. (You really need to read the Introduction to R document that comes with R, particularly about indexing. There are actually four ways to do indexing that may come up as you read other people's code.) "d" is the c

Re: [R] Problem in adapting a script I have not written.

2016-02-18 Thread Dalila Zolarsi
I'm really sorry, I forgot the attachment! I attach the main code as txt file, instead here there everything else I mentioned. I apologize if I have not been able to summarize, but I am not so proficient. Yes, the ar parameter is exactly what

Re: [R] Problem in adapting a script I have not written.

2016-02-18 Thread Dalila Zolarsi
I forgot to attach the website in which there's all what is needed for this procedure, sorry! The text file I attach is the main standard procedure, while in the website there is all the resources for the example. If you can help me, I'd be so grateful! I think it's all self written, by the way be

Re: [R] Problem in adapting a script I have not written.

2016-02-18 Thread Frank Duschek
Hi Dalila, is your function a part of a packacke or is it self-written? If you have the code it would be helpful to provide it. Frank __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEAS

[R] Problem in adapting a script I have not written.

2016-02-18 Thread Dalila Zolarsi
Dear R users, I'm new of R, thus I apologize in advance if my following question may result a little dumb, but I really need some expert advice. I have a problem in applying someone else's code to my data. The author's code works perfectly with the examples he provides, and it seems to me I am doin