Giter VIP home page Giter VIP logo

poissonfits's Introduction

poissonFits

This package provides convenient functions for fitting Poisson distributions, regressions, and processes to count data of some phenomena or events. It also contains data-sets for examples of approximately Poisson distributed phenomena. These include data-sets named in R as "stormReport", "ENSO", and "atlanticStormsENSO" and "shootings". See the internal R documentation for more info and sources.

Installation

You can install the latest version from GitHub with:

devtools::install_github("shill1729/poissonFits")

Fit a Poisson distribution on the number of hurricanes per year in the Atlantic basin

We can load hurricane data from NHC NOAA, since they conveniently provide an XML file of all storm reports since 1958. See documentation on "stormReport" for more details. The data-set is provided with the package, however, a scraper is also available to get the latest file of storm-reports (which I imagine does not change frequently until after new storm seasons are over). NOTE: Early data contains named storms without designating them either a hurricane, a tropical storm, or a subtropical storm. The parameter for the Poisson distribution is chosen via MLE. A Chi-square test is then performed on the goodness of fit of the distribution to the empirical data.

library(poissonFits)
# Significance level for Chi-square test
alpha <- 0.05

# Default loads no tropical storms;
countData <- loadStormData()

# Pick either the atlantic, pacific, or world
countsYear <- countData$atlantic
# Get just the counts
countsData <- countsYear$freq

# Pass just the count data to poissonFit
poissonFit(countsData)

poissonfits's People

Contributors

shill1729 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.