Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6185071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:38:55+00:00 2026-05-24T01:38:55+00:00

Please bear with me if this is rather tenuous, and feel free to ask

  • 0

Please bear with me if this is rather tenuous, and feel free to ask questions if I have left anything out…

I’m attempting to do some 50 year extreme wind calculations based on the following link

http://www.wasp.dk/Products/weng/ExtremeWinds.htm

They seem to use the gumbel distribution, so I have used function gumbel in package “evir” to fit the distribution to the data, and function dgumbel in package “evd” as the plotting function.

package("evd")
package("evir")

speeds2 <- data.frame(speed=sample(10:50,1000,rep=TRUE))
gumbel(speeds2$speed)

I have then tried to plot this using ggplot2’s stat_function, like so (except for now I have put in dummy values for loc and scale.

library(ggplot2)
ggplot(data=speeds2, aes(x=speed)) + 
  stat_function(fun=dgumbel, args=list(loc=1, scale=0.5))

I get the following error:

Error in dgev(x, loc = loc, scale = scale, shape = 0, log = log) : 
  unused argument(s) (loc = loc, scale = scale, shape = 0, log = log)

I am unsure if I am doing this the right way. Any pointers would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T01:38:56+00:00Added an answer on May 24, 2026 at 1:38 am

    Earlier session showed that the parameter estimates from the gumbel call were near 24 and 11.

    library(evd)
    library(ggplot2)
     speeds2 <- data.frame(speed=sample(10:50,1000,rep=TRUE))
     ggplot(data=speeds2, aes(x=speed), geom="density") + 
       stat_function(fun=dgumbel, args=list(loc=24, scale=11))
    

    If you only used the parameters of 1 and 0.5, you got a straight flat line. Loading only evd prevents conflicts with the dgumbel-related functions in evir. When you load evir second you get:

    > speeds2 <- data.frame(speed=sample(10:50,1000,rep=TRUE))
    > ggplot(data=speeds2, aes(x=speed), geom="density") + 
    +   stat_function(fun=dgumbel, args=list(loc=24, scale=11))
    Error in dgev(x, loc = loc, scale = scale, shape = 0, log = log) : 
      unused argument(s) (loc = loc, scale = scale, shape = 0, log = log)
    

    Demonstrating how to make a call to a dgumbel function in a particular (better behaved) package:

    library(VGAM)
    ggplot(data = speeds2, aes(x = speed)) + 
       stat_function(fun = VGAM::dgumbel, args = list(location = 24, scale = 11))
    

    I think Ramnath’s suggestion to add the empiric ‘density’ is good but I prefer to use geom_histogram:

    ggplot(data=speeds2, aes(x=speed)) + geom_histogram(aes(y = ..density..) , binwidth=5 ) + 
                                stat_function(fun=dgumbel, args=list(loc=24, scale=11))
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a Java-beginner, so please bear with this one. I have a class: class
This is kinda confusing so please bear with me. I have an array (listOfStates)
Firstly this has turned out to be quite a long post so please bear
This is a rather weird question, so please bear with me. There's a SWF
NOTICE This is a rather large question, so please bear with me and I
Please bear with me on this as I'm new to this. I have an
Please bear with me -- I know this is complex. I have a table
This is a little difficult to explain so please bear with me. I have
This is somewhat complicated to explain, so please bear with me. I have an
Please bear with me as I am a cakephp noob. I have this app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.