Quantcast

unidentified option(s) in mean.model

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

unidentified option(s) in mean.model

Lemma
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
______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unidentified option(s) in mean.model

Rui Barradas
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
> ______________________________________________
> [hidden email] 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.
>

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

R scripts attached to e-mails - correct MIME type ?!

Martin Maechler
>>>>> Rui Barradas <[hidden email]>
>>>>>     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

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R scripts attached to e-mails - correct MIME type ?!

Rui Barradas
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 <[hidden email]>
>>>>>>      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
>

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R scripts attached to e-mails - correct MIME type ?!

Peter Dalgaard-2
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 <[hidden email]> 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 <[hidden email]>
>>>>>>>     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
>>
>
> ______________________________________________
> [hidden email] 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: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R scripts attached to e-mails - correct MIME type ?!

Martin Maechler
>>>>> peter dalgaard <[hidden email]>
>>>>>     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.

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R scripts attached to e-mails - correct MIME type ?!

Stephen Berman
In reply to this post by Martin Maechler
On Mon, 20 Feb 2017 15:15:27 +0100 Martin Maechler <[hidden email]> wrote:

>>>>>> Rui Barradas <[hidden email]>
>>>>>>     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

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: R scripts attached to e-mails - correct MIME type ?!

Duncan Murdoch-2
On 23/02/2017 4:47 PM, Stephen Berman wrote:

> On Mon, 20 Feb 2017 15:15:27 +0100 Martin Maechler <[hidden email]> wrote:
>
>>>>>>> Rui Barradas <[hidden email]>
>>>>>>>     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

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unidentified option(s) in mean.model

Lemma
In reply to this post by Rui Barradas
Hi
See attached txt

    On Saturday, 18 February 2017, 20:47, Rui Barradas <[hidden email]> 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
> ______________________________________________
> [hidden email] 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.
>

   
______________________________________________
[hidden email] 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.

111.txt (5K) Download Attachment
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unidentified option(s) in mean.model

Lemma
Let me know if anything

    On Saturday, 25 February 2017, 23:18, Allan Tanaka <[hidden email]> wrote:
 

 Hi
See attached txt

    On Saturday, 18 February 2017, 20:47, Rui Barradas <[hidden email]> 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
> ______________________________________________
> [hidden email] 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.
>


   

   
        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unidentified option(s) in mean.model

Rui Barradas
In reply to this post by Lemma
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
> <[hidden email]> 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
>
>  > ______________________________________________
>  > [hidden email] <mailto:[hidden email]> 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.
>
>  >
>
>

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unidentified option(s) in mean.model

Jeff Newmiller
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 <[hidden email]> 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
>> <[hidden email]> 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
>>
>>  > ______________________________________________
>>  > [hidden email] <mailto:[hidden email]> 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.
>>
>>  >
>>
>>
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: unidentified option(s) in mean.model

Rui Barradas
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.)
>

______________________________________________
[hidden email] 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.
Loading...