So i tried brute force to find best fitted GARCH model for prediction.The code works fine as it runs but at the end of processing, there's error like this: There were 50 or more warnings (use warnings() to see the first 50). So i type warnings(), then the error become:unidentified option(s) in mean.model? Not sure what's gone wrong? See attached for R script
unidentified option(s) in mean.model
13 messages · Martin Maechler, Peter Dalgaard, Stephen Berman +4 more
Helo, No attachment came through. Change the file extension from .R to .txt and resend, there aren't many types of files r-help accepts. Rui Barradas Em 17-02-2017 17:20, Allan Tanaka escreveu:
So i tried brute force to find best fitted GARCH model for prediction.The code works fine as it runs but at the end of processing, there's error like this: There were 50 or more warnings (use warnings() to see the first 50). So i type warnings(), then the error become:unidentified option(s) in mean.model Not sure what's gone wrong? See attached for R script
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
2 days later
Rui Barradas <ruipbarradas at sapo.pt>
on Sat, 18 Feb 2017 13:47:02 +0000 writes:
> Helo, No attachment came through. Change the file
> extension from .R to .txt and resend, there aren't many
> types of files r-help accepts.
> Rui Barradas
As a matter of fact, one would have to blame the e-mail program
you use. The file extension is *not* equivalent to the file
type, and the mailing list software accepts the (MIME) type text/plain
and a couple of others.
The problem with most modern e-mail clients/programs/apps/... is that
they use something you could translate as "unknown binary format"
as type for their attachments if they can't guess the correct
file type from the file extension.
It would be interesting to know (for me) if there are modern
e-mail programs / web apps which you could *teach* about the
mime type, e.g., for all files ending with extension '.R'...
Martin Maechler
ETH Zurich, Seminar fuer Statistik,
== the provider of all the (standard) R mailing lists.
> Em 17-02-2017 17:20, Allan Tanaka escreveu:
>> ....
>> .... See attached for R script
Hello, I use Mozilla Thunderbird and I don't see a way of teaching it about the mime type. My understanding is that files with the .R extension are eliminated by the r-help mail server, but .txt pass. Is this correct? Rui Barradas Em 20-02-2017 14:15, Martin Maechler escreveu:
Rui Barradas <ruipbarradas at sapo.pt>
on Sat, 18 Feb 2017 13:47:02 +0000 writes:
> Helo, No attachment came through. Change the file
> extension from .R to .txt and resend, there aren't many
> types of files r-help accepts.
> Rui Barradas
As a matter of fact, one would have to blame the e-mail program you use. The file extension is *not* equivalent to the file type, and the mailing list software accepts the (MIME) type text/plain and a couple of others. The problem with most modern e-mail clients/programs/apps/... is that they use something you could translate as "unknown binary format" as type for their attachments if they can't guess the correct file type from the file extension. It would be interesting to know (for me) if there are modern e-mail programs / web apps which you could *teach* about the mime type, e.g., for all files ending with extension '.R'... Martin Maechler ETH Zurich, Seminar fuer Statistik, == the provider of all the (standard) R mailing lists.
> Em 17-02-2017 17:20, Allan Tanaka escreveu:
>> ....
>> .... See attached for R script
Not by the mail server as such, no, at least not for that reason. However, T-bird likely sends .txt as text/plain and .R as application/octet-stream (or so) and _therefore_ the server eliminates the latter and lets the former pass. -pd
On 20 Feb 2017, at 15:45 , Rui Barradas <ruipbarradas at sapo.pt> wrote: Hello, I use Mozilla Thunderbird and I don't see a way of teaching it about the mime type. My understanding is that files with the .R extension are eliminated by the r-help mail server, but .txt pass. Is this correct? Rui Barradas Em 20-02-2017 14:15, Martin Maechler escreveu:
Rui Barradas <ruipbarradas at sapo.pt>
on Sat, 18 Feb 2017 13:47:02 +0000 writes:
> Helo, No attachment came through. Change the file
> extension from .R to .txt and resend, there aren't many
> types of files r-help accepts.
> Rui Barradas
As a matter of fact, one would have to blame the e-mail program you use. The file extension is *not* equivalent to the file type, and the mailing list software accepts the (MIME) type text/plain and a couple of others. The problem with most modern e-mail clients/programs/apps/... is that they use something you could translate as "unknown binary format" as type for their attachments if they can't guess the correct file type from the file extension. It would be interesting to know (for me) if there are modern e-mail programs / web apps which you could *teach* about the mime type, e.g., for all files ending with extension '.R'... Martin Maechler ETH Zurich, Seminar fuer Statistik, == the provider of all the (standard) R mailing lists.
> Em 17-02-2017 17:20, Allan Tanaka escreveu:
>> ....
>> .... See attached for R script
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
peter dalgaard <pdalgd at gmail.com>
on Mon, 20 Feb 2017 19:45:18 +0100 writes:
> Not by the mail server as such, no, at least not for that
> reason. However, T-bird likely sends .txt as text/plain
> and .R as application/octet-stream (or so) and _therefore_
> the server eliminates the latter and lets the former pass.
> -pd
Exactly. Thank, you, Peter.
2 days later
On Mon, 20 Feb 2017 15:15:27 +0100 Martin Maechler <maechler at stat.math.ethz.ch> wrote:
Rui Barradas <ruipbarradas at sapo.pt>
on Sat, 18 Feb 2017 13:47:02 +0000 writes:
> Helo, No attachment came through. Change the file
> extension from .R to .txt and resend, there aren't many
> types of files r-help accepts.
> Rui Barradas
As a matter of fact, one would have to blame the e-mail program you use. The file extension is *not* equivalent to the file type, and the mailing list software accepts the (MIME) type text/plain and a couple of others. The problem with most modern e-mail clients/programs/apps/... is that they use something you could translate as "unknown binary format" as type for their attachments if they can't guess the correct file type from the file extension. It would be interesting to know (for me) if there are modern e-mail programs / web apps which you could *teach* about the mime type, e.g., for all files ending with extension '.R'...
Well, there's Gnus in Emacs:
(add-to-list 'mailcap-mime-extensions '(".R" . "text/x-rsrc"))
But I guess you know that ;-)
Steve Berman
On 23/02/2017 4:47 PM, Stephen Berman wrote:
On Mon, 20 Feb 2017 15:15:27 +0100 Martin Maechler <maechler at stat.math.ethz.ch> wrote:
Rui Barradas <ruipbarradas at sapo.pt>
on Sat, 18 Feb 2017 13:47:02 +0000 writes:
> Helo, No attachment came through. Change the file
> extension from .R to .txt and resend, there aren't many
> types of files r-help accepts.
> Rui Barradas
As a matter of fact, one would have to blame the e-mail program you use. The file extension is *not* equivalent to the file type, and the mailing list software accepts the (MIME) type text/plain and a couple of others. The problem with most modern e-mail clients/programs/apps/... is that they use something you could translate as "unknown binary format" as type for their attachments if they can't guess the correct file type from the file extension. It would be interesting to know (for me) if there are modern e-mail programs / web apps which you could *teach* about the mime type, e.g., for all files ending with extension '.R'...
Well, there's Gnus in Emacs:
(add-to-list 'mailcap-mime-extensions '(".R" . "text/x-rsrc"))
But I guess you know that ;-)
He said "modern". ;-) Duncan Murdoch
Hi See attached txt
On Saturday, 18 February 2017, 20:47, Rui Barradas <ruipbarradas at sapo.pt> wrote:
Helo, No attachment came through. Change the file extension from .R to .txt and resend, there aren't many types of files r-help accepts. Rui Barradas Em 17-02-2017 17:20, Allan Tanaka escreveu:
So i tried brute force to find best fitted GARCH model for prediction.The code works fine as it runs but at the end of processing, there's error like this: There were 50 or more warnings (use warnings() to see the first 50). So i type warnings(), then the error become:unidentified option(s) in mean.model Not sure what's gone wrong? See attached for R script
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
-------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 111.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170225/4ffc2613/attachment.txt>
Let me know if anything
On Saturday, 25 February 2017, 23:18, Allan Tanaka <allantanaka11 at yahoo.com> wrote:
Hi See attached txt
On Saturday, 18 February 2017, 20:47, Rui Barradas <ruipbarradas at sapo.pt> wrote:
Helo, No attachment came through. Change the file extension from .R to .txt and resend, there aren't many types of files r-help accepts. Rui Barradas Em 17-02-2017 17:20, Allan Tanaka escreveu:
So i tried brute force to find best fitted GARCH model for prediction.The code works fine as it runs but at the end of processing, there's error like this: There were 50 or more warnings (use warnings() to see the first 50). So i type warnings(), then the error become:unidentified option(s) in mean.model Not sure what's gone wrong? See attached for R script
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Hello,
Your minimal reproducible example is not reproducible since we don't
have acces to file "EURJPY.m1440.csv" and is far from minimal.
Anyway, the best I can say is that you are using the attribution
operator '<-' to set the values of a function's arguments when you
should use '='. Try instead the fllowing.
spec = ugarchspec(variance.model = list(model = "sGARCH",garchOrder=c(1,1)),
mean.model = list(
armaOrder = c(final.order[1], final.order[3]),
arfima = FALSE, include.mean = TRUE),
distribution.model = "sged")
Hope this helps,
Rui Barradas
Em 25-02-2017 16:18, Allan Tanaka escreveu:
Hi See attached txt On Saturday, 18 February 2017, 20:47, Rui Barradas <ruipbarradas at sapo.pt> wrote: Helo, No attachment came through. Change the file extension from .R to .txt and resend, there aren't many types of files r-help accepts. Rui Barradas Em 17-02-2017 17:20, Allan Tanaka escreveu:
> So i tried brute force to find best fitted GARCH model for
prediction.The code works fine as it runs but at the end of processing, there's error like this: There were 50 or more warnings (use warnings() to see the first 50).
> So i type warnings(), then the error become:unidentified option(s) in
mean.model
> Not sure what's gone wrong? > See attached for R script
> ______________________________________________ > R-help at r-project.org <mailto:R-help at r-project.org> mailing list -- To
UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html <http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >
That was confusing. One equals sign is used to assign values (actual arguments) to function inputs (formal arguments).
The assignment operator `<-` is used to assign values to variables in the current working environment. Due to popular demand, the single equals sign can ALSO be used for that purpose, but only outside the calling parenthesis for a function call.
I recognise that some people think this is a good argument for always using the single equals, but they are DIFFERENT operations in R, and pretending they are the same by using the same symbol in both situations just misleads people further, so at least be clear where each operator belongs when explaining the difference:
spec <- ugarchspec(variance.model = list(model = "sGARCH",garchOrder=c(1,1)),
mean.model = list(
armaOrder = c(final.order[1], final.order[3]),
arfima = FALSE, include.mean = TRUE),
distribution.model = "sged")
and then let people decide whether to use the less precise notation after they understand what is happening.
I find it more confusing to parse
f = function( x ) x^2
x = 1
x = x
f( x = x )
than
f <- function( x ) x^2
x <- 1
x <- x
f( x = x )
(The x = x is just as useless as x <- x is outside the parameter list, but serves an important purpose when inside the parameter list.)
Sent from my phone. Please excuse my brevity. On February 25, 2017 8:50:01 AM PST, Rui Barradas <ruipbarradas at sapo.pt> wrote: >Hello, > >Your minimal reproducible example is not reproducible since we don't >have acces to file "EURJPY.m1440.csv" and is far from minimal. >Anyway, the best I can say is that you are using the attribution >operator '<-' to set the values of a function's arguments when you >should use '='. Try instead the fllowing. > > >spec = ugarchspec(variance.model = list(model = >"sGARCH",garchOrder=c(1,1)), > mean.model = list( > armaOrder = c(final.order[1], final.order[3]), >arfima = FALSE, include.mean = TRUE), > distribution.model = "sged") > >Hope this helps, > >Rui Barradas > >Em 25-02-2017 16:18, Allan Tanaka escreveu: >> Hi >> >> See attached txt >> >> >> On Saturday, 18 February 2017, 20:47, Rui Barradas >> <ruipbarradas at sapo.pt> wrote: >> >> >> Helo, >> >> No attachment came through. Change the file extension from .R to .txt >> and resend, there aren't many types of files r-help accepts. >> >> Rui Barradas >> >> Em 17-02-2017 17:20, Allan Tanaka escreveu: >> > So i tried brute force to find best fitted GARCH model for >> prediction.The code works fine as it runs but at the end of >processing, >> there's error like this: There were 50 or more warnings (use >warnings() >> to see the first 50). >> > So i type warnings(), then the error become:unidentified option(s) >in >> mean.model >> > Not sure what's gone wrong? >> > See attached for R script >> >> > ______________________________________________ >> > R-help at r-project.org <mailto:R-help at r-project.org> mailing list -- >To >> UNSUBSCRIBE and more, see >> > https://stat.ethz.ch/mailman/listinfo/r-help >> > PLEASE do read the posting guide >> http://www.R-project.org/posting-guide.html >> <http://www.r-project.org/posting-guide.html> >> > and provide commented, minimal, self-contained, reproducible code. >> >> > >> >> > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.
Hello, You're right, but the equal sign outside the function call wasn't my doing. I should have noticed that the OP had used spec = ugarchspec(...) and '<-' inside the function call to assign values to the function's arguments, but I heven't, so I just corrected the '<-'. Rui Barradas Em 25-02-2017 17:32, Jeff Newmiller escreveu:
That was confusing. One equals sign is used to assign values (actual arguments) to function inputs (formal arguments).
The assignment operator `<-` is used to assign values to variables in the current working environment. Due to popular demand, the single equals sign can ALSO be used for that purpose, but only outside the calling parenthesis for a function call.
I recognise that some people think this is a good argument for always using the single equals, but they are DIFFERENT operations in R, and pretending they are the same by using the same symbol in both situations just misleads people further, so at least be clear where each operator belongs when explaining the difference:
spec <- ugarchspec(variance.model = list(model = "sGARCH",garchOrder=c(1,1)),
mean.model = list(
armaOrder = c(final.order[1], final.order[3]),
arfima = FALSE, include.mean = TRUE),
distribution.model = "sged")
and then let people decide whether to use the less precise notation after they understand what is happening.
I find it more confusing to parse
f = function( x ) x^2
x = 1
x = x
f( x = x )
than
f <- function( x ) x^2
x <- 1
x <- x
f( x = x )
(The x = x is just as useless as x <- x is outside the parameter list, but serves an important purpose when inside the parameter list.)