R Dataset / Package wooldridge / traffic2

On this R-data statistics page, you will find information about the traffic2 data set which pertains to traffic2. The traffic2 data set is found in the wooldridge R package. You can load the traffic2 data set in R by issuing the following command at the console data("traffic2"). This will load the data into a variable called traffic2. If R says the traffic2 data set is not found, you can try installing the package by issuing this command install.packages("wooldridge") and then attempt to reload the data with the library() command. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the traffic2 R data set. The size of this file is about 38,811 bytes.

traffic2

Description

Data loads lazily. Type data(traffic2) into the console.

Usage

data(traffic2)

Format

A data.frame with 108 rows and 48 variables:

  • year. 1981 to 1989

  • totacc. statewide total accidents

  • fatacc. statewide fatal accidents

  • injacc. statewide injury accidents

  • pdoacc. property damage only accidents

  • ntotacc. noninterstate total acc.

  • nfatacc. noninterstate fatal acc.

  • ninjacc. noninterstate injur acc.

  • npdoacc. noninterstate property acc.

  • rtotacc. tot. acc. on rural 65 mph roads

  • rfatacc. fat. acc. on rural 65 mph roads

  • rinjacc. inj. acc. on rural 65 mph roads

  • rpdoacc. prp. acc. on rural 65 mph roads

  • ushigh. acc. on U.S. highways

  • cntyrds. acc. on county roads

  • strtes. acc. on state routes

  • t. time trend

  • tsq. t^2

  • unem. state unemployment rate

  • spdlaw. =1 after 65 mph in effect

  • beltlaw. =1 after seatbelt law

  • wkends. # weekends in month

  • feb. =1 if month is Feb.

  • mar.

  • apr.

  • may.

  • jun.

  • jul.

  • aug.

  • sep.

  • oct.

  • nov.

  • dec.

  • ltotacc. log(totacc)

  • lfatacc. log(fatacc)

  • prcfat. 100*(fatacc/totacc)

  • prcrfat. 100*(rfatacc/rtotacc)

  • lrtotacc. log(rtotacc)

  • lrfatacc. log(rfatacc)

  • lntotacc. log(ntotacc)

  • lnfatacc. log(nfatacc)

  • prcnfat. 100*(nfatacc/ntotacc)

  • lushigh. log(ushigh)

  • lcntyrds. log(cntyrds)

  • lstrtes. log(strtes)

  • spdt. spdlaw*t

  • beltt. beltlaw*t

  • prcfat_1. prcfat[_n-1]

Source

https://www.cengage.com/cgi-wadsworth/course_products_wp.pl?fid=M20b&product_isbn_issn=9781111531041

Examples

 str(traffic2)

Dataset imported from https://www.r-project.org.

Attachments: csv, json

<iframe src="https://pmagunia.com/iframe/r-dataset-package-wooldridge-traffic2.html" width="100%" height="100%" style="border:0px"></iframe>