Skip to content

unidentified option(s) in mean.model

13 messages · Martin Maechler, Peter Dalgaard, Stephen Berman +4 more

#
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
#
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:
2 days later
#
> 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:
#
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

  
    
#
> 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:

            
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:
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:
-------------- 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:

  
  
#
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:
#
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.)
#
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: