►1 datasets-islr
On this page:
1.1 auto
1.2 bikeshare
1.3 boston
1.4 brain-cancer
1.5 caravan
1.6 carseats
1.7 college
1.8 credit
1.9 default
1.10 fund
1.11 hitters
1.12 khan
1.13 nci60
1.14 nyse
1.15 oj
1.16 ozone
1.17 portfolio
1.18 prostate
1.19 publication
1.20 sa-heart
1.21 smarket
1.22 vowel
1.23 wage
1.24 weekly

1 datasets-islr🔗ℹ

24 datasets. Licenses: GPL-2.0-only; GPL-2.0-or-later.

1.1 auto🔗ℹ

392 rows × 9 columns. Gas mileage, horsepower, and other information for 392 vehicles. The 392 vehicles with a known horsepower: ISLR2 dropped 5 of the 397 rows of Auto.data, and the numeric row names that index them are not kept. name is categorical with all 304 R levels. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

mpg

  

mpg

  

real

  

miles per gallon; miles per gallon; ()

cylinders

  

cylinders

  

integer

  

Number of cylinders between 4 and 8; #f; ()

displacement

  

displacement

  

real

  

Engine displacement (cu. inches); #f; ()

horsepower

  

horsepower

  

integer

  

Engine horsepower; #f; ()

weight

  

weight

  

integer

  

Vehicle weight (lbs.); lbs; ()

acceleration

  

acceleration

  

real

  

Time to accelerate from 0 to 60 mph (sec.); #f; ()

year

  

year

  

integer

  

Model year (modulo 100); #f; ()

origin

  

origin

  

integer

  

Origin of car (1. American, 2. European, 3. Japanese); #f; ()

name

  

name

  

categorical

  

Vehicle name; #f; (amc ambassador brougham amc ambassador dpl amc ambassador sst amc concord amc concord d/l amc concord dl 6 amc gremlin amc hornet amc hornet sportabout (sw) amc matador amc matador (sw) amc pacer amc pacer d/l amc rebel sst amc spirit dl audi 100 ls audi 100ls audi 4000 audi 5000 audi 5000s (diesel) audi fox bmw 2002 bmw 320i buick century buick century 350 buick century limited buick century luxus (sw) buick century special buick electra 225 custom buick estate wagon (sw) buick lesabre custom buick opel isuzu deluxe buick regal sport coupe (turbo) buick skyhawk buick skylark buick skylark 320 buick skylark limited cadillac eldorado cadillac seville capri ii chevroelt chevelle malibu chevrolet bel air chevrolet camaro chevrolet caprice classic chevrolet cavalier chevrolet cavalier 2-door chevrolet cavalier wagon chevrolet chevelle concours (sw) chevrolet chevelle malibu chevrolet chevelle malibu classic chevrolet chevette chevrolet citation chevrolet concours chevrolet impala chevrolet malibu chevrolet malibu classic (sw) chevrolet monte carlo chevrolet monte carlo landau chevrolet monte carlo s chevrolet monza 2+2 chevrolet nova chevrolet nova custom chevrolet vega chevrolet vega (sw) chevrolet vega 2300 chevrolet woody chevy c10 chevy c20 chevy s-10 chrysler cordoba chrysler lebaron medallion chrysler lebaron salon chrysler lebaron town @ country (sw) chrysler new yorker brougham chrysler newport royal datsun 1200 datsun 200-sx datsun 200sx datsun 210 datsun 210 mpg datsun 280-zx datsun 310 datsun 310 gx datsun 510 datsun 510 (sw) datsun 510 hatchback datsun 610 datsun 710 datsun 810 datsun 810 maxima datsun b-210 datsun b210 datsun b210 gx datsun f-10 hatchback datsun pl510 dodge aries se dodge aries wagon (sw) dodge aspen dodge aspen 6 dodge aspen se dodge challenger se dodge charger 2.2 dodge colt dodge colt (sw) dodge colt hardtop dodge colt hatchback custom dodge colt m/m dodge coronet brougham dodge coronet custom dodge coronet custom (sw) dodge d100 dodge d200 dodge dart custom dodge diplomat dodge magnum xe dodge monaco (sw) dodge monaco brougham dodge omni dodge rampage dodge st. regis fiat 124 sport coupe fiat 124 tc fiat 124b fiat 128 fiat 131 fiat strada custom fiat x1.9 ford country ford country squire (sw) ford escort 2h ford escort 4w ford f108 ford f250 ford fairmont ford fairmont (auto) ford fairmont (man) ford fairmont 4 ford fairmont futura ford fiesta ford futura ford galaxie 500 ford gran torino ford gran torino (sw) ford granada ford granada ghia ford granada gl ford granada l ford ltd ford ltd landau ford maverick ford mustang ford mustang cobra ford mustang gl ford mustang ii ford mustang ii 2+2 ford pinto ford pinto (sw) ford pinto runabout ford ranger ford thunderbird ford torino ford torino 500 hi 1200d honda accord honda accord cvcc honda accord lx honda civic honda civic (auto) honda civic 1300 honda civic 1500 gl honda civic cvcc honda prelude maxda glc deluxe maxda rx3 mazda 626 mazda glc mazda glc 4 mazda glc custom mazda glc custom l mazda glc deluxe mazda rx-4 mazda rx-7 gs mazda rx2 coupe mercedes benz 300d mercedes-benz 240d mercedes-benz 280s mercury capri 2000 mercury capri v6 mercury cougar brougham mercury grand marquis mercury lynx l mercury marquis mercury marquis brougham mercury monarch mercury monarch ghia mercury zephyr mercury zephyr 6 nissan stanza xe oldsmobile cutlass ciera (diesel) oldsmobile cutlass ls oldsmobile cutlass salon brougham oldsmobile cutlass supreme oldsmobile delta 88 royale oldsmobile omega oldsmobile omega brougham oldsmobile starfire sx oldsmobile vista cruiser opel 1900 opel manta peugeot 304 peugeot 504 peugeot 504 (sw) peugeot 505s turbo diesel peugeot 604sl plymouth 'cuda 340 plymouth arrow gs plymouth champ plymouth cricket plymouth custom suburb plymouth duster plymouth fury plymouth fury gran sedan plymouth fury iii plymouth grand fury plymouth horizon plymouth horizon 4 plymouth horizon miser plymouth horizon tc3 plymouth reliant plymouth sapporo plymouth satellite plymouth satellite custom plymouth satellite custom (sw) plymouth satellite sebring plymouth valiant plymouth valiant custom plymouth volare plymouth volare custom plymouth volare premier v8 pontiac astro pontiac catalina pontiac catalina brougham pontiac firebird pontiac grand prix pontiac grand prix lj pontiac j2000 se hatchback pontiac lemans v6 pontiac phoenix pontiac phoenix lj pontiac safari (sw) pontiac sunbird coupe pontiac ventura sj renault 12 (sw) renault 12tl renault 18i renault 5 gtl renault lecar deluxe saab 99e saab 99gle saab 99le subaru subaru dl toyota carina toyota celica gt toyota celica gt liftback toyota corolla toyota corolla 1200 toyota corolla 1600 (sw) toyota corolla liftback toyota corolla tercel toyota corona toyota corona hardtop toyota corona liftback toyota corona mark ii toyota cressida toyota mark ii toyota starlet toyota tercel toyouta corona mark ii (sw) triumph tr7 coupe vokswagen rabbit volkswagen 1131 deluxe sedan volkswagen 411 (sw) volkswagen dasher volkswagen jetta volkswagen model 111 volkswagen rabbit volkswagen rabbit custom volkswagen rabbit custom diesel volkswagen rabbit l volkswagen scirocco volkswagen super beetle volkswagen type 3 volvo 144ea volvo 145e (sw) volvo 244dl volvo 245 volvo 264gl volvo diesel vw dasher (diesel) vw pickup vw rabbit vw rabbit c (diesel) vw rabbit custom)

1.2 bikeshare🔗ℹ

8645 rows × 15 columns. This data set contains the hourly and daily count of rental bikes between years 2011 and 2012 in Capital bikeshare system, along with weather and seasonal information. Only 2011 is included: 8,645 hours, day 1 to 365. hr is categorical with levels "0" to "23"; mnth keeps R’s level labels. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

season

  

season

  

integer

  

Season of the year, coded as Winter=1, Spring=2, Summer=3, Fall=4.; #f; ()

mnth

  

mnth

  

categorical

  

Month of the year, coded as a factor.; #f; (Jan Feb March April May June July Aug Sept Oct Nov Dec)

day

  

day

  

integer

  

Day of the year, from 1 to 365; #f; ()

hr

  

hr

  

categorical

  

Hour of the day, coded as a factor from 0 to 23.; #f; (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23)

holiday

  

holiday

  

integer

  

Is it a holiday? Yes=1, No=0.; #f; ()

weekday

  

weekday

  

integer

  

Day of the week, coded from 0 to 6, where Sunday=0, Monday=1, Tuesday=2, etc.; #f; ()

workingday

  

workingday

  

integer

  

Is it a work day? Yes=1, No=0.; #f; ()

weathersit

  

weathersit

  

categorical

  

Weather, coded as a factor.; #f; (clear cloudy/misty light rain/snow heavy rain/snow)

temp

  

temp

  

real

  

Normalized temperature in Celsius. The values are derived via (t-t_min)/(t_max-t_min), t_min=-8, t_max=+39.; #f; ()

atemp

  

atemp

  

real

  

Normalized feeling temperature in Celsius. The values are derived via (t-t_min)/(t_max-t_min), t_min=-16, t_max=+50.; #f; ()

hum

  

hum

  

real

  

Normalized humidity. The values are divided to 100 (max).; #f; ()

windspeed

  

windspeed

  

real

  

Normalized wind speed. The values are divided by 67 (max).; #f; ()

casual

  

casual

  

integer

  

Number of casual bikers.; #f; ()

registered

  

registered

  

integer

  

Number of registered bikers.; #f; ()

bikers

  

bikers

  

integer

  

Total number of bikers.; #f; ()

1.3 boston🔗ℹ

506 rows × 13 columns. A data set containing housing values in 506 suburbs of Boston. ISLR2’s Boston: MASS::Boston without the black column. names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

crim

  

crim

  

real

  

per capita crime rate by town.; #f; ()

zn

  

zn

  

real

  

proportion of residential land zoned for lots over 25,000 sq.ft.; #f; ()

indus

  

indus

  

real

  

proportion of non-retail business acres per town.; #f; ()

chas

  

chas

  

integer

  

Charles River dummy variable (= 1 if tract bounds river; 0 otherwise).; #f; ()

nox

  

nox

  

real

  

nitrogen oxides concentration (parts per 10 million).; #f; ()

rm

  

rm

  

real

  

average number of rooms per dwelling.; #f; ()

age

  

age

  

real

  

proportion of owner-occupied units built prior to 1940.; #f; ()

dis

  

dis

  

real

  

weighted mean of distances to five Boston employment centres.; #f; ()

rad

  

rad

  

integer

  

index of accessibility to radial highways.; #f; ()

tax

  

tax

  

integer

  

full-value property-tax rate per $10,000.; #f; ()

ptratio

  

ptratio

  

real

  

pupil-teacher ratio by town.; #f; ()

lstat

  

lstat

  

real

  

lower status of the population (percent).; #f; ()

medv

  

medv

  

real

  

median value of owner-occupied homes in $1000s.; $1000s; ()

1.4 brain-cancer🔗ℹ

88 rows × 8 columns. A data set consisting of survival times for patients diagnosed with brain cancer. Survival data: time with status 1 = event observed, 0 = censored. One diagnosis is missing. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

sex

  

sex

  

categorical

  

Factor with levels "Female" and "Male"; #f; (Female Male)

diagnosis

  

diagnosis

  

categorical

  

Factor with levels "Meningioma", "LG glioma", "HG glioma", and "Other".; #f; (Meningioma LG glioma HG glioma Other)

loc

  

loc

  

categorical

  

Location factor with levels "Infratentorial" and "Supratentorial".; #f; (Infratentorial Supratentorial)

ki

  

ki

  

integer

  

Karnofsky index.; #f; ()

gtv

  

gtv

  

real

  

Gross tumor volume, in cubic centimeters.; cm^3; ()

stereo

  

stereo

  

categorical

  

Stereotactic method factor with levels "SRS" and "SRT".; #f; (SRS SRT)

status

  

status

  

integer

  

Whether the patient is still alive at the end of the study: 0=Yes, 1=No.; #f; ()

time

  

time

  

real

  

Survival time, in months.; months; ()

1.5 caravan🔗ℹ

5822 rows × 86 columns. The data contains 5822 real customer records. Each record consists of 86 variables, containing sociodemographic data (variables 1-43) and product ownership (variables 44-86). The sociodemographic data is derived from zip codes. All customers living in areas with the same zip code have the same sociodemographic attributes. Variable 86 (Purchase) indicates whether the customer purchased a caravan insurance policy. Further information on the individual variables can be obtained at http://www.liacs.nl/~putten/library/cc2000/data.html. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

mostype

  

MOSTYPE

  

integer

  

MOSTYPE; #f; ()

maanthui

  

MAANTHUI

  

integer

  

MAANTHUI; #f; ()

mgemomv

  

MGEMOMV

  

integer

  

MGEMOMV; #f; ()

mgemleef

  

MGEMLEEF

  

integer

  

MGEMLEEF; #f; ()

moshoofd

  

MOSHOOFD

  

integer

  

MOSHOOFD; #f; ()

mgodrk

  

MGODRK

  

integer

  

MGODRK; #f; ()

mgodpr

  

MGODPR

  

integer

  

MGODPR; #f; ()

mgodov

  

MGODOV

  

integer

  

MGODOV; #f; ()

mgodge

  

MGODGE

  

integer

  

MGODGE; #f; ()

mrelge

  

MRELGE

  

integer

  

MRELGE; #f; ()

mrelsa

  

MRELSA

  

integer

  

MRELSA; #f; ()

mrelov

  

MRELOV

  

integer

  

MRELOV; #f; ()

mfalleen

  

MFALLEEN

  

integer

  

MFALLEEN; #f; ()

mfgekind

  

MFGEKIND

  

integer

  

MFGEKIND; #f; ()

mfwekind

  

MFWEKIND

  

integer

  

MFWEKIND; #f; ()

moplhoog

  

MOPLHOOG

  

integer

  

MOPLHOOG; #f; ()

moplmidd

  

MOPLMIDD

  

integer

  

MOPLMIDD; #f; ()

mopllaag

  

MOPLLAAG

  

integer

  

MOPLLAAG; #f; ()

mberhoog

  

MBERHOOG

  

integer

  

MBERHOOG; #f; ()

mberzelf

  

MBERZELF

  

integer

  

MBERZELF; #f; ()

mberboer

  

MBERBOER

  

integer

  

MBERBOER; #f; ()

mbermidd

  

MBERMIDD

  

integer

  

MBERMIDD; #f; ()

mberarbg

  

MBERARBG

  

integer

  

MBERARBG; #f; ()

mberarbo

  

MBERARBO

  

integer

  

MBERARBO; #f; ()

mska

  

MSKA

  

integer

  

MSKA; #f; ()

mskb1

  

MSKB1

  

integer

  

MSKB1; #f; ()

mskb2

  

MSKB2

  

integer

  

MSKB2; #f; ()

mskc

  

MSKC

  

integer

  

MSKC; #f; ()

mskd

  

MSKD

  

integer

  

MSKD; #f; ()

mhhuur

  

MHHUUR

  

integer

  

MHHUUR; #f; ()

mhkoop

  

MHKOOP

  

integer

  

MHKOOP; #f; ()

maut1

  

MAUT1

  

integer

  

MAUT1; #f; ()

maut2

  

MAUT2

  

integer

  

MAUT2; #f; ()

maut0

  

MAUT0

  

integer

  

MAUT0; #f; ()

mzfonds

  

MZFONDS

  

integer

  

MZFONDS; #f; ()

mzpart

  

MZPART

  

integer

  

MZPART; #f; ()

minkm30

  

MINKM30

  

integer

  

MINKM30; #f; ()

mink3045

  

MINK3045

  

integer

  

MINK3045; #f; ()

mink4575

  

MINK4575

  

integer

  

MINK4575; #f; ()

mink7512

  

MINK7512

  

integer

  

MINK7512; #f; ()

mink123m

  

MINK123M

  

integer

  

MINK123M; #f; ()

minkgem

  

MINKGEM

  

integer

  

MINKGEM; #f; ()

mkoopkla

  

MKOOPKLA

  

integer

  

MKOOPKLA; #f; ()

pwapart

  

PWAPART

  

integer

  

PWAPART; #f; ()

pwabedr

  

PWABEDR

  

integer

  

PWABEDR; #f; ()

pwaland

  

PWALAND

  

integer

  

PWALAND; #f; ()

ppersaut

  

PPERSAUT

  

integer

  

PPERSAUT; #f; ()

pbesaut

  

PBESAUT

  

integer

  

PBESAUT; #f; ()

pmotsco

  

PMOTSCO

  

integer

  

PMOTSCO; #f; ()

pvraaut

  

PVRAAUT

  

integer

  

PVRAAUT; #f; ()

paanhang

  

PAANHANG

  

integer

  

PAANHANG; #f; ()

ptractor

  

PTRACTOR

  

integer

  

PTRACTOR; #f; ()

pwerkt

  

PWERKT

  

integer

  

PWERKT; #f; ()

pbrom

  

PBROM

  

integer

  

PBROM; #f; ()

pleven

  

PLEVEN

  

integer

  

PLEVEN; #f; ()

ppersong

  

PPERSONG

  

integer

  

PPERSONG; #f; ()

pgezong

  

PGEZONG

  

integer

  

PGEZONG; #f; ()

pwaoreg

  

PWAOREG

  

integer

  

PWAOREG; #f; ()

pbrand

  

PBRAND

  

integer

  

PBRAND; #f; ()

pzeilpl

  

PZEILPL

  

integer

  

PZEILPL; #f; ()

pplezier

  

PPLEZIER

  

integer

  

PPLEZIER; #f; ()

pfiets

  

PFIETS

  

integer

  

PFIETS; #f; ()

pinboed

  

PINBOED

  

integer

  

PINBOED; #f; ()

pbystand

  

PBYSTAND

  

integer

  

PBYSTAND; #f; ()

awapart

  

AWAPART

  

integer

  

AWAPART; #f; ()

awabedr

  

AWABEDR

  

integer

  

AWABEDR; #f; ()

awaland

  

AWALAND

  

integer

  

AWALAND; #f; ()

apersaut

  

APERSAUT

  

integer

  

APERSAUT; #f; ()

abesaut

  

ABESAUT

  

integer

  

ABESAUT; #f; ()

amotsco

  

AMOTSCO

  

integer

  

AMOTSCO; #f; ()

avraaut

  

AVRAAUT

  

integer

  

AVRAAUT; #f; ()

aaanhang

  

AAANHANG

  

integer

  

AAANHANG; #f; ()

atractor

  

ATRACTOR

  

integer

  

ATRACTOR; #f; ()

awerkt

  

AWERKT

  

integer

  

AWERKT; #f; ()

abrom

  

ABROM

  

integer

  

ABROM; #f; ()

aleven

  

ALEVEN

  

integer

  

ALEVEN; #f; ()

apersong

  

APERSONG

  

integer

  

APERSONG; #f; ()

agezong

  

AGEZONG

  

integer

  

AGEZONG; #f; ()

awaoreg

  

AWAOREG

  

integer

  

AWAOREG; #f; ()

abrand

  

ABRAND

  

integer

  

ABRAND; #f; ()

azeilpl

  

AZEILPL

  

integer

  

AZEILPL; #f; ()

aplezier

  

APLEZIER

  

integer

  

APLEZIER; #f; ()

afiets

  

AFIETS

  

integer

  

AFIETS; #f; ()

ainboed

  

AINBOED

  

integer

  

AINBOED; #f; ()

abystand

  

ABYSTAND

  

integer

  

ABYSTAND; #f; ()

purchase

  

Purchase

  

categorical

  

Purchase; #f; (No Yes)

1.6 carseats🔗ℹ

400 rows × 11 columns. A simulated data set containing sales of child car seats at 400 different stores. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

sales

  

Sales

  

real

  

Unit sales (in thousands) at each location; thousands of units; ()

comp-price

  

CompPrice

  

integer

  

Price charged by competitor at each location; #f; ()

income

  

Income

  

integer

  

Community income level (in thousands of dollars); #f; ()

advertising

  

Advertising

  

integer

  

Local advertising budget for company at each location (in thousands of dollars); #f; ()

population

  

Population

  

integer

  

Population size in region (in thousands); #f; ()

price

  

Price

  

integer

  

Price company charges for car seats at each site; #f; ()

shelve-loc

  

ShelveLoc

  

categorical

  

A factor with levels Bad, Good and Medium indicating the quality of the shelving location for the car seats at each site; #f; (Bad Good Medium)

age

  

Age

  

integer

  

Average age of the local population; #f; ()

education

  

Education

  

integer

  

Education level at each location; #f; ()

urban

  

Urban

  

categorical

  

A factor with levels No and Yes to indicate whether the store is in an urban or rural location; #f; (No Yes)

us

  

US

  

categorical

  

A factor with levels No and Yes to indicate whether the store is in the US or not; #f; (No Yes)

1.7 college🔗ℹ

777 rows × 19 columns. Statistics for a large number of US Colleges from the 1995 issue of US News and World Report. The college names, R row names, become the first column, name. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

name

  

row names

  

identifier

  

College name; #f; ()

private

  

Private

  

categorical

  

A factor with levels No and Yes indicating private or public university; #f; (No Yes)

apps

  

Apps

  

integer

  

Number of applications received; #f; ()

accept

  

Accept

  

integer

  

Number of applications accepted; #f; ()

enroll

  

Enroll

  

integer

  

Number of new students enrolled; #f; ()

top10perc

  

Top10perc

  

integer

  

Pct. new students from top 10% of H.S. class; #f; ()

top25perc

  

Top25perc

  

integer

  

Pct. new students from top 25% of H.S. class; #f; ()

full-time-undergrad

  

F.Undergrad

  

integer

  

Number of fulltime undergraduates; #f; ()

part-time-undergrad

  

P.Undergrad

  

integer

  

Number of parttime undergraduates; #f; ()

outstate

  

Outstate

  

integer

  

Out-of-state tuition; #f; ()

room-board

  

Room.Board

  

integer

  

Room and board costs; #f; ()

books

  

Books

  

integer

  

Estimated book costs; #f; ()

personal

  

Personal

  

integer

  

Estimated personal spending; #f; ()

phd

  

PhD

  

integer

  

Pct. of faculty with Ph.D.'s; #f; ()

terminal

  

Terminal

  

integer

  

Pct. of faculty with terminal degree; #f; ()

sf-ratio

  

S.F.Ratio

  

real

  

Student/faculty ratio; #f; ()

perc-alumni

  

perc.alumni

  

integer

  

Pct. alumni who donate; #f; ()

expend

  

Expend

  

integer

  

Instructional expenditure per student; #f; ()

grad-rate

  

Grad.Rate

  

integer

  

Graduation rate; #f; ()

1.8 credit🔗ℹ

400 rows × 11 columns. A simulated data set containing information on 400 customers. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

income

  

Income

  

real

  

Income in $1,000's; #f; ()

limit

  

Limit

  

integer

  

Credit limit; #f; ()

rating

  

Rating

  

integer

  

Credit rating; #f; ()

cards

  

Cards

  

integer

  

Number of credit cards; #f; ()

age

  

Age

  

integer

  

Age in years; #f; ()

education

  

Education

  

integer

  

Education in years; #f; ()

own

  

Own

  

categorical

  

A factor with levels No and Yes indicating whether the individual owns a home; #f; (No Yes)

student

  

Student

  

categorical

  

A factor with levels No and Yes indicating whether the individual is a student; #f; (No Yes)

married

  

Married

  

categorical

  

A factor with levels No and Yes indicating whether the individual is married; #f; (No Yes)

region

  

Region

  

categorical

  

A factor with levels East, South, and West indicating the individual's geographical location; #f; (East South West)

balance

  

Balance

  

integer

  

Average credit card balance in $.; #f; ()

1.9 default🔗ℹ

10000 rows × 4 columns. A simulated data set containing information on ten thousand customers. The aim here is to predict which customers will default on their credit card debt. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

default

  

default

  

categorical

  

A factor with levels No and Yes indicating whether the customer defaulted on their debt; #f; (No Yes)

student

  

student

  

categorical

  

A factor with levels No and Yes indicating whether the customer is a student; #f; (No Yes)

balance

  

balance

  

real

  

The average balance that the customer has remaining on their credit card after making their monthly payment; #f; ()

income

  

income

  

real

  

Income of customer; #f; ()

1.10 fund🔗ℹ

50 rows × 2000 columns. A simulated data set containing the returns for 2,000 hedge fund managers. Wide form: one row per month (50), one column per manager (2,000). names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

manager1 … manager2000

  

Manager1 … Manager2000

  

real

  

Manager1 … Manager2000; #f; ()

1.11 hitters🔗ℹ

322 rows × 21 columns. Major League Baseball Data from the 1986 and 1987 seasons. The player names, R row names, become the first column, player, with their leading hyphen kept. The 59 missing salaries are retained. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

player

  

row names

  

identifier

  

Player name; #f; ()

at-bat

  

AtBat

  

integer

  

Number of times at bat in 1986; #f; ()

hits

  

Hits

  

integer

  

Number of hits in 1986; #f; ()

hm-run

  

HmRun

  

integer

  

Number of home runs in 1986; #f; ()

runs

  

Runs

  

integer

  

Number of runs in 1986; #f; ()

rbi

  

RBI

  

integer

  

Number of runs batted in in 1986; #f; ()

walks

  

Walks

  

integer

  

Number of walks in 1986; #f; ()

years

  

Years

  

integer

  

Number of years in the major leagues; #f; ()

career-at-bat

  

CAtBat

  

integer

  

Number of times at bat during his career; #f; ()

career-hits

  

CHits

  

integer

  

Number of hits during his career; #f; ()

career-hm-run

  

CHmRun

  

integer

  

Number of home runs during his career; #f; ()

career-runs

  

CRuns

  

integer

  

Number of runs during his career; #f; ()

career-rbi

  

CRBI

  

integer

  

Number of runs batted in during his career; #f; ()

career-walks

  

CWalks

  

integer

  

Number of walks during his career; #f; ()

league

  

League

  

categorical

  

A factor with levels A and N indicating player's league at the end of 1986; #f; (A N)

division

  

Division

  

categorical

  

A factor with levels E and W indicating player's division at the end of 1986; #f; (E W)

put-outs

  

PutOuts

  

integer

  

Number of put outs in 1986; #f; ()

assists

  

Assists

  

integer

  

Number of assists in 1986; #f; ()

errors

  

Errors

  

integer

  

Number of errors in 1986; #f; ()

salary

  

Salary

  

real

  

1987 annual salary on opening day in thousands of dollars; thousands of dollars; ()

new-league

  

NewLeague

  

categorical

  

A factor with levels A and N indicating player's league at the beginning of 1987; #f; (A N)

1.12 khan🔗ℹ

83 rows × 2310 columns. The data consists of a number of tissue samples corresponding to four distinct types of small round blue cell tumors. For each tissue sample, 2308 gene expression measurements are available. Wide form of the Khan list: the 63 xtrain rows then the 20 xtest rows, told apart by split; y is ytrain or ytest, the tumour class 1-4; gene-1 to gene-2308 are the expression values, original names their column numbers. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

split

  

xtrain or xtest

  

categorical

  

Training or test sample; #f; (train test)

y

  

ytrain or ytest

  

integer

  

Tumour class, 1-4; #f; ()

gene-1 … gene-2308

  

1 … 2308

  

real

  

1 … 2308; #f; ()

1.13 nci60🔗ℹ

64 rows × 6831 columns. NCI microarray data. The data contains expression levels on 6830 genes from 64 cancer cell lines. Cancer type is also recorded. Wide form of the NCI60 list: label is labs, the cancer type (categorical, sorted levels); gene-1 to gene-6830 are the columns of data, original names their column names. The labels are for checking clusters, not a target. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

label

  

labs

  

categorical

  

Cancer type of the cell line; #f; (BREAST CNS COLON K562A-repro K562B-repro LEUKEMIA MCF7A-repro MCF7D-repro MELANOMA NSCLC OVARIAN PROSTATE RENAL UNKNOWN)

gene-1 … gene-6830

  

1 … 6830

  

real

  

1 … 6830; #f; ()

1.14 nyse🔗ℹ

6051 rows × 6 columns. Data consisting of the Dow Jones returns, log trading volume, and log volatility for the New York Stock Exchange over a 20 year period. date stays an ISO 8601 string; day-of-week is categorical, weekdays in order; train, an R logical, is 1 for the first 4,281 days and 0 after. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

date

  

date

  

string

  

Date; #f; ()

day-of-week

  

day_of_week

  

categorical

  

Day of the week; #f; (mon tues wed thur fri)

dj-return

  

DJ_return

  

real

  

Return for Dow Jones Industrial Average; #f; ()

log-volume

  

log_volume

  

real

  

Log of trading volume; #f; ()

log-volatility

  

log_volatility

  

real

  

Log of volatility; #f; ()

train

  

train

  

integer

  

For the first 4,281 observations, this is set to TRUE; #f; ()

1.15 oj🔗ℹ

1070 rows × 18 columns. The data contains 1070 purchases where the customer either purchased Citrus Hill or Minute Maid Orange Juice. A number of characteristics of the customer and product are recorded. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

purchase

  

Purchase

  

categorical

  

A factor with levels CH and MM indicating whether the customer purchased Citrus Hill or Minute Maid Orange Juice; #f; (CH MM)

week-of-purchase

  

WeekofPurchase

  

integer

  

Week of purchase; #f; ()

store-id

  

StoreID

  

integer

  

Store ID; #f; ()

price-ch

  

PriceCH

  

real

  

Price charged for CH; #f; ()

price-mm

  

PriceMM

  

real

  

Price charged for MM; #f; ()

disc-ch

  

DiscCH

  

real

  

Discount offered for CH; #f; ()

disc-mm

  

DiscMM

  

real

  

Discount offered for MM; #f; ()

special-ch

  

SpecialCH

  

integer

  

Indicator of special on CH; #f; ()

special-mm

  

SpecialMM

  

integer

  

Indicator of special on MM; #f; ()

loyal-ch

  

LoyalCH

  

real

  

Customer brand loyalty for CH; #f; ()

sale-price-mm

  

SalePriceMM

  

real

  

Sale price for MM; #f; ()

sale-price-ch

  

SalePriceCH

  

real

  

Sale price for CH; #f; ()

price-diff

  

PriceDiff

  

real

  

Sale price of MM less sale price of CH; #f; ()

store7

  

Store7

  

categorical

  

A factor with levels No and Yes indicating whether the sale is at Store 7; #f; (No Yes)

pct-disc-mm

  

PctDiscMM

  

real

  

Percentage discount for MM; #f; ()

pct-disc-ch

  

PctDiscCH

  

real

  

Percentage discount for CH; #f; ()

list-price-diff

  

ListPriceDiff

  

real

  

List price of MM less list price of CH; #f; ()

store

  

STORE

  

integer

  

Which of 5 possible stores the sale occured at; #f; ()

1.16 ozone🔗ℹ

111 rows × 4 columns. Ozone data from New York. The 111 complete days of airquality without month and day. Two cells differ: wind on 1973-07-01 (4 vs 4.1) and ozone on 1973-09-01 (95.9999999999999 vs 96).
Halvorsen, K. B. (2019). ElemStatLearn: Data Sets, Functions and Examples from the Book "The Elements of Statistical Learning, Data Mining, Inference, and Prediction" by Trevor Hastie, Robert Tibshirani and Jerome Friedman. R package version 2015.6.26.2. Book: Hastie, T., Tibshirani, R. and Friedman, J. (2009). The Elements of Statistical Learning, Second Edition. Springer. https://hastie.su.domains/ElemStatLearn/. Original sources in the bundled upstream documentation.
ElemStatLearn 2015.6.26.2; GPL-2.0-or-later

Column

  

Original

  

Type

  

Description / unit / levels

ozone

  

ozone

  

real

  

Daily ozone concentration; ppb; ()

radiation

  

radiation

  

integer

  

Solar radiation; langleys; ()

temperature

  

temperature

  

integer

  

Daily maximum temperature; degrees Fahrenheit; ()

wind

  

wind

  

real

  

Wind speed; mph; ()

1.17 portfolio🔗ℹ

100 rows × 2 columns. A simple simulated data set containing 100 returns for each of two assets, X and Y. The data is used to estimate the optimal fraction to invest in each asset to minimize investment risk of the combined portfolio. One can then use the Bootstrap to estimate the standard error of this estimate. names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

x

  

X

  

real

  

Returns for Asset X; #f; ()

y

  

Y

  

real

  

Returns for Asset Y; #f; ()

1.18 prostate🔗ℹ

97 rows × 10 columns. Data to examine the correlation between the level of prostate-specific antigen and a number of clinical measures in men who were about to receive a radical prostatectomy. split is R’s logical train: the 67 training and 30 test observations of the book’s §3.2.1. lweight for subject 32 has the second-edition correction.
Halvorsen, K. B. (2019). ElemStatLearn: Data Sets, Functions and Examples from the Book "The Elements of Statistical Learning, Data Mining, Inference, and Prediction" by Trevor Hastie, Robert Tibshirani and Jerome Friedman. R package version 2015.6.26.2. Book: Hastie, T., Tibshirani, R. and Friedman, J. (2009). The Elements of Statistical Learning, Second Edition. Springer. https://hastie.su.domains/ElemStatLearn/. Original sources in the bundled upstream documentation.
ElemStatLearn 2015.6.26.2; GPL-2.0-or-later

Column

  

Original

  

Type

  

Description / unit / levels

lcavol

  

lcavol

  

real

  

log cancer volume; #f; ()

lweight

  

lweight

  

real

  

log prostate weight; #f; ()

age

  

age

  

integer

  

Age; years; ()

lbph

  

lbph

  

real

  

log of the amount of benign prostatic hyperplasia; #f; ()

svi

  

svi

  

integer

  

seminal vesicle invasion; #f; ()

lcp

  

lcp

  

real

  

log of capsular penetration; #f; ()

gleason

  

gleason

  

integer

  

Gleason score; #f; ()

pgg45

  

pgg45

  

integer

  

percent of Gleason score 4 or 5; #f; ()

lpsa

  

lpsa

  

real

  

Log of prostate-specific antigen, the response; #f; ()

split

  

train

  

categorical

  

train: the 67 training observations; test: the 30 test observations; #f; (train test)

1.19 publication🔗ℹ

244 rows × 9 columns. Publication times for 244 clinical trials funded by the National Heart, Lung, and Blood Institute. Survival data: time to publication with status 1 = published. mech, an R character column, is categorical with sorted levels. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

posres

  

posres

  

integer

  

Did the trial produce a positive (significant) result? 1=Yes, 0=No.; #f; ()

multi

  

multi

  

integer

  

Did the trial involve multiple centers? 1=Yes, 0=No.; #f; ()

clinend

  

clinend

  

integer

  

Did the trial focus on a clinical endpoint? 1=Yes, 0=No.; #f; ()

mech

  

mech

  

categorical

  

Funding mechanism within National Institute of Health: a qualitative variable.; #f; (Contract K01 K23 P01 P50 R01 R18 R21 R24, K24 R42 R44 RC2 U01 U54)

sampsize

  

sampsize

  

integer

  

Sample size for the trial.; #f; ()

budget

  

budget

  

real

  

Budget of the trial, in millions of dollars.; #f; ()

impact

  

impact

  

real

  

Impact of the trial; this is related to the number of publications.; #f; ()

time

  

time

  

real

  

Time to publication, in months.; months; ()

status

  

status

  

integer

  

Whether or not the trial was published at time: 1=Published, 0=Not yet published.; #f; ()

1.20 sa-heart🔗ℹ

462 rows × 10 columns. A retrospective sample of males in a heart-disease high-risk region of the Western Cape, South Africa. famhist is R’s factor, levels in metadata.
Halvorsen, K. B. (2019). ElemStatLearn: Data Sets, Functions and Examples from the Book "The Elements of Statistical Learning, Data Mining, Inference, and Prediction" by Trevor Hastie, Robert Tibshirani and Jerome Friedman. R package version 2015.6.26.2. Book: Hastie, T., Tibshirani, R. and Friedman, J. (2009). The Elements of Statistical Learning, Second Edition. Springer. https://hastie.su.domains/ElemStatLearn/. Original sources in the bundled upstream documentation.
ElemStatLearn 2015.6.26.2; GPL-2.0-or-later

Column

  

Original

  

Type

  

Description / unit / levels

sbp

  

sbp

  

integer

  

systolic blood pressure; #f; ()

tobacco

  

tobacco

  

real

  

Cumulative tobacco; kg; ()

ldl

  

ldl

  

real

  

low density lipoprotein cholesterol; #f; ()

adiposity

  

adiposity

  

real

  

Adiposity; #f; ()

famhist

  

famhist

  

categorical

  

Family history of heart disease; #f; (Absent Present)

typea

  

typea

  

integer

  

type-A behavior; #f; ()

obesity

  

obesity

  

real

  

Obesity; #f; ()

alcohol

  

alcohol

  

real

  

current alcohol consumption; #f; ()

age

  

age

  

integer

  

age at onset; #f; ()

chd

  

chd

  

integer

  

Coronary heart disease, the response; #f; ()

1.21 smarket🔗ℹ

1250 rows × 9 columns. Daily percentage returns for the S&P 500 stock index between 2001 and 2005. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

year

  

Year

  

integer

  

The year that the observation was recorded; #f; ()

lag1

  

Lag1

  

real

  

Percentage return for previous day; #f; ()

lag2

  

Lag2

  

real

  

Percentage return for 2 days previous; #f; ()

lag3

  

Lag3

  

real

  

Percentage return for 3 days previous; #f; ()

lag4

  

Lag4

  

real

  

Percentage return for 4 days previous; #f; ()

lag5

  

Lag5

  

real

  

Percentage return for 5 days previous; #f; ()

volume

  

Volume

  

real

  

Volume of shares traded (number of daily shares traded in billions); #f; ()

today

  

Today

  

real

  

Percentage return for today; #f; ()

direction

  

Direction

  

categorical

  

A factor with levels Down and Up indicating whether the market had a positive or negative return on a given day; #f; (Down Up)

1.22 vowel🔗ℹ

990 rows × 12 columns. Speaker independent recognition of the eleven steady state vowels of British English using a specified training set of lpc derived log area ratios. The 528 vowel.train rows, then the 462 vowel.test rows, told apart by split; x1 to x10 are R’s x.1 to x.10.
Halvorsen, K. B. (2019). ElemStatLearn: Data Sets, Functions and Examples from the Book "The Elements of Statistical Learning, Data Mining, Inference, and Prediction" by Trevor Hastie, Robert Tibshirani and Jerome Friedman. R package version 2015.6.26.2. Book: Hastie, T., Tibshirani, R. and Friedman, J. (2009). The Elements of Statistical Learning, Second Edition. Springer. https://hastie.su.domains/ElemStatLearn/. Original sources in the bundled upstream documentation.
ElemStatLearn 2015.6.26.2; GPL-2.0-or-later

Column

  

Original

  

Type

  

Description / unit / levels

y

  

y

  

integer

  

Vowel class, 1-11; #f; ()

x1 … x10

  

x.1 … x.10

  

real

  

Log area parameter from linear predictive analysis of the frame; #f; ()

split

  

vowel.train or vowel.test

  

categorical

  

train: the 528 vowel.train rows (8 speakers); test: the 462 vowel.test rows (7 other speakers); #f; (train test)

1.23 wage🔗ℹ

3000 rows × 11 columns. Wage and other data for a group of 3000 male workers in the Mid-Atlantic region. The numeric row names are not kept. region keeps all nine R levels though only 2. Middle Atlantic occurs. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

year

  

year

  

integer

  

Year that wage information was recorded; #f; ()

age

  

age

  

integer

  

Age of worker; #f; ()

maritl

  

maritl

  

categorical

  

A factor with levels 1. Never Married 2. Married 3. Widowed 4. Divorced and 5. Separated indicating marital status; #f; (1. Never Married 2. Married 3. Widowed 4. Divorced 5. Separated)

race

  

race

  

categorical

  

A factor with levels 1. White 2. Black 3. Asian and 4. Other indicating race; #f; (1. White 2. Black 3. Asian 4. Other)

education

  

education

  

categorical

  

A factor with levels 1. < HS Grad 2. HS Grad 3. Some College 4. College Grad and 5. Advanced Degree indicating education level; #f; (1. < HS Grad 2. HS Grad 3. Some College 4. College Grad 5. Advanced Degree)

region

  

region

  

categorical

  

Region of the country (mid-atlantic only); #f; (1. New England 2. Middle Atlantic 3. East North Central 4. West North Central 5. South Atlantic 6. East South Central 7. West South Central 8. Mountain 9. Pacific)

jobclass

  

jobclass

  

categorical

  

A factor with levels 1. Industrial and 2. Information indicating type of job; #f; (1. Industrial 2. Information)

health

  

health

  

categorical

  

A factor with levels 1. <=Good and 2. >=Very Good indicating health level of worker; #f; (1. <=Good 2. >=Very Good)

health-ins

  

health_ins

  

categorical

  

A factor with levels 1. Yes and 2. No indicating whether worker has health insurance; #f; (1. Yes 2. No)

logwage

  

logwage

  

real

  

Log of workers wage; #f; ()

wage

  

wage

  

real

  

Workers raw wage; thousands of dollars; ()

1.24 weekly🔗ℹ

1089 rows × 9 columns. Weekly percentage returns for the S&P 500 stock index between 1990 and 2010. R factors rendered as labels with levels in metadata; names normalized to kebab-case.
James, G., Witten, D., Hastie, T. and Tibshirani, R. (2022). ISLR2: Introduction to Statistical Learning, Second Edition. R package version 1.3-2. Book: An Introduction to Statistical Learning with Applications in R, Second Edition (2021), Springer, https://www.statlearning.com. Original sources in the bundled upstream documentation.
ISLR2 1.3-2; GPL-2.0-only

Column

  

Original

  

Type

  

Description / unit / levels

year

  

Year

  

integer

  

The year that the observation was recorded; #f; ()

lag1

  

Lag1

  

real

  

Percentage return for previous week; #f; ()

lag2

  

Lag2

  

real

  

Percentage return for 2 weeks previous; #f; ()

lag3

  

Lag3

  

real

  

Percentage return for 3 weeks previous; #f; ()

lag4

  

Lag4

  

real

  

Percentage return for 4 weeks previous; #f; ()

lag5

  

Lag5

  

real

  

Percentage return for 5 weeks previous; #f; ()

volume

  

Volume

  

real

  

Volume of shares traded (average number of daily shares traded in billions); #f; ()

today

  

Today

  

real

  

Percentage return for this week; #f; ()

direction

  

Direction

  

categorical

  

A factor with levels Down and Up indicating whether the market had a positive or negative return on a given week; #f; (Down Up)