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 something 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.6.tar.gz (195.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: faraway-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 f96856060ca690d22fb319221146c25e34a73f9baf273f98e2d57881902b066d
MD5 03e470064c7278722e6ee512e8e0deb6
BLAKE2b-256 ff138c3f54c85b81d79c1198ec0333fcab3b41e6a8bf007e340a3e52a4ad4a4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: faraway-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d1382f4050e587a1bbb36a903e0109b769f20fa42e18cc6be80143d7e6ac1ffd
MD5 34437e130a502fb44cc5309aca8a6d55
BLAKE2b-256 d6d8c04eb2ae7a628fd4d0a4557903dc1b903769a6e1d05c8af8e290b5181849

See more details on using hashes here.

Supported by

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