Function Repository Resource:

StatisticalExampleData

Source Notebook

Retrieve datasets for statistical analysis and modeling

Contributed by: Arnoud Buzing

ResourceFunction["StatisticalExampleData"][name]

gives the statistical dataset for for the given name.

Details

Datasets are sourced from the external statsmodels package and include:
"AmericanNationalElectionStudies1996"subset of the American National Election Studies of 1996
"BreastCancerCountyPopulation"breast Cancer and county population
"WilliamGreeneCreditScoring"William Greene's credit scoring data
"LungCancerSmokingCoOccurrenceChinaCities"Co-occurrence of lung cancer and smoking in 8 Chinese cities.
"MaunaLoaAtmosphericCO2"Atmospheric CO2 from Continuous Air Samples at Mauna Loa Observatory, Hawaii, U.S.A.
"HouseBillAssignments104thCongress1995"Number of bill assignments in the 104th House in 1995
"WorldCopperMarket1951To1975"World Copper Market 1951-1975
"StateExecutions1997"Number of state executions in 1997
"DanishMoneyDemand"Danish Money Demand Data
"PacificOceanAverageMonthlySeaSurfaceTemperature"averaged monthly sea surface temperature - Pacific Ocean
"EngelFoodExpenditure"Engel food expenditure data
"ExtramaritalAffair"extramarital affair data
"TotalFertilityRate"total fertility rate
"GrunfeldInvestmentFirm"Grunfeld (1950) Investment Data for 11 U.S. Firm.
"HeartTransplantSurvivalTimes"survival times after receiving a heart transplant
"GermanInterestInflation"(West) German interest and inflation rate 1972Q2 - 1998Q4
"EconomicGrowthCityEmployment"economic growth data
"USMacroeconomicQuarterly"US Macroeconomic Data for 1959Q1 - 2009Q3
"AustraliaCityTravelMode"travel mode choice between Australian cities
"NileRiverFlowAshwan"measurements on the annual flow of the Nile as measured at Ashwan for 100 years from 1871-1970
"RandHealthInsuranceExperiment"the RAND Co. Health Insurance Experiment Data
"ScottishParliamentTaxationPowersYesVote1997"taxation Powers' Yes Vote for Scottish Parliament for 1997
"PersonalizedInstructionEffectiveness"experimental data on the effectiveness of the personalized system of instruction (PSI) program
"StackLossPlant"stack loss plant data of Brownlee (1965)
"StudentMathScores"math scores for 303 student with 10 explanatory factors
"StateCrime2009"state crime data 2009
"USManufacturingStrikesAndProduction"data on the length of strikes in US manufacturing and unanticipated industrial production
"SunspotYearlyNationalGeophysical"yearly (1700-2008) data on sunspots from the National Geophysical Data Center

Examples

Basic Examples

Atmospheric CO2 measurements taken at Mauna Loa:

In[1]:=
ResourceFunction["StatisticalExampleData"]["MaunaLoaAtmosphericCO2"]
Out[1]=

Copper market data for the years 1951 to 1975:

In[2]:=
ResourceFunction[
 "StatisticalExampleData"]["WorldCopperMarket1951To1975"]
Out[2]=

Average monthly sea surface temperatures for the Pacific Ocean:

In[3]:=
ds = ResourceFunction["StatisticalExampleData"][
  "PacificOceanAverageMonthlySeaSurfaceTemperature"]
Out[3]=

Plot the temperatures for January for each year:

In[4]:=
DateListPlot[
 ds[Values, {DateObject[{Round[#["YEAR"]], 1, 1}], #["JAN"]} &]]
Out[4]=

Publisher

WolframExternalFunctions

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.0.0 – 06 May 2024

Source Metadata

License Information