fitting weibull distribution to “wind speed” data

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I am trying to fit a weibull distribution to my wind speed data with the following code:



fitdistr(av_ws, densfun = "weibull") #av_ws is the wind speed data


The error appears, that the data also contains some zero's...
does the function fitdistr() not working with zero's in the data? As the lowest values from a weibull distribution can be 0 I don't understand why the function is not working...










share|cite|improve this question









New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Welcome to CV! Please include a minimal working example, or a summary of your data and the exact error message. Also note that questions strictly about programming are off-topic here, so depending on what exactly you want to know, your question might be better suited on stackoverflow.
    – Frans Rodenburg
    2 hours ago
















up vote
1
down vote

favorite












I am trying to fit a weibull distribution to my wind speed data with the following code:



fitdistr(av_ws, densfun = "weibull") #av_ws is the wind speed data


The error appears, that the data also contains some zero's...
does the function fitdistr() not working with zero's in the data? As the lowest values from a weibull distribution can be 0 I don't understand why the function is not working...










share|cite|improve this question









New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Welcome to CV! Please include a minimal working example, or a summary of your data and the exact error message. Also note that questions strictly about programming are off-topic here, so depending on what exactly you want to know, your question might be better suited on stackoverflow.
    – Frans Rodenburg
    2 hours ago












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am trying to fit a weibull distribution to my wind speed data with the following code:



fitdistr(av_ws, densfun = "weibull") #av_ws is the wind speed data


The error appears, that the data also contains some zero's...
does the function fitdistr() not working with zero's in the data? As the lowest values from a weibull distribution can be 0 I don't understand why the function is not working...










share|cite|improve this question









New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am trying to fit a weibull distribution to my wind speed data with the following code:



fitdistr(av_ws, densfun = "weibull") #av_ws is the wind speed data


The error appears, that the data also contains some zero's...
does the function fitdistr() not working with zero's in the data? As the lowest values from a weibull distribution can be 0 I don't understand why the function is not working...







r weibull






share|cite|improve this question









New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|cite|improve this question









New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|cite|improve this question




share|cite|improve this question








edited 3 hours ago









Sven Hohenstein

4,74762333




4,74762333






New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









Cedric Kaeslin

61




61




New contributor




Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Cedric Kaeslin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • Welcome to CV! Please include a minimal working example, or a summary of your data and the exact error message. Also note that questions strictly about programming are off-topic here, so depending on what exactly you want to know, your question might be better suited on stackoverflow.
    – Frans Rodenburg
    2 hours ago
















  • Welcome to CV! Please include a minimal working example, or a summary of your data and the exact error message. Also note that questions strictly about programming are off-topic here, so depending on what exactly you want to know, your question might be better suited on stackoverflow.
    – Frans Rodenburg
    2 hours ago















Welcome to CV! Please include a minimal working example, or a summary of your data and the exact error message. Also note that questions strictly about programming are off-topic here, so depending on what exactly you want to know, your question might be better suited on stackoverflow.
– Frans Rodenburg
2 hours ago




Welcome to CV! Please include a minimal working example, or a summary of your data and the exact error message. Also note that questions strictly about programming are off-topic here, so depending on what exactly you want to know, your question might be better suited on stackoverflow.
– Frans Rodenburg
2 hours ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote













If you look at the likelihood you'll see that a value of 0 results in a log- likelihood term involving $log 0$, which is obviously problematic. In fact, i don't think that exact values of zero should occur under a Weibull distribution.



One way out would be, if your wind speed measurement device cannot measure wind speeds below some very low minimum. The your 0s are really left censored observations (i.e. you know the speed is some number below this minimum). R, SAS, python et al. all have function for censored data (survival analysis).






share|cite|improve this answer




















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "65"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    Cedric Kaeslin is a new contributor. Be nice, and check out our Code of Conduct.









     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f369321%2ffitting-weibull-distribution-to-wind-speed-data%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    If you look at the likelihood you'll see that a value of 0 results in a log- likelihood term involving $log 0$, which is obviously problematic. In fact, i don't think that exact values of zero should occur under a Weibull distribution.



    One way out would be, if your wind speed measurement device cannot measure wind speeds below some very low minimum. The your 0s are really left censored observations (i.e. you know the speed is some number below this minimum). R, SAS, python et al. all have function for censored data (survival analysis).






    share|cite|improve this answer
























      up vote
      2
      down vote













      If you look at the likelihood you'll see that a value of 0 results in a log- likelihood term involving $log 0$, which is obviously problematic. In fact, i don't think that exact values of zero should occur under a Weibull distribution.



      One way out would be, if your wind speed measurement device cannot measure wind speeds below some very low minimum. The your 0s are really left censored observations (i.e. you know the speed is some number below this minimum). R, SAS, python et al. all have function for censored data (survival analysis).






      share|cite|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        If you look at the likelihood you'll see that a value of 0 results in a log- likelihood term involving $log 0$, which is obviously problematic. In fact, i don't think that exact values of zero should occur under a Weibull distribution.



        One way out would be, if your wind speed measurement device cannot measure wind speeds below some very low minimum. The your 0s are really left censored observations (i.e. you know the speed is some number below this minimum). R, SAS, python et al. all have function for censored data (survival analysis).






        share|cite|improve this answer












        If you look at the likelihood you'll see that a value of 0 results in a log- likelihood term involving $log 0$, which is obviously problematic. In fact, i don't think that exact values of zero should occur under a Weibull distribution.



        One way out would be, if your wind speed measurement device cannot measure wind speeds below some very low minimum. The your 0s are really left censored observations (i.e. you know the speed is some number below this minimum). R, SAS, python et al. all have function for censored data (survival analysis).







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered 1 hour ago









        Björn

        8,0451833




        8,0451833




















            Cedric Kaeslin is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            Cedric Kaeslin is a new contributor. Be nice, and check out our Code of Conduct.












            Cedric Kaeslin is a new contributor. Be nice, and check out our Code of Conduct.











            Cedric Kaeslin is a new contributor. Be nice, and check out our Code of Conduct.













             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f369321%2ffitting-weibull-distribution-to-wind-speed-data%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            Long meetings (6-7 hours a day): Being “babysat” by supervisor

            Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

            Confectionery