Skip to main content

Datasets and utilities to support books by Julian Faraway

Project description

Functions and Datasets to support statistics book(s) by Julian Faraway

I am the author of

Linear Models with R

and

Extending the Linear Model with R

A new book entitled Linear Models with Python will be published soon. This package contains data (and documentation) along with a few functions to support this book.

Data

All the datasets from Linear Models with R are included. These are all small datasets useful for teaching or other example purposes.

You can load a dataset (for example) with

import faraway.datasets.composite
composite = faraway.datasets.composite.load()
composite

and you can see the description with

print(faraway.datasets.composite.DESCR)

The datasets included are

            clot        fat         infmort     peanut      resceram    swiss
aatemp      coagulation fortune     jsp         penicillin  salmonella  teengamb
abrasion    composite   fpe         kanga       pima        sat         truck
air         cornnit     fruitfly    leafburn    pipeline    savings     tvdoctor
alfalfa     corrosion   galamiss    manilius    pressure    seatpos     uswages
anaesthetic crawl       galapagos   mba         prostate    sexab       wafer
butterfat   denim       gammaray    meatspec    pulp        snail       warpbreaks
cars        divusa      generic     newhamp     punting     sono        whiteside
cheddar     eco         globwarm    oatvar      pvc         speedo
chmiss      eggprod     hips        odor        rabbit      star
chredlin    families    hsb         ozone       rats        statedata

This is a subset of those available in my R package on CRAN where you can also see documentation on these datasets.

Functions

Currently, there is only one useful function which is an alternative to the regression summary function used in statsmodels. It is much more compact. Suppose lmod is an OLSresults object, then (note the spelling is sumary())

lmod.sumary()

would produce somthing like

           coefs stderr tvalues pvalues
Intercept  7.068 19.154    0.37  0.7154
Area      -0.024  0.022   -1.07  0.2963
Elevation  0.319  0.054    5.95  0.0000
Nearest    0.009  1.054    0.01  0.9932
Scruz     -0.241  0.215   -1.12  0.2752
Adjacent  -0.075  0.018   -4.23  0.0003

n=30 p=6 Residual SD=60.975 R-squared=0.77

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faraway-0.0.5.tar.gz (195.8 kB view details)

Uploaded Source

Built Distribution

faraway-0.0.5-py3-none-any.whl (224.5 kB view details)

Uploaded Python 3

File details

Details for the file faraway-0.0.5.tar.gz.

File metadata

  • Download URL: faraway-0.0.5.tar.gz
  • Upload date:
  • Size: 195.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for faraway-0.0.5.tar.gz
Algorithm Hash digest
SHA256 b8aa5086c1314dcf146f51f2e954a510bf5ac916364c1df91f5ea8dc97548f8a
MD5 734a14e34c5b0913db8b7b8e60ad5ec6
BLAKE2b-256 2bd0d1d6224261ac74342b03684c4df9845951ec1df8814624b65dc9c93b5daf

See more details on using hashes here.

File details

Details for the file faraway-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: faraway-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 224.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for faraway-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0f8bcc83bab403ebf5d6d8ed1a22cade3664673d1f95cbf7f39cb65da268da42
MD5 c8d42446dfcddb4d7f33d94ec5a4cde6
BLAKE2b-256 91100abd1094037f2840f6daa12fc5ee0669872b9c4f33e49e46db72f1eda23d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page